Muscat.IO.MeshReader module¶
Mesh file reader
- class MeshReader[source]¶
Bases:
ReaderBase
Mesh Reader class
- EnsureFileExistence(fileName: str)[source]¶
Function to verify file to read existence and complete extension if necessary
- Parameters:
fileName (str) – file to read
- Returns:
existing name of file to read
- Return type:
fileName
- ReadBinaryHeader()[source]¶
Function that performs the reading of the header of a binary Mesh file
- Returns:
dimension of the read mesh
- Return type:
int
- ReadMeshAscii(_fileName=None, _string=None, fieldFileName=None, out=None)[source]¶
Function that performs the reading of an ascii 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
fieldFileName (str, optional) – Not Used, by default None
out (Mesh, optional) – output unstructured mesh object containing reading result, by default None
- Returns:
output unstructured mesh object containing reading result
- Return type:
- class MeshSolutionReaderWrapper[source]¶
Bases:
object
Class to handle a solution file associated to a Mesh file
- ReadMesh(fileName: str = '', string: str = '', ReadRefsAsField: bool = False) Mesh [source]¶
Function API for reading a Mesh file
- Parameters:
fileName (str, optional) – file to read, by default “”
string (str, optional) – string to convert, by default “”
ReadRefsAsField (bool, optional) – if true two extra fields will be preset (at the nodes and the elements) with the name “refs” if false the values of the refs will be converted tags, using the prefix NTag or ETag plus the number of the ref, by default False
- Returns:
The mesh with the field present in the file
- Return type: