Reading UnstructuredGrid data from a transient vtkhdf file

I’m trying to use the vtkHDFReader from vtkmodules.vtkIOHDF to read a timestep’s data. The transient VTKHDF file I have to work with is a little limited, so I can’t verify that everything works myself. One limitation is that its points’ locations do not change over time, so I can’t check retrieving these for a specific time step. To do this, I think it would be:

# Make reader and update time step
reader = vtkHDFReader()
reader.SetFileName(filePath)
reader.SetStep(3)
reader.Update()

# Read points
data = reader.GetOutput()
points = vtk_to_numpy(data.GetPoints().GetData()))

Is this correct? Does someone have example code of reading from a transient VTKHDF, and/or documentation for vtkmodules.vtkIOHDF.vtkHDFReader? (It seems to be a little different than the documentation for the C++ class here: https://vtk.org/doc/nightly/html/classvtkHDFReader.html.)

Thanks for the help!
Bryce

@lgivord @danlipsa

Hello @engineer,

I believe your script is correct, does it works?