#include <VertexMeshReader.hpp>
Public Member Functions | |
VertexMeshReader (std::string pathBaseName) | |
~VertexMeshReader () | |
unsigned | GetNumElements () const |
unsigned | GetNumNodes () const |
unsigned | GetNumElementAttributes () const |
unsigned | GetNumFaces () const |
ElementData | GetNextFaceData () |
unsigned | GetNumEdges () const |
void | Reset () |
std::vector< double > | GetNextNode () |
ElementData | GetNextElementData () |
VertexElementData | GetNextElementDataWithFaces () |
Private Member Functions | |
void | OpenFiles () |
void | OpenNodeFile () |
void | OpenElementsFile () |
void | ReadHeaders () |
void | CloseFiles () |
void | GetNextLineFromStream (std::ifstream &fileStream, std::string &rawLine) |
Private Attributes | |
std::string | mFilesBaseName |
std::ifstream | mNodesFile |
std::ifstream | mElementsFile |
bool | mIndexFromZero |
unsigned | mNumNodes |
unsigned | mNumElements |
unsigned | mNodesRead |
unsigned | mElementsRead |
unsigned | mNumNodeAttributes |
unsigned | mNumElementAttributes |
Definition at line 56 of file VertexMeshReader.hpp.
VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::VertexMeshReader | ( | std::string | pathBaseName | ) | [inline] |
Constructor.
pathBaseName | the base name for results files |
Definition at line 35 of file VertexMeshReader.cpp.
References VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::~VertexMeshReader | ( | ) | [inline] |
Destructor.
Definition at line 135 of file VertexMeshReader.hpp.
void VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles | ( | ) | [inline, private] |
Open node and element files.
Definition at line 268 of file VertexMeshReader.cpp.
References VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenElementsFile(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile().
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::VertexMeshReader().
void VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile | ( | ) | [inline, private] |
Open node file.
Definition at line 275 of file VertexMeshReader.cpp.
References EXCEPTION, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesBaseName, and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesFile.
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
void VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenElementsFile | ( | ) | [inline, private] |
Open element file.
Definition at line 287 of file VertexMeshReader.cpp.
References EXCEPTION, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile, and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesBaseName.
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles().
void VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders | ( | ) | [inline, private] |
Read the file headers to determine node and element numbers and attributes.
Definition at line 301 of file VertexMeshReader.cpp.
References VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesFile, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodeAttributes, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes, and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile().
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::VertexMeshReader().
void VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles | ( | ) | [inline, private] |
Close node and element files.
Definition at line 330 of file VertexMeshReader.cpp.
References VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile, and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesFile.
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().
void VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream | ( | std::ifstream & | fileStream, | |
std::string & | rawLine | |||
) | [inline, private] |
Get the next line from a given file stream.
fileStream | the file stream | |
rawLine | the raw line (may contain comments) |
Definition at line 337 of file VertexMeshReader.cpp.
References EXCEPTION.
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementDataWithFaces(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements | ( | ) | const [inline, virtual] |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 49 of file VertexMeshReader.cpp.
References VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements.
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes | ( | ) | const [inline, virtual] |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 55 of file VertexMeshReader.cpp.
References VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes.
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElementAttributes | ( | ) | const [inline, virtual] |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 61 of file VertexMeshReader.cpp.
References VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes.
unsigned VertexMeshReader< 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 67 of file VertexMeshReader.cpp.
ElementData VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData | ( | ) | [inline, virtual] |
Returns a vector of the nodes of each face in turn.
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 74 of file VertexMeshReader.cpp.
References ElementData::AttributeValue, and ElementData::NodeIndices.
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumEdges | ( | ) | const [inline] |
Returns the number of edges in the mesh (synonym of GetNumFaces())
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 84 of file VertexMeshReader.cpp.
void VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset | ( | ) | [inline, virtual] |
Reset pointers to beginning.
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 91 of file VertexMeshReader.cpp.
References VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsRead, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesRead, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
std::vector< double > VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode | ( | ) | [inline, virtual] |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 102 of file VertexMeshReader.cpp.
References EXCEPTION, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesFile, and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesRead.
ElementData VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData | ( | ) | [inline, virtual] |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 134 of file VertexMeshReader.cpp.
References ElementData::AttributeValue, EXCEPTION, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsRead, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes, and ElementData::NodeIndices.
VertexElementData VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementDataWithFaces | ( | ) | [inline] |
Definition at line 185 of file VertexMeshReader.cpp.
References VertexElementData::AttributeValue, ElementData::AttributeValue, EXCEPTION, VertexElementData::Faces, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsRead, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero, VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes, ElementData::NodeIndices, and VertexElementData::NodeIndices.
std::string VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesBaseName [private] |
The base name for mesh files.
Definition at line 61 of file VertexMeshReader.hpp.
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenElementsFile(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile().
std::ifstream VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesFile [private] |
The nodes file for the mesh.
Definition at line 64 of file VertexMeshReader.hpp.
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
std::ifstream VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile [private] |
The elements file for the mesh.
Definition at line 67 of file VertexMeshReader.hpp.
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementDataWithFaces(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenElementsFile(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
bool VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero [private] |
True if input data is numbered from zero, false otherwise.
Definition at line 70 of file VertexMeshReader.hpp.
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementDataWithFaces(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes [private] |
Number of nodes in the mesh.
Definition at line 73 of file VertexMeshReader.hpp.
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements [private] |
Number of elements in the mesh.
Definition at line 76 of file VertexMeshReader.hpp.
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesRead [private] |
Number of nodes read in by the reader.
Definition at line 79 of file VertexMeshReader.hpp.
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsRead [private] |
Number of elements read in by the reader.
Definition at line 82 of file VertexMeshReader.hpp.
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementDataWithFaces(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodeAttributes [private] |
Is the number of attributes stored at each node.
Definition at line 85 of file VertexMeshReader.hpp.
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes [private] |
Is the number of attributes stored for each element.
Definition at line 88 of file VertexMeshReader.hpp.
Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementDataWithFaces(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElementAttributes(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().