API overview¶
Core modules¶
meshRW.msh: legacy Gmsh v2.2 writer and reader (mshWriter,mshReader).meshRW.msh2: Gmsh API-backed writer for multiple MSH versions.meshRW.vtk: legacy VTK (.vtk) writer.meshRW.vtk2: VTK library-backed writer for.vtkand.vtu/.pvd.
Data model expectations¶
Nodes¶
2D array-like structure with shape (n_nodes, 2|3).
Elements¶
List of dictionaries with at least:
connectivity: array-like connectivity table.type: element type (string or numeric id depending on context).physgrp(optional): physical group id(s).
Fields¶
List of dictionaries with:
name: field name.type:nodalorelemental.dim: scalar/vector size.data: array-like values.nbsteps,steps(optional): for transient fields.
Error handling¶
Writers perform structural checks and raise ValueError or generic Exception in invalid states (e.g., unsupported extension, incompatible shapes).