HyperTreeGrid multicomponent scalar for time?

I have a HyperTreeGrid that has the identical tree structure for many time slices and I am wondering if using a multicomponent scalar would be a flexible way to associate the data at different times with the static tree. I can manually loop over scalar components to change time; however, is there a more standard way approach this such that the data structure I use is compatible with other temporal aware features of vtk. I am using vtk via the latest python dev build

I have also tried to use the XML writer but it seems to crash with an error when I try the following…

writer = vtkXMLHyperTreeGridWriter()
writer.SetInputData(htg)
writer.SetFileName(‘simple_jet.htg’)
writer.SetDataModeToBinary()
writer.SetWriteTimeValue(True)
writer.SetNumberOfTimeSteps(2)
writer.SetDebug(True)
writer.Start()
writer.WriteNextTime(0.01)
writer.WriteNextTime(0.02)
writer.Stop()

@Louis_Gombert @Charles_Gueunet

Hello @omdaniel ,

The concept of having time varying fields over a constant geometry is usually refereed to as static mesh in VTK / ParaView.
You can find a blog article that present a legacy plugin that did that, for Unstructured Grids and Polydata.
This is a legacy plugin as we are now pushind these functionnalities directly insde VTK. Unfortunately, we have no funding to support Hyper Tree Grids with this mechanism as of today.

Until we have a “hacky” static mesh by dealing with arrays, I would encourage you to use multiple scalar array with different names (pressure_0, pressure_1, pressure_2, …) with one array per timestep.
Pros:

  • Have distinct arrays, you can also represent time varying vectors
  • Thanks to standards name, you can use regex to extract subranges if needed (we did that in TTK)
  • If you are familiar with vtkForEach, it should be easy to add a loop strategies that iterate of your arrays and generate a time varying output output with that.
    Cons"
  • Having too much arrays (100+) on your data may clutter the interface and make it slightly unresponsive from time to time.
1 Like

I can use of filter to get the HTG as an Unstructured Grid. You mentioned that the static mesh with scalar data changing over time is built-in to vtk, is that in the latest development build? Or the current Paraview 12? If so are there any documentation/references to analyzing static Unstructured or Polydata meshes with time varying scalars using out-of-the box feature set without plugins?

@omdaniel going from HTG to Unstructured Grid is extremely costly in memory and result in a data set where cells are disconnected so a lot of processing filters will be impacted and give poor result. In practice, I do not think this would be beneficial.

The integration of static mesh for the 5.12 release is at an extremely early stage. You can force the static mesh on a dataset, but nothing will really use this information.
On the current master though, you can save / read static meshes using the vtkHDF format and the surface rendering is able to exploit this information for efficient rendering. We foresee more filters incoming in the future for polydata, unstructured grids and composite data using those.

1 Like