PyFR — flux-reconstruction HDF5 meshes and solutions (.pyfrm, .pyfrs)
PyFR stores unstructured high-order meshes in HDF5 .pyfrm files and solutions in companion .pyfrs files (roadmap 2.4.9.1). Both engines read and write .pyfrm and read companion .pyfrs solutions (formats/pyfr.cpp on detail/hdf5_util.hpp; meshioplusplus.pyfr through h5py).
| Format name | pyfr |
| Extensions | .pyfrm |
| Read / Write | ✓ / ✓ (.pyfrm read/write; companion .pyfrs solution read) |
| Extra dependencies | HDF5 (MESHIOPLUSPLUS_WITH_HDF5) in the core; h5py for the Python reference |
Reading
python
import meshioplusplus
mesh = meshioplusplus.read("cylinder.pyfrm")
mesh = meshioplusplus.pyfr.read("cylinder.pyfrm", solution="cylinder-01.00.pyfrs")- Shape-point datasets
spt_<type>_p<n>(tri,quad,tet,pyr,pri,hex) of shape(n_spts, n_elems, ndims)are read in deterministic(type, partition)order with exact coordinate deduplication into shared points. Linear elements becometriangle,quad,tetra,pyramid,wedge, andhexahedron; higher-order elements map totriangle6/quad9/tetra10/hexahedron27/wedge15/wedge18/pyramid13or the correspondingvtk_lagrange_*cell types. - Boundary condition compound datasets
bcon_<name>_p<n>becomeRegionentries of kind"side"(RegionKind::Sidein C++). - When
solution=(PyfrReadOptions::mSolutionin C++) names a.pyfrsfile,statsis parsed for field names (fields = ...) and simulation time (tcurr = ..., stored infield_data["meshio:time"]), and eachsoln_<type>_p<n>dataset of shape(n_upts, n_vars, n_elems)is averaged over solution points to per-cellcell_data.
Writing
python
meshioplusplus.write("out.pyfrm", mesh)Writes mesh_uuid, spt_<type>_p<n> shape-point datasets for triangle/quad/tetra/pyramid/wedge/hexahedron (and their high-order counterparts), and bcon_<name>_p<n> compound datasets for every "side" region.