hydromodpy.spatial.mesh#
Unified mesh pivot for HydroModPy.
This package defines the small public API that most callers should learn first when they need to move a mesh across subsystem boundaries.
The package provides HydroMesh, a single data container that represents
both structured and unstructured grids in 2D and 3D. Every mesh producer
(gmsh, flopy, field meshes) can convert to HydroMesh, and every
mesh consumer (plotting, solver adapters, I/O) can consume it.
The rule of thumb is:
use
HydroMeshto exchange or serialize meshes ;use adapters to bridge specialized representations ;
use
hydromodpy.spatial.mesh.plottingfor quick QA plots ;use
hydromodpy.spatial.mesh.io.vtu_iowhen a portable on-disk format is needed.
Quick start:
from hydromodpy.spatial.mesh import HydroMesh, CellBlock, CellType
mesh = HydroMesh(
vertices=points_xy,
cell_blocks=(CellBlock(CellType.TRIANGLE, connectivity),),
)
Adapters:
from hydromodpy.spatial.mesh.adapters import from_meshio, to_meshio
from hydromodpy.spatial.mesh.adapters import (
from_gmsh_planar,
from_extruded_prism,
)
from hydromodpy.spatial.mesh.adapters import (
from_flopy_structured,
to_flopy_disv_args,
)
I/O:
from hydromodpy.spatial.mesh.io import read_vtu, write_vtu
Plotting:
from hydromodpy.spatial.mesh.plotting import plot_cell_values
More detailed usage notes and documentation entry points live in:
hydromodpy/spatial/mesh/README.mdhydromodpy/spatial/mesh/UML.mddocs/source/architecture/index.rstdocs/source/architecture/mesh/index.rst
On Read the Docs, the public technical documentation and UML pages live under
the Architecture tab. Scientific notes are documented separately under
the Scientific documentation tab.
Modules
Public adapter entry points around |
|
Batch helpers for the dedicated mesh-catchment launcher. |
|
Outlet-table IO helpers for the mesh-catchment batch launcher. |
|
Manifest and summary contracts for the mesh-catchment batch launcher. |
|
Canonical cell-type enumeration for the unified mesh pivot. |
|
Schema contract for the dedicated mesh-catchment launcher. |
|
Public entry points for the reusable |
|
Concrete implementations of the |
|
Unified mesh data container for HydroModPy. |
|
Mesh I/O utilities (VTU, MSH, etc.) via meshio. |
|
Best-effort helpers for sizing Matplotlib GUI windows. |
|
Unified plotting dispatch for HydroMesh. |
|
Topology-aware Grid Protocol for HydroModPy meshes. |
|
Shared public runtime helpers for catchment meshing workflows. |
|
Internal mono-run execution helpers for the dedicated mesh-catchment launcher. |