Skip to content

Add nodeTags and eleTags to VTKHDF recorder HDF5 output#1

Draft
Copilot wants to merge 1 commit intomasterfrom
copilot/add-eletags-nodetags
Draft

Add nodeTags and eleTags to VTKHDF recorder HDF5 output#1
Copilot wants to merge 1 commit intomasterfrom
copilot/add-eletags-nodetags

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 24, 2026

VTKHDF recorder stored node/element tags only as in-memory structures, making it impossible for external tools (e.g., ParaView) to map sequential indices back to original OpenSees node/element IDs.

Changes

  • Constructor: Unconditionally create PointData/nodeTags and CellData/eleTags (1D int, chunked) alongside their corresponding Steps/PointDataOffsets/nodeTags and Steps/CellDataOffsets/eleTags offset tracking datasets.

  • writeMesh(): Write theNodeTags and theEleTags once when the mesh is initialized — tags are constant so they are never re-written on domain changes or subsequent steps.

  • writeStep(): Append offset 0 to both offset datasets at every time step. Since the data is written once and never changes, all steps point to the beginning of the arrays.

Resulting HDF5 structure

/VTKHDF/
├── PointData/
│   └── nodeTags          # (numNode,) int — original OpenSees node tags
├── CellData/
│   └── eleTags           # (numElement,) int — original OpenSees element tags
└── Steps/
    ├── PointDataOffsets/
    │   └── nodeTags      # always 0 per step (constant data)
    └── CellDataOffsets/
        └── eleTags       # always 0 per step (constant data)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants