I am rather new to VTK and especially the XDMF reader.
I’m trying to read a file that contains 5 timesteps.
I was able to read it with vtkXdmfReader but I would like to know how to access the data for a given timestep (say the third).
Thanks in advance for your help!
from vtkmodules.vtkIOXdmf2 import vtkXdmfReader reader = vtkXdmfReader() reader.SetFileName("checkpoint.xdmf") reader.UpdateInformation() print(reader.GetNumberOfGrids()) # prints 5 print(reader.GetNumberOfGridArrays()) # prints 5 print(reader.GetOutputDataObject(0)) # don't really know what it does...