BasicTools.IO.MeshReader module
Mesh file reader
- class BasicTools.IO.MeshReader.MeshReader[source]
Bases:
ReaderBaseMesh Reader class
- Read(out=None)[source]
Function that performs the reading of a Mesh file
- Parameters:
out (UnstructuredMesh, optional) – output unstructured mesh object containing reading result, by default None
- Returns:
output unstructured mesh object containing reading result
- Return type:
- 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 (UnstructuredMesh, optional) – output unstructured mesh object containing reading result, by default None
- Returns:
output unstructured mesh object containing reading result
- Return type:
- ReadMeshBinary(out=None)[source]
Function that performs the reading of a binary Mesh file
- Parameters:
out (UnstructuredMesh, optional) – output unstructured mesh object containing reading result, by default None
- Returns:
output unstructured mesh object containing reading result
- Return type:
- class BasicTools.IO.MeshReader.MeshSolutionReaderWrapper[source]
Bases:
objectClass to handle a solution file associated to a Mesh file
- Read(out=None)[source]
Function that performs the reading of a solution file associated to a Mesh file
- Parameters:
out (UnstructuredMesh, optional) – output unstructured mesh object containing reading result, by default None
- Returns:
output unstructured mesh object containing reading result
- Return type:
- BasicTools.IO.MeshReader.ReadMesh(fileName: str | None = None, string: str | None = None, ReadRefsAsField: bool = False) UnstructuredMesh[source]
Function API for reading a Mesh file
- Parameters:
fileName (str, optional) – file to read, by default None
string (str, optional) – string to convert, by default None
ReadRefsAsField (bool, optional) – if true the two fiels will be preset (at the nodes and element) with the nbame 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:
- BasicTools.IO.MeshReader.ReadSol(fileName, out=None)[source]
Function API for reading a solution file associated to a Mesh file
- Parameters:
fileName (str, optional) – file to read, 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: