FDH5 file layout
For saving, reading and selecting results, see FDH5 format. The detailed description below comes from the format module’s docstring.
FDH5 is Fedoo’s native HDF5 result format. It stores mesh geometry and sets, requested fields, scalar outputs and optional section-recovery descriptions for one or several saved frames. Element/Gauss-point fields and beam section definitions are grouped by submesh; nodal fields use the shared node table.
The following layout is illustrative: field and metadata groups are present only when corresponding outputs have been saved.
mesh/
├── nodes
├── node_sets/
├── submesh_0/
│ ├── elements
│ ├── element_sets/
│ └── metadata/
│ └── element_type = "tri3"
├── submesh_1/
│ ├── elements
│ ├── element_sets/
│ └── metadata/
│ └── element_type = "tri3"
├── submesh_2/
│ ├── elements
│ ├── element_sets/
│ └── metadata/
│ └── element_type = "quad4"
└── ...
results/
├── iter_0/
│ ├── node_data/
│ ├── element_data/
│ │ ├── submesh_0/
│ │ │ ├── stress
│ │ │ ├── plasticity
│ │ │ └── ...
│ │ ├── submesh_1/
│ │ └── ...
│ ├── gausspoint_data/
│ │ ├── submesh_0/
│ │ ├── submesh_1/
│ │ └── ...
│ ├── scalars/
│ ├── section_metadata/
│ │ ├── submesh_0/ (shared beam section description)
│ │ │ └── properties/
│ │ └── ...
│ ├── field_metadata/ (shell/field descriptions and output points)
│ └── metadata/
├── iter_1/
└── ...
Field arrays retain their Fedoo shapes. Scalar mesh fields have one location
axis; vector/tensor fields are component-first. Section Stress/Strain tensors
can include a section-point axis, with shape
(6, n_section_points, n_locations). Gauss-point locations use GP-major
ordering within each submesh (element indices vary fastest).
Section descriptions use typed HDF5 datasets. Uniform beam properties are
stored in section_metadata; varying properties are referenced private
_Section_* fields with an explicit Node, Element or GaussPoint association.
Saved local-frame fields allow conversion of recovered tensors to global
coordinates. These descriptions are optional: older files remain readable,
but section recovery requires the necessary geometry, fields and frames.
fedoo.read_data returns a DataSet for one frame and a MultiFrameDataSet
for multiple frames. It loads sequence fields on demand. Dataset selections
and viewer settings are not persisted, and the file is not a solver restart
checkpoint. The format version stored in the root attributes is independent
of the Fedoo package version.
Gzip level 4 is the default lossless compression. Optional Zstandard uses the
HDF5 Zstd filter (id 32015), provided by pip install fedoo[zstd] or
pip install hdf5plugin. Fedoo registers it automatically when needed;
external readers need the same filter. Writers mark files containing Zstandard
with the root attribute fedoo_requires_zstd so readers can explain a
missing dependency before accessing compressed arrays. This marker remains
set when later frames use another codec. The FDH5 layout is unchanged.
Live viewing uses short, sequential read/write access with HDF5 locking
enabled. Writers retry temporary lock conflicts for up to 10 seconds by
default; readers retry for up to 0.2 seconds. Eager mesh/frame reads copy all
arrays through one handle and release it before plotting. Explicit lazy
read handles must be closed before a writer can proceed. Both reader/writer
constructors accept lock_timeout; persistent contention raises the original
error, and unrelated I/O errors are not retried.