Skip to content

Features

High-level API — XH5F

xh5f_file_object is the primary user-facing type. It coordinates an HDF5 data file and an XDMF metadata file through a single, unified interface. MPI parallelization is handled transparently: each rank writes its own HDF5 file while the master rank assembles the final XDMF descriptor via MPI_GATHERV.

Grid topologies

Block type constantDescription
XH5F_BLOCK_CARTESIAN_UNIFORMUniform spacing — described by origin emin(3) and step dxyz(3)
XH5F_BLOCK_CARTESIANVariable spacing — described by per-axis node arrays x, y, z
XH5F_BLOCK_CURVILINEARGeneral curvilinear mesh — described by full nodes(3,0:ni,0:nj,0:nk) array

Data fields

All field operations are overloaded for ranks and kinds:

Field shapeLeading dimension of nd
Scalar 0D (grid-centered)— (no nd argument)
Scalar 3Dnd = [ni, nj, nk]
Vector 3Dnd = [3, ni, nj, nk]
Tensor6 3Dnd = [6, ni, nj, nk]
Tensor 3Dnd = [9, ni, nj, nk]
Matrix 3Dnd = [m, ni, nj, nk]

Supported Fortran kinds: R8P, R4P, I8P, I4P, I2P, I1P (via PENF).

Field centering

ConstantDescription
XDMF_ATTR_CENTER_CELLCell-centered (supported)
XDMF_ATTR_CENTER_GRIDGrid-centered / 0D (supported)
XDMF_ATTR_CENTER_NODENode-centered (not yet tested)
XDMF_ATTR_CENTER_EDGEEdge-centered (not yet tested)
XDMF_ATTR_CENTER_FACEFace-centered (not yet tested)

DataItem format

ConstantDescription
XDMF_DATAITEM_NUMBER_FORMAT_HDFData written to HDF5 file, path referenced in XDMF
XDMF_DATAITEM_NUMBER_FORMAT_XMLData inlined in the XDMF file (suitable for small scalars)

Low-level API — HDF5

hdf5_file_object provides direct access to HDF5 file and dataset operations.

  • Open / close HDF5 files with open_file / close_file
  • Open / close simple dataspaces with open_dspace / close_dspace
  • Save datasets with save_dataset (overloaded for ranks 0–7 and all PENF kinds)
  • Load datasets with load_dataset (same overloads)
  • Introspect: does_dataset_exist, get_dataset_dims

Low-level API — XDMF

xdmf_file_object generates XDMF XML via FoXy.

Grid types

ConstantDescription
XDMF_GRID_TYPE_UNIFORMSingle grid
XDMF_GRID_TYPE_COLLECTIONSynchronous collection
XDMF_GRID_TYPE_COLLECTION_ASYNCAsynchronous collection (MPI use case)
XDMF_GRID_TYPE_TREETree hierarchy
XDMF_GRID_TYPE_SUBSETSubset of another grid

3-D structured topologies

ConstantFortran / XDMF name
XDMF_TOPOLOGY_TYPE_3DCORECTMESHCartesian uniform
XDMF_TOPOLOGY_TYPE_3DRECTMESHCartesian (rectilinear)
XDMF_TOPOLOGY_TYPE_3DSMESHCurvilinear

Compiler Support

CompilerStatus
GNU gfortran ≥ 14.2.0Supported
NVIDIA nvfortran 25.3Supported
Intel FortranNot tested
IBM XL FortranNot tested

Design Principles

  • Pure Fortran — no C extensions beyond the HDF5 Fortran interface
  • OOP — all functionality exposed as type-bound procedures
  • KISS — the high-level XH5F API intentionally exposes a minimal surface
  • Agnostic kinds — the same method names work for all real/integer precisions
  • Free & Open Source — multi-licensed for both FOSS and commercial use