This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Time series for ParaView

0 votes

Dear all,

How can I write a time series to file in order to be opened by ParaView?

I used TimeSeriesHDF5 series(MPI_COMM_NULL, "primal"); from the undocumented demo, but ParaView fails to load the file.

The only reader that does not fail miserably is Pixie Files, but I get the following error:

ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/Utilities/VisItBridge/databases/AvtAlgorithms/vtkAvtSTSDFileFormatAlgorithm.cxx, line 158
vtkVisItPixieReader (0x7fcee44302b0): VisIt Exception caught.

Any pointers?

asked Jul 13, 2016 by senseiwa FEniCS User (2,620 points)

You seem to be asking about TimeSeriesHDF5 specifically, but is there a reason you can't save your time-evolving data as regular VTK (.pvd) files?

I have a time-dependant problem and I wanted to make a movie, all I have is paraview...

2 Answers

0 votes
 
Best answer

The Cahn-Hilliard demo shows an example of writing multiple timesteps to a VTK (.pvd) file. This will generate separate .vtu files for each timestep, but if you load the .pvd file in Paraview, it will open as a time series. Then you can save a movie normally.

You may need to rename your function before writing for this to work properly.

answered Jul 21, 2016 by FF FEniCS User (4,630 points)
selected Jul 21, 2016 by senseiwa
0 votes

I do this using the C++ API using dolfin::XDMFFile.

// open file, fileName is a string
dolfin::XDMFFile file(MPI_COMM_WORLD, fileName);

// write for each time step
// dolfinFunction is a dolfin::Function
// time is the floating point value of the time

file.write(dolfinFunction, time);

You should be able to open this file in paraview and it will run as a movie automatically.

answered Jul 20, 2016 by david.bernstein FEniCS User (2,000 points)
...