This is a discussion that came from the MR implementing this feature.
Q:
I have a question about the design of the hierarchy specification. Apparently, the hierarchy is fixed, and each Leaf of the Assembly points to a node that represents a VTKHDF valid root node. So each Leaf could point to a transient UnstructuredGrid.
In my own simulations, the hierarchy is not fixed. For each frame, I have a hierarchy, and in some frames, that hierarchy includes some UnstructuredGrids and in some others it doesn´t include them. For example, if the simulation detects collisions, I will export a UnstructuredGrid representing data about the collisions, if not, I won´t export that data for that particular frame.
Is it possible to represent that kind of varying assembly using the current specification?
A:
In fact its not really related to the design but own we implement it.
Currently if a leaf is pointing to nothing it will be ignore so your use case will be expected to be supported BUT I don’t test it so if it’s not the case you can also create a valid empty UG as workaround.
In the case I describe, for some timestamps I have data, but for others I dont have data. In the case of collisions for example, I am exporting a hierarchy for each timestamp, This hierarchy has a node for collisions if in that frame I had collisions. Otherwise the hierarchy doesn’t have a node for the collisions.
In the design describe here, the Assembly is fixed (it is read only once), so I will have to export the collisions node as part of the hirarchy. You say that if the leaf points to nothing, it will be ignored, but in my case the leaf will points to something. At frame 10 (for example) I have collisions, so I will have to fill data for that timestamp. Then, at frame 20, the collisions are resolved and I dont have anymore. What should I write in that case in the transient VTKHDF node representing the collisions?