Chaste
Release::3.4
|
#include <GmshMeshReader.hpp>
Private Member Functions | |
void | ReadHeaders () |
void | ReadNodeHeader () |
void | ReadElementHeader () |
void | ReadFaceHeader () |
void | OpenFiles () |
void | CloseFiles () |
Private Attributes | |
std::string | mFileName |
std::ifstream | mNodeFile |
std::ifstream | mElementFile |
std::ifstream | mFaceFile |
double | mVersionNumber |
unsigned | mFileType |
unsigned | mDataSize |
unsigned | mNumNodes |
unsigned | mNumElements |
unsigned | mNumFaces |
unsigned | mTotalNumElementsAndFaces |
unsigned | mNumElementAttributes |
unsigned | mNumFaceAttributes |
unsigned | mOrderOfElements |
unsigned | mOrderOfBoundaryElements |
unsigned | mNodesPerElement |
unsigned | mNodesPerBoundaryElement |
Class to enable reading of Gmsh format mesh files (see #2312).
Definition at line 68 of file GmshMeshReader.hpp.
GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GmshMeshReader | ( | std::string | pathBaseName, |
unsigned | orderOfElements = 1 , |
||
unsigned | orderOfBoundaryElements = 1 |
||
) |
Constructor.
pathBaseName | the base name of the files from which to read the mesh data (either absolute, or relative to the current directory) |
orderOfElements | the order of each element: 1 for linear, 2 for quadratic (defaults to 1) |
orderOfBoundaryElements | the order of each boundary element: 1 for linear, 2 for quadratic (defaults to 1. May or may not be different to orderOfElements |
Definition at line 43 of file GmshMeshReader.cpp.
References GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerBoundaryElement, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mOrderOfBoundaryElements, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mOrderOfElements, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::~GmshMeshReader | ( | ) |
Destructor
Definition at line 78 of file GmshMeshReader.cpp.
|
private |
Closes the .msh file descriptors
Definition at line 97 of file GmshMeshReader.cpp.
|
virtual |
Normally throws an exception. Only implemented for tetrahedral mesh reader of binary files.
index | The global element index |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 468 of file GmshMeshReader.cpp.
References NEVER_REACHED.
|
virtual |
Normally throws an exception. Only implemented for tetrahedral mesh reader of binary files.
index | The global face index |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 474 of file GmshMeshReader.cpp.
References NEVER_REACHED.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 402 of file GmshMeshReader.cpp.
References NEVER_REACHED.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 348 of file GmshMeshReader.cpp.
References ElementData::AttributeValue, and ElementData::NodeIndices.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 408 of file GmshMeshReader.cpp.
References ElementData::AttributeValue, and ElementData::NodeIndices.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 321 of file GmshMeshReader.cpp.
|
virtual |
Normally throws an exception. Only implemented for tetrahedral mesh reader of binary files.
index | The global node index |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 462 of file GmshMeshReader.cpp.
References NEVER_REACHED.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 342 of file GmshMeshReader.cpp.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 304 of file GmshMeshReader.cpp.
References NEVER_REACHED.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 273 of file GmshMeshReader.cpp.
References NEVER_REACHED.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 292 of file GmshMeshReader.cpp.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 255 of file GmshMeshReader.cpp.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 298 of file GmshMeshReader.cpp.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 267 of file GmshMeshReader.cpp.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 261 of file GmshMeshReader.cpp.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 286 of file GmshMeshReader.cpp.
|
virtual |
*
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 280 of file GmshMeshReader.cpp.
|
private |
Opens the .msh file descriptors
Definition at line 84 of file GmshMeshReader.cpp.
References EXCEPTION.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GmshMeshReader().
|
private |
Read the element header from the mesh file.
Definition at line 168 of file GmshMeshReader.cpp.
|
private |
Read the face header from the mesh file.
Definition at line 213 of file GmshMeshReader.cpp.
|
private |
Read all the header information from the mesh file.
Definition at line 106 of file GmshMeshReader.cpp.
References EXCEPTION.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GmshMeshReader().
|
private |
Read the node header from the mesh file.
Definition at line 150 of file GmshMeshReader.cpp.
|
virtual |
Resets pointers to beginning
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 312 of file GmshMeshReader.cpp.
|
private |
The number of floating point numbers in the file
Definition at line 186 of file GmshMeshReader.hpp.
|
private |
A file stream used to read the volume elements of the file.
Definition at line 182 of file GmshMeshReader.hpp.
|
private |
A file stream used to read the boundary elements of the file.
Definition at line 183 of file GmshMeshReader.hpp.
|
private |
The name of the mesh file.
Definition at line 180 of file GmshMeshReader.hpp.
|
private |
The type of the mesh file being read (should always be 0)
Definition at line 185 of file GmshMeshReader.hpp.
|
private |
A file stream used to read the node (and header) part of the file.
Definition at line 181 of file GmshMeshReader.hpp.
|
private |
The number of nodes contained in each boundary element.
Definition at line 196 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GmshMeshReader().
|
private |
The number of nodes contained in each element.
Definition at line 195 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GmshMeshReader().
|
private |
Is the number of attributes stored for each element.
Definition at line 191 of file GmshMeshReader.hpp.
|
private |
Number of elements in the mesh.
Definition at line 188 of file GmshMeshReader.hpp.
|
private |
Is the number of attributes stored for each face.
Definition at line 192 of file GmshMeshReader.hpp.
|
private |
Number of faces in the mesh.
Definition at line 189 of file GmshMeshReader.hpp.
|
private |
Number of nodes in the mesh.
Definition at line 187 of file GmshMeshReader.hpp.
|
private |
The order of each element (1 for linear, 2 for quadratic).
Definition at line 194 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GmshMeshReader().
|
private |
The order of each element (1 for linear, 2 for quadratic).
Definition at line 193 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GmshMeshReader().
|
private |
Total number of elements and faces in the mesh.
Definition at line 190 of file GmshMeshReader.hpp.
|
private |
The version number of the file.
Definition at line 184 of file GmshMeshReader.hpp.