Skip to content

Modulef Formatted Field — MFF (.mff)

The MFF (Modulef Formatted Field) format is the field companion to the Modulef Formatted Mesh (.mfm), following FEconv. It stores a single field over the whole mesh.

Format namemff
Extensions.mff
Read / Write✓ / ✓
Extra dependencies

Reading & writing

python
import meshioplusplus

field = meshioplusplus.read("field.mff")        # geometry-less Mesh
meshioplusplus.mff.write("out.mff", field)

File structure

An MFF file is an integer value count followed by a flat list of double-precision floats:

17793
  -6.74589979648590
  -6.70319187641144
  ...

Data mapping

MFF carries no geometry and no component/location metadata: the value count is a multiple of the number of nodes (or elements) of the companion mesh, and that ratio is the number of components. Read standalone here, the values become a geometry-less Mesh — no cells, points with zero columns — carrying point_data["mff:field"]. On write, the first point_data array is used (or the first non-unv:pid cell_data array if there is no point data).

Quirks & limitations

  • Only the field values round-trip. Because the file has no coordinates and no component count, the geometry and the scalar-vs-vector shape cannot be recovered without the companion .mfm mesh — a standalone read yields a flat scalar vector.
  • To attach the field to its mesh, read the .mfm and .mff separately and assign the field Mesh's point_data onto the geometry Mesh.

Notes

  • Implemented against the FEconv format documentation (FEconv is GPL; no code or data is copied — fixtures are generated by round-trip).

Released under the MIT License.