BasicTools.IO.GmshReader module

Gmsh file reader (gmsh mesh files)

BasicTools.IO.GmshReader.CheckIntegrity()[source]
class BasicTools.IO.GmshReader.GmshReader[source]

Bases: ReaderBase

Class to read Gmsh files into a UnstructuredMesh

Parameters:
  • readGeoTags (Bool) – option to activate/deactivate the reading of the Geometrical tags of the files

  • readPhyTags (Bool) – option to activate/deactivate the reading of the Physical tags of the files

Read(fileName: str | None = None, string: str | None = None, out: UnstructuredMesh | None = None) UnstructuredMesh[source]

Function that performs the reading of a gmsh mesh file

Parameters:
  • fileName (str, optional) – name of the file to be read, by default None

  • string (str, optional) – data to be read as a string instead of a file, by default None

  • out (UnstructuredMesh, optional) – output unstructured mesh object containing reading result, by default None

Returns:

output unstructured mesh object containing reading result

Return type:

UnstructuredMesh

BasicTools.IO.GmshReader.ReadGmsh(fileName: str | None = None, string: str | None = None, out=None, **kwargs) UnstructuredMesh[source]

Function API for reading a gmsh file

Parameters:
  • fileName (str, optional) – name of the file to be read, by default None

  • string (str, optional) – data to be read as a string instead of a file, by default None

  • out (UnstructuredMesh, optional) – output unstructured mesh object containing reading result, by default None

Returns:

output unstructured mesh object containing reading result

Return type:

UnstructuredMesh