hydromodpy.spatial.mesh.adapters.meshio_adapter#

Round-trip conversion between HydroMesh and meshio meshes.

meshio is the generic I/O backbone used by HydroModPy to access common mesh file formats (VTU, MSH, XDMF, …). The goal of this module is to keep a lossless-enough bridge for the information that HydroModPy itself cares about:

  • points / vertices,

  • cell connectivity,

  • per-cell arrays,

  • per-point arrays.

Unsupported meshio blocks such as line or vertex-only blocks are skipped deliberately because they do not map to the HydroMesh pivot contract.

Functions

from_meshio(mesh)

Convert a meshio.Mesh into a HydroMesh.

to_meshio(hydro_mesh)

Convert a HydroMesh back into a meshio.Mesh.