# VTKHDF: support transient data for OverlappingAMR

**URL:** https://discourse.vtk.org/t/vtkhdf-support-transient-data-for-overlappingamr/13123
**Category:** Development
**Tags:** file-formats, proposal
**Created:** [January 23, 2024, 8:48am UTC](https://discourse.vtk.org/t/vtkhdf-support-transient-data-for-overlappingamr/13123 "2024-01-23T08:48:52Z")
**Posts on this page:** 2
**Page:** 1

<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: [January 23, 2024, 8:48am UTC](https://discourse.vtk.org/t/vtkhdf-support-transient-data-for-overlappingamr/13123/1 "2024-01-23T08:48:52Z")

</div>

This thread is dedicated to proposing an improvement for the VTKHDF file format regarding `OverlappingAMR` in `Transient` context.

The documentation for both can be found here:

- OverlappingAMR : [VTK File Formats - VTK documentation](https://docs.vtk.org/en/latest/design_documents/VTKFileFormats.html#overlapping-amr)
- Transient data : [VTK File Formats - VTK documentation](https://docs.vtk.org/en/latest/design_documents/VTKFileFormats.html#transient-data)

In this proposal, we suppose that we can only have transient data for these fields in OverlappingAMR:

- AMRBox
- Point/Cell/Field data

To support that, we only need to change the Transient Data format. For convenience, here is the current diagram for transient data :

 ![image](https://discourse.vtk.org/uploads/default/original/2X/4/4a52b0c6c9590f86bd9fd3715efb4a2d3b35168a.png)

As these fields depend on the `Level`. The idea is to add between `Point/Cell/FieldDataOffsets` and the group `Steps` an intermediary group `Level` and replicate that for each possible `Level`.

Additionally, this group `Level` will contain 2 others datasets:

- `AMRBoxOffsets` : to retrieve for the current timestep where we should start to read the `AMRBox`
- `NumberOfAMRBox` : to retrieve for the current timestep, the number of box contained in the `AMRBox`

Here is a full example of what we should obtain regarding this proposal:

 ![image](https://discourse.vtk.org/uploads/default/original/2X/f/f937295af936484d6bd1cf8259a4da3c7000f0d4.png)

cc @mwestphal @Louis_Gombert @hakostra @danlipsa

---

<div class="post-metadata">

### Author: ![hakostra](https://discourse.vtk.org/user_avatar/discourse.vtk.org/hakostra/32/2990_2.png) [@hakostra](https://discourse.vtk.org/u/hakostra)
#### Post date: [January 24, 2024, 8:35am UTC](https://discourse.vtk.org/t/vtkhdf-support-transient-data-for-overlappingamr/13123/2 "2024-01-24T08:35:48Z")

</div>

I think this looks very good and straight-forward, following the principles of the other transient implementations. Go for it.
