Muscat.IO.GmshWriter module

Gmsh File Writer (gmesh mesh files)

CheckIntegrity(GUI: bool = False)[source]
CheckIntegrity_OriginalIdsForTags(GUI: bool = False)[source]
CheckIntegrity_OverlappingTags(GUI: bool = False)[source]
CheckIntegrity_SeparatedTags(GUI: bool = False)[source]
class GmshWriter[source]

Bases: WriterBase

Class to writes a gmsh file on disk

SetFileName(fileName)[source]

Sets the fileName parameter of the class

Parameters:

string (str) – fileName to set

Write(meshObject: Mesh, useOriginalId=False, PointFieldsNames=None, PointFields=None, CellFieldsNames=None, CellFields=None)[source]

Function to writes a gmsh file on disk

Parameters:
  • meshObject (Mesh) – support of the data to be written

  • useOriginalId (bool, optional) – If True original ids of vertices and elements, by default False

  • PointFieldsNames (_type_, optional) – Not Used, by default None

  • PointFields (_type_, optional) – Not Used, by default None

  • CellFieldsNames (_type_, optional) – Not Used, by default None

  • CellFields (_type_, optional) – Not Used, by default None

Raises:

OverlappingTagException – when at least 2 tags are overlapping

exception OverlappingTagException[source]

Bases: Exception

WriteMeshToGmsh(filename, mesh, useOriginalId=False, tagMapping=None)[source]

Function API for writing data into a gmsh file

Parameters:
  • fileName (str) – name of the file to be written

  • mesh (Mesh) – the mesh to be written

  • useOriginalId (bool, optional) – If True, Original Id for the number of nodes and elements are used (the user is responsible of the consistency of this data), by default False

  • tagMapping (dict, optional) – tags of geometric objects defined in the mesh, by default None