Muscat.IO.GeofWriter module¶
Geof file writer (Zset mesh files)
- class GeofWriter[source]¶
Bases:
WriterBase
Class to write Unstructured mesh on disk in the geof format file
- SetWriteLowerDimElementsAsSets(val: bool) None [source]¶
- Set the type of export for element of lower dimensionality
(1D and 2D element on a 3D mesh)
- Parameters:
val (bool) – if True all the elements of lower dimensionality are exported in the mesh if False all the element of lower dimensionality are exported as bsets, by default False
- Write(meshObject: Mesh, useOriginalId: bool | None = False, lowerDimElementsAsElsets: bool = False, PointFieldsNames=None, PointFields=None, CellFieldsNames=None, CellFields=None)[source]¶
Write mesh to file in Geof format
- Parameters:
meshObject (Mesh) – the mesh to be written
useOriginalId (Optional[bool], optional) – use the Original Id for the number of nodes and elements (the user is responsible of the consistency of this data), by default False
lowerDimElementsAsElsets (Optional[bool], optional) – refert to GeofWriter.SetWriteLowerDimElementsAsSets for the documentations
PointFieldsNames (None) – Not Used, by default None
PointFields (None) – Not Used, by default None
CellFieldsNames (None) – Not Used, by default None
CellFields (None) – Not Used, by default None
- Raises:
Exception – in the case 1D element are presents in the mesh (doset)
- WriteMeshToGeof(fileName: str, mesh: Mesh, useOriginalId: bool | None = False, lowerDimElementsAsElsets: bool = False) None [source]¶
- Function API for writing mesh in the geof format file.
A file is created using the path and name of fileName
- Parameters:
fileName (str) – name with path to the file to be created (relative or absolute)
mesh (Mesh) – the mesh to be exported
useOriginalId (Optional[bool], optional) – use the Original Id for the number of nodes and elements (the user is responsible of the consistency of this data), by default False
lowerDimElementsAsElsets (Optional[bool], optional) – refert to GeofWriter.SetWriteLowerDimElementsAsSets for the documentations