# Composite Data Sets for the VTKHDF format

**URL:** <https://discourse.vtk.org/t/composite-data-sets-for-the-vtkhdf-format/12190>\
**Category:** Development\
**Tags:** file-formats, proposal\
**Created:** [August 23, 2023, 4:23pm UTC](https://discourse.vtk.org/t/composite-data-sets-for-the-vtkhdf-format/12190 "2023-08-23T16:23:20Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![lgivord](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lgivord/32/3543_2.png) [@lgivord](https://discourse.vtk.org/u/lgivord)\
**Post date:** [February 5, 2024, 3:07pm UTC](https://discourse.vtk.org/t/composite-data-sets-for-the-vtkhdf-format/12190/21 "2024-02-05T15:07:48Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![Juan\_Jose\_Casafranca](https://discourse.vtk.org/user_avatar/discourse.vtk.org/juan_jose_casafranca/32/7942_2.png) [@Juan\_Jose\_Casafranca](https://discourse.vtk.org/u/Juan_Jose_Casafranca)\
**Post date:** [February 5, 2024, 3:29pm UTC](https://discourse.vtk.org/t/composite-data-sets-for-the-vtkhdf-format/12190/22 "2024-02-05T15:29:54Z")

</div>

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](https://discourse.paraview.org/t/vtkhdf-unstructured-grid-with-transient-topology-fails-to-read/13852/2))

---

<div class="post-metadata">

**Author:** ![lgivord](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lgivord/32/3543_2.png) [@lgivord](https://discourse.vtk.org/u/lgivord)\
**Post date:** [February 9, 2024, 7:54am UTC](https://discourse.vtk.org/t/composite-data-sets-for-the-vtkhdf-format/12190/23 "2024-02-09T07:54:41Z")

</div>

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

[Previous page](https://discourse.vtk.org/t/composite-data-sets-for-the-vtkhdf-format/12190.md?page=1)
