Composite Data Sets for the VTKHDF format

Is this still the case for the transient?

Yes even in transient case you’ll need Offsets dataset

In that case, if I have 2 triangles, I would have Offsets = [0, 3, 6] for example. If this is transient, it could be Offsets = [0, 3, 6, 0, 3, 6], and Steps/CellOffsets should be in that case should be CellOffsets = [0, 3], right?

If you have 2 timesteps yes Offsets will be equal to [0, 3, 6, 0, 3, 6].

For CellOffsets, it could be indeed [0, 3], but if you know that between t0 and t1 the connectivity doesn’t changed you can have [0,0].

There is no transient data for the cell type?

Did you mean here that at t0 the second cell is a triangle and at t1 it can be a quad for example?

If this is what you mean so yes it could be. It will be done with the dataset Type.

Eg; if we have a dataset composed of:

  • t0: 2 triangles
  • t1: 1 triangles + 1 quad

we will have a Type dataset of size 4 which will contain [3, 3, 3, 4] (assuming CellType of triangle is equal to 3 in VTK and 4 for a quad).

Wwhat happens in case I have different number of cells?

it will be reflected in the offset array and other dataset which handle the connectivity.

If the reader going to read them in order? So for example if the first step have 3 cells and the second one 4, it will read from 0 to 3 entries in the Types dataset for the first frame and from 3 to 7 from the second step?

I can’t test it right now but it is what we should expected

I am not sure I totally understand, in my case I dont have 2 triangles in 1 frame and 1 triangle and a 1 quad in another frame, but 2 triangles in one frame and 3 triangles in next frame.

In that situation, I have something like (I enclose in parenthesis values that belon to the same frame)

Offsets = [(0, 3, 6), (0, 3, 6, 9)]
ConnectivityIds = [(0, 1, 2, 2, 4, 1), (0, 1, 2, 2, 4, 1, 4, 5, 6)]
Types = [(3, 3), (3, 3, 3)]
NumberOfCells = [2, 3]

Steps/CellOffsets = [0, 3]
Steps/ConnectivityIdsOffsets = [0, 6]

If this is correct, then there might be a bug in the reader, as I have a file which I think follows that format that fails to read correctly (https://discourse.paraview.org/t/vtkhdf-unstructured-grid-with-transient-topology-fails-to-read/13852/2)

sorry for the misunderstanding I just take an example to illustrate what I said.

Theses dataset looks ok, I will check it when I can and confirm that