Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
|
#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 76 of file GmshMeshReader.cpp.
|
private |
Closes the .msh file descriptors
Definition at line 95 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 472 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 480 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 347 of file GmshMeshReader.cpp.
References ElementData::AttributeValue, and ElementData::NodeIndices.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 409 of file GmshMeshReader.cpp.
References ElementData::AttributeValue, and ElementData::NodeIndices.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 320 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 464 of file GmshMeshReader.cpp.
References NEVER_REACHED.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 341 of file GmshMeshReader.cpp.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 303 of file GmshMeshReader.cpp.
References NEVER_REACHED.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 270 of file GmshMeshReader.cpp.
References NEVER_REACHED.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 290 of file GmshMeshReader.cpp.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 251 of file GmshMeshReader.cpp.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 296 of file GmshMeshReader.cpp.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 263 of file GmshMeshReader.cpp.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 257 of file GmshMeshReader.cpp.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 284 of file GmshMeshReader.cpp.
|
virtual |
*
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 278 of file GmshMeshReader.cpp.
|
private |
Opens the .msh file descriptors
Definition at line 82 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 164 of file GmshMeshReader.cpp.
|
private |
Read the face header from the mesh file.
Definition at line 209 of file GmshMeshReader.cpp.
|
private |
Read all the header information from the mesh file.
Definition at line 103 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 146 of file GmshMeshReader.cpp.
|
virtual |
Resets pointers to beginning
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 311 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.