Mesh Format¶
HOPR HDF5 curved mesh format used by PyHOPE
The HOPR HDF5 mesh format is designed for fast, scalable, parallel I/O of high-order unstructured 3D meshes. Mesh data is organized in non-overlapping arrays and packaged per element to minimize synchronization. A space-filling curve or structured ordering enables simple domain decomposition.
The following spectral element solvers have (optional) support for meshes generated in PyHOPE.
Framework |
Language |
Equation System |
Reference |
|---|---|---|---|
| FLEXI | Fortran | NSE | Krais et al., 2021 |
| ƎLEXI | Fortran | NSE/MRG | Kopper et al., 2023 |
| GALÆXI | Fortran/C | NSE | Kurz et al., 2025 |
| FLUXO | Fortran | NSE/MHD/Maxwell | Rueda-Ramirez et al., 2017 |
| HORSES3D | Fortran | NSE/Cahn-Hilliard | Ferrer et al., 2023 |
| PICLas | Fortran | Maxwell/Poisson | Fasoulas et al., 2019 |
Equation Systems: NSE - Navier-Stokes, MRG - Maxey-Riley-Gatignol, MHD - Magnetohydrodynamics
Global Attributes¶
Attribute |
Type |
Description |
|---|---|---|
Version |
REAL | Mesh file format version |
Ngeo |
INTEGER | Polynomial degree of the curved element mapping |
nElems |
INTEGER | Total number of elements |
nSides |
INTEGER | Total number of sides (element faces) |
nNodes |
INTEGER | Total number of nodes |
nUniqueSides |
INTEGER | Total number of geometrically unique sides |
nUniqueNodes |
INTEGER | Total number of geometrically unique nodes |
nBCs |
INTEGER | Number of entries in the boundary-condition list |
FEMconnect |
ON/OFF |
ON if FEM edge/vertex connectivity is present in the file |
Data Arrays¶
Array |
Type |
Size |
Description |
|---|---|---|---|
ElemInfo |
INTEGER | (1:6, 1:nElems) | Per-element data containing element type, zone, and offsets into side and node arrays: (ElemType, Zone, offsetIndSIDE, lastIndSIDE, offsetIndNODE, lastIndNODE). |
SideInfo |
INTEGER | (1:6, 1:nSides) | Per-side data stored contiguously per element range from ElemInfo. Fields: (SideType, GlobalSideID, nbElemID, 10*nbLocSide+Flip, BCID, [ElemID,locSideID]). Flip encodes side orientation; GlobalSideID<0 marks slave side. |
NodeCoords |
REAL | (1:3, 1:nNodes) | Node coordinates, stored per element range from ElemInfo. High-order nodes included. |
GlobalNodeIDs |
INTEGER | (1:nNodes) | Globally unique node IDs aligned with NodeCoords |
BCNames |
STRING | (1:nBCs) | List of user-defined boundary-condition names |
BCType |
INTEGER | (1:4, 1:nBCs) | Four-integer code per boundary condition; see boundary conditions below |
Element Definitions¶
Elements are defined using non-unique node IDs stored in ElemInfo and NodeCoords. Each element has a type code and a zone ID. The zone ID can be used to group elements into physical zones or blocks.
Element Types¶
The element encoding follows CGNS-inspired conventions. The last digit of the surface type corresponds to corner count; 3D element codes distinguish linear, bilinear, and non-linear variants.
| Element Type | Index | Element Type | Index | Element Type | Index |
|---|---|---|---|---|---|
| Tetrahedron, linear | 104 | Tetrahedron, bilinear | 114 | Tetrahedron, curved | 204 |
| Pyramid, linear | 105 | Pyramid, bilinear | 115 | Pyramid, curved | 205 |
| Prism/wedge, linear | 106 | Prism/wedge, bilinear | 116 | Prism/wedge, curved | 206 |
| Hexahedron, linear | 108 | Hexahedron, bilinear | 118 | Hexahedron, curved | 208 |
High-Order Nodes¶
High-order nodes are stored in tensor-product style using (i,j,k) with uniform spacing in reference space \([-1, 1]^3\). Note that for NGeo=1, this node ordering differs from CGNS corner ordering for pyramids and hexahedra as the nodes 3/4 and 7/8 are swapped. The number of nodes per element depends on NGeo and element type.
Tetrahedron:- \((Ngeo+1)(Ngeo+2)(Ngeo+3)/6\)
Pyramid:- \((Ngeo+1)(Ngeo+2)(2Ngeo+3)/6\)
Prism/Wedge:- \((Ngeo+1)^2(Ngeo+2)/2\)
Hexahedron:- \((Ngeo+1)^3\)
Boundary Conditions¶
BCNames and BCType define the available boundary conditions. BCID in SideInfo references a 1-based index into these arrays and uses 0 for interior sides. BCType = (BoundaryType, CurveIndex, StateIndex, PeriodicIndex) contains four integers per boundary condition:
BoundaryType:- Integer code for the BC kind. Reserved values:
1= periodic;100= inner/analyze sides. Periodic and inner sides also have neighbor links defined. CurveIndex:- Geometry/CAD tag to distinguish BCs or trigger curving behavior. Currently unused in PyHOPE.
BoundaryState:- User-defined index for solver reference states; not interpreted by the format.
PeriodicIndex:- Used only for periodic sides; two matching BCs must share the same absolute value, with opposite signs.
FEM Connectivity¶
PyHOPE can optionally store additional connectivity information required by Finite Element Method (FEM)-based solvers. This includes topological connectivity of edges and vertices, as well as their connections across elements. This information is included when the global attribute FEMconnect is set to ON.
Global Attributes¶
Attribute |
Type |
Description |
|---|---|---|
nEdges |
INTEGER | Total number of entries in EdgeInfo |
nVertices |
INTEGER | Total number of entries in VertexInfo |
nUniqueEdges |
INTEGER | Total number of geometrically unique edges |
nFEMSides |
INTEGER | Number of topologically (incl. periodicity) unique sides |
nFEMEdges |
INTEGER | Number of topologically unique edges |
nFEMEdgeConnections |
INTEGER | Size of EdgeConnectInfo |
nFEMVertices |
INTEGER | Number of topologically unique vertices |
nFEMVertexConnections |
INTEGER | Size of VertexConnectInfo |
Data Arrays¶
Array |
Type |
Size |
Description |
|---|---|---|---|
FEMElemInfo |
INTEGER | (1:4, 1:nElems) | Per-element offsets into EdgeInfo and VertexInfo: (offsetIndEDGE, lastIndEDGE, offsetIndVERTEX, lastIndVERTEX). |
EdgeInfo |
INTEGER | (1:3, 1:nEdges) | For each local element edge (CGNS order): (±FEMEdgeID, offsetIndEDGEConnect, lastIndEDGEConnect). Sign encodes local-to-global orientation. |
EdgeConnectInfo |
INTEGER | (1:2, 1:nFEMEdgeConns) | Edge connections: (±nbElemID, ±nbLocEdgeID). Sign on nbElemID encodes primary/replica; sign on nbLocEdgeID encodes orientation. |
VertexInfo |
INTEGER | (1:3, 1:nVertices) | For each local vertex (CGNS corner order): (FEMVertexID, offsetIndVERTEXConnect, lastIndVERTEXConnect). |
VertexConnectInfo |
INTEGER | (1:2, 1:nFEMVertexConns) | Vertex connections: (±nbElemID, nbLocVertexID). Sign encodes primary/replica. |