ogstools.meshlib.gmsh_converter module#

ogstools.meshlib.gmsh_converter.meshes_from_gmsh(filename, dim=0, reindex=True, log=True)[source]#

Generates pyvista unstructured grids from a gmsh mesh (.msh).

Extracts domain-, boundary- and physical group-submeshes.

Parameters:
  • filename (Path) – Gmsh mesh file (.msh) as input data

  • dim (int | list[int]) – Spatial dimension (1, 2 or 3), trying automatic detection, if not given. If multiple dimensions are provided, all elements of these dimensions are embedded in the resulting domain mesh.

  • reindex (bool) – Physical groups / regions / Material IDs to be renumbered consecutively beginning with zero.

  • log (bool) – If False, silence log messages

Returns:

A dictionary of names and corresponding meshes

Return type:

dict[str, Mesh]