How to append output to XDMF file in a time-series simulation?

(Amit Singh) #1

I noticed that vtkXdmf3Writer has WriteAllTimeSteps function. I have a simulation that updates a vtkPolyData as a function of time. But the program can run for several hours. So I want to keep writing out the vtkPolyData structure along with the corresponding simulation time periodically. To avoid generating several files, I am thinking of writing all the files to a XDMF file which will use HDF5 file to store the heavy data. But I am unable to understand how to do this.

  1. How to associate a time stamp with a vtkPolyData?
  2. How to append a new time stamp to an existing XDMF file?

Kindly let me know if this is possible with the existing VTK classes or if there is an example that I could follow.