hydromodpy.spatial.mesh.gmsh_grid.gmsh_reader#

Read, normalize and write simple 2D Gmsh meshes.

This module is the low-level I/O layer for planar Gmsh support. It converts between external mesh representations (meshio objects or ASCII .msh content) and one small internal payload (GmshMeshData).

Its job is deliberately narrow: accept triangles or quads, normalize their connectivity, reject unsupported mixed cases, and keep file handling separate from the higher-level mesh classes.

Functions

mesh_data_to_meshio(mesh_data)

Convert one normalized planar payload back to a meshio object.

meshio_to_mesh_data(mesh, *[, cell_type])

Convert one meshio mesh into a normalized planar mesh payload.

normalize_cell_type(cell_type)

Normalize external and meshio cell-type names to the internal convention.

read_gmsh_2d_mesh(path, *[, cell_type])

Read one planar 2D triangle or quadrilateral mesh from disk.

write_gmsh_2d_mesh(path, mesh_data, *[, ...])

Write one planar mesh payload to disk through meshio.

Classes

GmshCellBlock(cell_type, connectivity)

One homogeneous 2D cell block read from one mesh file.

GmshMeshData(points_xy, cell_blocks[, ...])

Raw planar mesh payload independent from the higher HydroModPy layers.