BasicTools.IO.GmshWriter module
Gmsh File Writer (gmesh mesh files)
- class BasicTools.IO.GmshWriter.GmshWriter[source]
Bases:
WriterBaseClass 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, useOriginalId=False, PointFieldsNames=None, PointFields=None, CellFieldsNames=None, CellFields=None)[source]
Function to writes a gmsh file on disk
- Parameters:
meshObject (UnstructuredMesh) – 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
- BasicTools.IO.GmshWriter.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 (UnstructuredMesh) – 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