#include <GmshMeshReader.hpp>
Inherits AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
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 | |||
) | [inline] |
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 | ( | ) | [inline] |
Destructor
Definition at line 78 of file GmshMeshReader.cpp.
References GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles().
void GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles | ( | ) | [inline, private] |
Closes the .msh file descriptors
Definition at line 97 of file GmshMeshReader.cpp.
References GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementFile, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mFaceFile, and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodeFile.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::~GmshMeshReader().
ElementData GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData | ( | unsigned | index | ) | [inline, 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 454 of file GmshMeshReader.cpp.
References NEVER_REACHED.
ElementData GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetFaceData | ( | unsigned | index | ) | [inline, 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 460 of file GmshMeshReader.cpp.
References NEVER_REACHED.
ElementData GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextCableElementData | ( | ) | [inline, virtual] |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 388 of file GmshMeshReader.cpp.
References NEVER_REACHED.
ElementData GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData | ( | ) | [inline, virtual] |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 334 of file GmshMeshReader.cpp.
References ElementData::AttributeValue, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementFile, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes, and ElementData::NodeIndices.
ElementData GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData | ( | ) | [inline, virtual] |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 394 of file GmshMeshReader.cpp.
References ElementData::AttributeValue, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mFaceFile, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerBoundaryElement, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaceAttributes, and ElementData::NodeIndices.
std::vector< double > GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode | ( | ) | [inline, virtual] |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 307 of file GmshMeshReader.cpp.
References GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodeFile.
std::vector< double > GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNode | ( | unsigned | index | ) | [inline, 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 448 of file GmshMeshReader.cpp.
References NEVER_REACHED.
std::vector< double > GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNodeAttributes | ( | ) | [inline, virtual] |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 328 of file GmshMeshReader.cpp.
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumCableElementAttributes | ( | ) | const [inline, virtual] |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 290 of file GmshMeshReader.cpp.
References NEVER_REACHED.
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumCableElements | ( | ) | const [inline, virtual] |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 259 of file GmshMeshReader.cpp.
References NEVER_REACHED.
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElementAttributes | ( | ) | const [inline, virtual] |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 278 of file GmshMeshReader.cpp.
References GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes.
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements | ( | ) | const [inline, virtual] |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 241 of file GmshMeshReader.cpp.
References GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements.
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaceAttributes | ( | ) | const [inline, virtual] |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 284 of file GmshMeshReader.cpp.
References GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaceAttributes.
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaces | ( | ) | const [inline, virtual] |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 253 of file GmshMeshReader.cpp.
References GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaces.
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes | ( | ) | const [inline, virtual] |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 247 of file GmshMeshReader.cpp.
References GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes.
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOrderOfBoundaryElements | ( | ) | [inline, virtual] |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 272 of file GmshMeshReader.cpp.
References GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mOrderOfBoundaryElements.
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOrderOfElements | ( | ) | [inline, virtual] |
*
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 266 of file GmshMeshReader.cpp.
References GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mOrderOfElements.
void GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles | ( | ) | [inline, private] |
Opens the .msh file descriptors
Definition at line 84 of file GmshMeshReader.cpp.
References EXCEPTION, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementFile, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mFaceFile, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mFileName, and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodeFile.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GmshMeshReader(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().
void GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadElementHeader | ( | ) | [inline, private] |
Read the element header from the mesh file.
Definition at line 157 of file GmshMeshReader.cpp.
References GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementFile, and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
void GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadFaceHeader | ( | ) | [inline, private] |
Read the face header from the mesh file.
Definition at line 199 of file GmshMeshReader.cpp.
References GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mFaceFile, and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaces.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
void GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders | ( | ) | [inline, private] |
Read all the header information from the mesh file.
Definition at line 106 of file GmshMeshReader.cpp.
References EXCEPTION, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mDataSize, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mFileType, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodeFile, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mVersionNumber, GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadElementHeader(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadFaceHeader(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadNodeHeader().
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GmshMeshReader(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().
void GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadNodeHeader | ( | ) | [inline, private] |
Read the node header from the mesh file.
Definition at line 139 of file GmshMeshReader.cpp.
References GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodeFile, and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
void GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset | ( | ) | [inline, virtual] |
Resets pointers to beginning
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 298 of file GmshMeshReader.cpp.
References GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mDataSize [private] |
The number of floating point numbers in the file
Definition at line 186 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
std::ifstream GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementFile [private] |
A file stream used to read the volume elements of the file.
Definition at line 182 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadElementHeader().
std::ifstream GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mFaceFile [private] |
A file stream used to read the boundary elements of the file.
Definition at line 183 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadFaceHeader().
std::string GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mFileName [private] |
The name of the mesh file.
Definition at line 180 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles().
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mFileType [private] |
The type of the mesh file being read (should always be 0)
Definition at line 185 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
std::ifstream GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodeFile [private] |
A file stream used to read the node (and header) part of the file.
Definition at line 181 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadNodeHeader().
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerBoundaryElement [private] |
The number of nodes contained in each boundary element.
Definition at line 195 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GmshMeshReader().
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement [private] |
The number of nodes contained in each element.
Definition at line 194 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GmshMeshReader().
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes [private] |
Is the number of attributes stored for each element.
Definition at line 190 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElementAttributes().
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements [private] |
Number of elements in the mesh.
Definition at line 188 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadElementHeader().
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaceAttributes [private] |
Is the number of attributes stored for each face.
Definition at line 191 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaceAttributes().
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaces [private] |
Number of faces in the mesh.
Definition at line 189 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaces(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadFaceHeader().
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes [private] |
Number of nodes in the mesh.
Definition at line 187 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadNodeHeader().
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mOrderOfBoundaryElements [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 >::GetOrderOfBoundaryElements(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GmshMeshReader().
unsigned GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mOrderOfElements [private] |
The order of each element (1 for linear, 2 for quadratic).
Definition at line 192 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOrderOfElements(), and GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GmshMeshReader().
double GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::mVersionNumber [private] |
The version number of the file.
Definition at line 184 of file GmshMeshReader.hpp.
Referenced by GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().