#include <TrianglesMeshReader.hpp>
Public Member Functions | |
TrianglesMeshReader (std::string pathBaseName, unsigned orderOfElements=1, unsigned orderOfBoundaryElements=1, bool readContainingElementsForBoundaryElements=false) | |
~TrianglesMeshReader () | |
unsigned | GetNumElements () const |
unsigned | GetNumNodes () const |
unsigned | GetNumFaces () const |
unsigned | GetNumElementAttributes () const |
unsigned | GetNumFaceAttributes () const |
void | Reset () |
std::vector< double > | GetNextNode () |
ElementData | GetNextElementData () |
ElementData | GetNextFaceData () |
unsigned | GetOrderOfElements () |
unsigned | GetOrderOfBoundaryElements () |
bool | GetReadContainingElementOfBoundaryElement () |
std::vector< double > | GetNode (unsigned index) |
ElementData | GetElementData (unsigned index) |
ElementData | GetFaceData (unsigned index) |
bool | IsFileFormatBinary () |
void | SetReadBufferSize (unsigned bufferSize) |
Private Member Functions | |
void | OpenFiles () |
void | OpenNodeFile () |
void | OpenElementsFile () |
void | OpenFacesFile () |
void | ReadHeaders () |
void | CloseFiles () |
void | GetNextLineFromStream (std::ifstream &rFileStream, std::string &rRawLine) |
template<class T> | |
void | GetNextItemFromStream (std::ifstream &rFileStream, unsigned expectedItemNumber, std::vector< T > &rDataPacket, const unsigned &rNumAttributes, unsigned &rAttribute) |
std::string | GetMeshFileBaseName () |
void | GetOneDimBoundary () |
void | EnsureIndexingFromZero (std::vector< unsigned > &rNodeIndices) |
Private Attributes | |
bool | mIndexFromZero |
std::string | mFilesBaseName |
std::ifstream | mNodesFile |
std::ifstream | mElementsFile |
std::ifstream | mFacesFile |
std::streampos | mNodeFileDataStart |
std::streamoff | mNodeItemWidth |
std::streampos | mElementFileDataStart |
std::streamoff | mElementItemWidth |
std::streampos | mFaceFileDataStart |
std::streamoff | mFaceItemWidth |
unsigned | mNumNodes |
unsigned | mNumElements |
unsigned | mNumFaces |
unsigned | mNodesRead |
unsigned | mElementsRead |
unsigned | mFacesRead |
unsigned | mBoundaryFacesRead |
std::vector< unsigned > | mOneDimBoundary |
unsigned | mNumNodeAttributes |
unsigned | mMaxNodeBdyMarker |
unsigned | mNumElementNodes |
unsigned | mNumElementAttributes |
unsigned | mNumFaceAttributes |
unsigned | mOrderOfElements |
unsigned | mOrderOfBoundaryElements |
unsigned | mNodesPerElement |
unsigned | mNodesPerBoundaryElement |
bool | mEofException |
bool | mReadContainingElementOfBoundaryElement |
bool | mFilesAreBinary |
bool | mMeshIsHexahedral |
char * | mNodeFileReadBuffer |
char * | mElementFileReadBuffer |
char * | mFaceFileReadBuffer |
Definition at line 45 of file TrianglesMeshReader.hpp.
TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::TrianglesMeshReader | ( | std::string | pathBaseName, | |
unsigned | orderOfElements = 1 , |
|||
unsigned | orderOfBoundaryElements = 1 , |
|||
bool | readContainingElementsForBoundaryElements = false | |||
) | [inline] |
The containing element for each boundary element (obtaining by doing tetgen with the -nn flag). In a std::vector rather than the struct to save space if not read. 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 (Note tetgen with the -o2 flag creates quadratic elements but doesn't create quadratic faces, hence the need for this third parameter) | |
readContainingElementsForBoundaryElements | Whether to read in the containing element infomation for each boundary element (in the .face file if tetgen was run with '-nn'). |
Definition at line 45 of file TrianglesMeshReader.cpp.
References EXCEPTION, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerBoundaryElement, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mOrderOfBoundaryElements, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mOrderOfElements, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mReadContainingElementOfBoundaryElement, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::~TrianglesMeshReader | ( | ) | [inline] |
Destructor
Definition at line 109 of file TrianglesMeshReader.cpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementFileReadBuffer, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFaceFileReadBuffer, and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodeFileReadBuffer.
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements | ( | ) | const [inline, virtual] |
Returns the number of elements in the mesh
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 117 of file TrianglesMeshReader.cpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements.
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes | ( | ) | const [inline, virtual] |
Returns the number of nodes in the mesh
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 123 of file TrianglesMeshReader.cpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes.
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaces | ( | ) | const [inline, virtual] |
Returns the number of faces in the mesh (synonym of GetNumEdges())
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 129 of file TrianglesMeshReader.cpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaces.
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElementAttributes | ( | ) | const [inline, virtual] |
Returns the number of attributes in the mesh
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 136 of file TrianglesMeshReader.cpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes.
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaceAttributes | ( | ) | const [inline, virtual] |
Returns the number of attributes in the mesh
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 142 of file TrianglesMeshReader.cpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaceAttributes.
void TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset | ( | ) | [inline, virtual] |
Resets pointers to beginning
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 148 of file TrianglesMeshReader.cpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mBoundaryFacesRead, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsRead, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mEofException, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFacesRead, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesRead, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
Referenced by QuadraticMesh< DIM >::AddNodesToBoundaryElements(), and QuadraticMesh< DIM >::ConstructFromMeshReader().
std::vector< double > TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode | ( | ) | [inline, virtual] |
Returns a vector of the coordinates of each node in turn
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 163 of file TrianglesMeshReader.cpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextItemFromStream(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesFile, and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesRead.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNode().
ElementData TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData | ( | ) | [inline, virtual] |
Returns a vector of the nodes of each element (and any attribute infomation, if there is any) in turn
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 177 of file TrianglesMeshReader.cpp.
References ElementData::AttributeValue, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::EnsureIndexingFromZero(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextItemFromStream(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsRead, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes, and ElementData::NodeIndices.
Referenced by QuadraticMesh< DIM >::ConstructFromMeshReader(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData().
ElementData TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData | ( | ) | [inline, virtual] |
Returns a vector of the nodes of each face in turn (synonym of GetNextEdgeData())
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 192 of file TrianglesMeshReader.cpp.
References ElementData::AttributeValue, ElementData::ContainingElement, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::EnsureIndexingFromZero(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextItemFromStream(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mBoundaryFacesRead, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFacesFile, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFacesRead, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerBoundaryElement, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaceAttributes, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mOneDimBoundary, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mReadContainingElementOfBoundaryElement, and ElementData::NodeIndices.
Referenced by QuadraticMesh< DIM >::AddNodesToBoundaryElements(), QuadraticMesh< DIM >::ConstructFromMeshReader(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetFaceData(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOrderOfElements | ( | ) | [inline] |
Definition at line 156 of file TrianglesMeshReader.hpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mOrderOfElements.
Referenced by QuadraticMesh< DIM >::ConstructFromMeshReader().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOrderOfBoundaryElements | ( | ) | [inline] |
Definition at line 163 of file TrianglesMeshReader.hpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mOrderOfBoundaryElements.
Referenced by QuadraticMesh< DIM >::ConstructFromMeshReader().
bool TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetReadContainingElementOfBoundaryElement | ( | ) | [inline] |
Definition at line 171 of file TrianglesMeshReader.hpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mReadContainingElementOfBoundaryElement.
Referenced by QuadraticMesh< DIM >::AddNodesToBoundaryElements().
std::vector< double > TrianglesMeshReader< 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 237 of file TrianglesMeshReader.cpp.
References EXCEPTION, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesAreBinary, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodeFileDataStart, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodeItemWidth, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesFile, and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes.
ElementData TrianglesMeshReader< 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 254 of file TrianglesMeshReader.cpp.
References EXCEPTION, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementFileDataStart, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementItemWidth, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesAreBinary, and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements.
ElementData TrianglesMeshReader< 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 272 of file TrianglesMeshReader.cpp.
References EXCEPTION, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFaceFileDataStart, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFaceItemWidth, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFacesFile, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesAreBinary, and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaces.
bool TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::IsFileFormatBinary | ( | ) | [inline, virtual] |
Returns true if reading binary files, false if reading ascii files.
Note, this will always return false unless over-ridden by a derived class that is able to support binary file formats.
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 697 of file TrianglesMeshReader.cpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesAreBinary.
void TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::SetReadBufferSize | ( | unsigned | bufferSize | ) | [inline] |
Sets size of std:ifstream internal read buffer. Use it for tuning I/O.
bufferSize | The size of the read buffer in bytes. |
Definition at line 703 of file TrianglesMeshReader.cpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementFileReadBuffer, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFaceFileReadBuffer, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFacesFile, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodeFileReadBuffer, and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesFile.
void TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles | ( | ) | [inline, private] |
Open mesh files.
Definition at line 289 of file TrianglesMeshReader.cpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenElementsFile(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFacesFile(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile().
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::TrianglesMeshReader().
void TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile | ( | ) | [inline, private] |
Open node file.
Definition at line 297 of file TrianglesMeshReader.cpp.
References EXCEPTION, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesBaseName, and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesFile.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
void TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenElementsFile | ( | ) | [inline, private] |
Open elements file.
Definition at line 309 of file TrianglesMeshReader.cpp.
References EXCEPTION, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile, and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesBaseName.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOneDimBoundary(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles().
void TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFacesFile | ( | ) | [inline, private] |
Open faces file.
Definition at line 341 of file TrianglesMeshReader.cpp.
References EXCEPTION, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFacesFile, and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesBaseName.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
void TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders | ( | ) | [inline, private] |
Read the header from each mesh file.
Definition at line 367 of file TrianglesMeshReader.cpp.
References EXCEPTION, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOneDimBoundary(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mBoundaryFacesRead, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementFileDataStart, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementItemWidth, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mEofException, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFaceFileDataStart, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFaceItemWidth, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFacesFile, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFacesRead, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesAreBinary, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mMaxNodeBdyMarker, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mMeshIsHexahedral, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodeFileDataStart, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodeItemWidth, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesFile, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerBoundaryElement, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementNodes, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaceAttributes, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaces, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodeAttributes, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mOneDimBoundary, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mOrderOfElements, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFacesFile(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile().
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::TrianglesMeshReader().
void TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles | ( | ) | [inline, private] |
Close mesh files.
Definition at line 553 of file TrianglesMeshReader.cpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFacesFile, and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesFile.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().
void TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream | ( | std::ifstream & | rFileStream, | |
std::string & | rRawLine | |||
) | [inline, private] |
Read in the next line.
rFileStream | The file to read from | |
rRawLine | Will be filled in with the next line |
Definition at line 561 of file TrianglesMeshReader.cpp.
References EXCEPTION, and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mEofException.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextItemFromStream(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOneDimBoundary(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
void TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextItemFromStream | ( | std::ifstream & | rFileStream, | |
unsigned | expectedItemNumber, | |||
std::vector< T > & | rDataPacket, | |||
const unsigned & | rNumAttributes, | |||
unsigned & | rAttribute | |||
) | [inline, private] |
Returns the Item details from the next line via a call to GetNextLineFromStream()
rFileStream | The file to read from | |
expectedItemNumber | To check file syntax, what item is expected to be on the next line. | |
rDataPacket | Assumed to be of the right size but is allowed to contain dirty data on entry. | |
rNumAttributes | The number of attributes per item that we expect to read. Either mNumFaceAttributes or mNumElementAttributes. | |
rAttribute | Will be given the attribute value if rNumAttributes > 0, otherwise UNSET. |
Definition at line 584 of file TrianglesMeshReader.cpp.
References EXCEPTION, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesAreBinary, and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOneDimBoundary().
std::string TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetMeshFileBaseName | ( | ) | [inline, private, virtual] |
Get method for mFilesBaseName.
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 633 of file TrianglesMeshReader.cpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesBaseName.
void TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOneDimBoundary | ( | ) | [inline, private] |
Get method specialized to 1D meshes
Definition at line 640 of file TrianglesMeshReader.cpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextItemFromStream(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes, TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mOneDimBoundary, and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenElementsFile().
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
void TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::EnsureIndexingFromZero | ( | std::vector< unsigned > & | rNodeIndices | ) | [inline, private] |
Helper method to ensure we are indexing the nodes from 0 (some files have them indexed from 1) decides according to the property mIndexFromZero
rNodeIndices | The nodes we have read in. |
Definition at line 683 of file TrianglesMeshReader.cpp.
References TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData().
bool TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero [private] |
True if input data is numbered from zero, false otherwise
Definition at line 49 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::EnsureIndexingFromZero(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextItemFromStream(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOneDimBoundary(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::TrianglesMeshReader().
std::string TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesBaseName [private] |
The base name for mesh files.
Definition at line 51 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetMeshFileBaseName(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenElementsFile(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFacesFile(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile().
std::ifstream TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesFile [private] |
The nodes file for the mesh.
Definition at line 53 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNode(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::SetReadBufferSize().
std::ifstream TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile [private] |
The elements file for the mesh.
Definition at line 54 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOneDimBoundary(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenElementsFile(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::SetReadBufferSize().
std::ifstream TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFacesFile [private] |
The faces (edges) file for the mesh.
Definition at line 55 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetFaceData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFacesFile(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::SetReadBufferSize().
std::streampos TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodeFileDataStart [private] |
The start of the binary data
Definition at line 56 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNode(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
std::streamoff TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodeItemWidth [private] |
The number of bytes in a line of the node file
Definition at line 57 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNode(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
std::streampos TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementFileDataStart [private] |
The start of the binary element data
Definition at line 58 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
std::streamoff TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementItemWidth [private] |
The number of bytes in a line of the element file
Definition at line 59 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
std::streampos TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFaceFileDataStart [private] |
The start of the binary face data
Definition at line 60 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetFaceData(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
std::streamoff TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFaceItemWidth [private] |
The number of bytes in a line of the face file
Definition at line 61 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetFaceData(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes [private] |
Number of nodes in the mesh.
Definition at line 63 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNode(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOneDimBoundary(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements [private] |
Number of elements in the mesh.
Definition at line 64 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOneDimBoundary(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaces [private] |
Number of faces in the mesh.
Definition at line 65 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetFaceData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaces(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesRead [private] |
Number of nodes read in.
Definition at line 67 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsRead [private] |
Number of elements read in.
Definition at line 68 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFacesRead [private] |
Number of faces read in.
Definition at line 69 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mBoundaryFacesRead [private] |
Number of boundary faces read in.
Definition at line 70 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().
std::vector<unsigned> TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mOneDimBoundary [private] |
Indices of nodes which are at the boundary of a 1D mesh
Definition at line 71 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOneDimBoundary(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodeAttributes [private] |
Is the number of attributes stored at each node.
Definition at line 73 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mMaxNodeBdyMarker [private] |
Is the maximum node boundary marker.
Definition at line 74 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementNodes [private] |
Is the number of nodes per element.
Definition at line 75 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes [private] |
Is the number of attributes stored for each element.
Definition at line 76 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElementAttributes(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOneDimBoundary(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaceAttributes [private] |
Is the number of attributes stored for each face.
Definition at line 77 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaceAttributes(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mOrderOfElements [private] |
The order of each element (1 for linear, 2 for quadratic).
Definition at line 79 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOrderOfElements(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::TrianglesMeshReader().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mOrderOfBoundaryElements [private] |
The order of each element (1 for linear, 2 for quadratic).
Definition at line 80 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetOrderOfBoundaryElements(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::TrianglesMeshReader().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement [private] |
The number of nodes contained in each element.
Definition at line 81 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::TrianglesMeshReader().
unsigned TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerBoundaryElement [private] |
The number of nodes in each boundary element.
Definition at line 82 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::TrianglesMeshReader().
bool TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mEofException [private] |
Set to true when end-of-file exception is thrown (for use in a try-catch)
Definition at line 84 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().
bool TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mReadContainingElementOfBoundaryElement [private] |
Whether to read containing element info for each boundary element (obtaining by doing tetgen with the -nn flag)
Definition at line 86 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetReadContainingElementOfBoundaryElement(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::TrianglesMeshReader().
bool TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesAreBinary [private] |
Whether to read all data as binary (determined by a magic number in the node file header)
Definition at line 87 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetFaceData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextItemFromStream(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNode(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::IsFileFormatBinary(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
bool TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mMeshIsHexahedral [private] |
Whether the mesh is hexahedral (determined by a magic number in the element file header)
Definition at line 88 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
char* TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodeFileReadBuffer [private] |
Buffer for node file read with std::ifstream
Definition at line 90 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::SetReadBufferSize(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::~TrianglesMeshReader().
char* TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementFileReadBuffer [private] |
Buffer for element file read with std::ifstream
Definition at line 91 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::SetReadBufferSize(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::~TrianglesMeshReader().
char* TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::mFaceFileReadBuffer [private] |
Buffer for face file read with std::ifstream
Definition at line 92 of file TrianglesMeshReader.hpp.
Referenced by TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::SetReadBufferSize(), and TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::~TrianglesMeshReader().