hydromodpy.spatial.mesh.io.vtu_io#

VTU read/write for HydroMesh.

VTU (VTK Unstructured Grid XML) is the recommended portable disk format for both structured and unstructured HydroModPy meshes because it is:

  • widely supported (ParaView, PyVista, meshio, QGIS via plugins),

  • self-describing (vertices, connectivity, cell types, data arrays),

  • format-agnostic regarding 2D vs 3D, structured vs unstructured.

This module intentionally remains thin and delegates the actual conversion to the meshio adapter layer.

Functions

read_vtu(path)

Read a VTU file into a HydroMesh.

write_vtu(path, hydro_mesh)

Write a HydroMesh to a VTU file and return the resolved path.