Chaste Release::3.1
|
#include <SemMeshReader.hpp>
Public Member Functions | |
SemMeshReader (std::string pathBaseName) | |
~SemMeshReader () | |
unsigned | GetNumElements () const |
unsigned | GetNumNodes () const |
unsigned | GetNumElementAttributes () const |
unsigned | GetNumFaces () const |
ElementData | GetNextFaceData () |
void | Reset () |
std::vector< double > | GetNextNode () |
ElementData | GetNextElementData () |
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 |
A mesh reader class for potts-based meshes. So far implemented in 2D only.
Definition at line 62 of file SemMeshReader.hpp.
SemMeshReader< SPACE_DIM >::SemMeshReader | ( | std::string | pathBaseName | ) |
Constructor.
pathBaseName | the base name for results files |
Definition at line 42 of file SemMeshReader.cpp.
References SemMeshReader< SPACE_DIM >::OpenFiles(), and SemMeshReader< SPACE_DIM >::ReadHeaders().
SemMeshReader< SPACE_DIM >::~SemMeshReader | ( | ) | [inline] |
Destructor.
Definition at line 141 of file SemMeshReader.hpp.
void SemMeshReader< SPACE_DIM >::CloseFiles | ( | ) | [private] |
Close node and element files.
Definition at line 242 of file SemMeshReader.cpp.
ElementData SemMeshReader< SPACE_DIM >::GetNextElementData | ( | ) | [virtual] |
Implements AbstractMeshReader< SPACE_DIM, SPACE_DIM >.
Definition at line 132 of file SemMeshReader.cpp.
References ElementData::AttributeValue, EXCEPTION, and ElementData::NodeIndices.
ElementData SemMeshReader< SPACE_DIM >::GetNextFaceData | ( | ) | [virtual] |
Returns a vector of the nodes of each face in turn.
Implements AbstractMeshReader< SPACE_DIM, SPACE_DIM >.
Definition at line 74 of file SemMeshReader.cpp.
References ElementData::AttributeValue, and ElementData::NodeIndices.
void SemMeshReader< SPACE_DIM >::GetNextLineFromStream | ( | std::ifstream & | fileStream, |
std::string & | rawLine | ||
) | [private] |
Get the next line from a given file stream.
fileStream | the file stream |
rawLine | the raw line (may contain comments) |
Definition at line 249 of file SemMeshReader.cpp.
References EXCEPTION.
std::vector< double > SemMeshReader< SPACE_DIM >::GetNextNode | ( | ) | [virtual] |
Implements AbstractMeshReader< SPACE_DIM, SPACE_DIM >.
Definition at line 102 of file SemMeshReader.cpp.
References EXCEPTION.
unsigned SemMeshReader< SPACE_DIM >::GetNumElementAttributes | ( | ) | const [virtual] |
Reimplemented from AbstractMeshReader< SPACE_DIM, SPACE_DIM >.
Definition at line 68 of file SemMeshReader.cpp.
unsigned SemMeshReader< SPACE_DIM >::GetNumElements | ( | ) | const [virtual] |
Implements AbstractMeshReader< SPACE_DIM, SPACE_DIM >.
Definition at line 56 of file SemMeshReader.cpp.
unsigned SemMeshReader< SPACE_DIM >::GetNumFaces | ( | ) | const [virtual] |
Returns the number of faces in the mesh (synonym of GetNumEdges()).
Implements AbstractMeshReader< SPACE_DIM, SPACE_DIM >.
Definition at line 84 of file SemMeshReader.cpp.
unsigned SemMeshReader< SPACE_DIM >::GetNumNodes | ( | ) | const [virtual] |
Implements AbstractMeshReader< SPACE_DIM, SPACE_DIM >.
Definition at line 62 of file SemMeshReader.cpp.
void SemMeshReader< SPACE_DIM >::OpenElementsFile | ( | ) | [private] |
void SemMeshReader< SPACE_DIM >::OpenFiles | ( | ) | [private] |
Open node and element files.
Definition at line 180 of file SemMeshReader.cpp.
Referenced by SemMeshReader< SPACE_DIM >::SemMeshReader().
void SemMeshReader< SPACE_DIM >::OpenNodeFile | ( | ) | [private] |
void SemMeshReader< SPACE_DIM >::ReadHeaders | ( | ) | [private] |
Read the file headers to determine node and element numbers and attributes.
Definition at line 213 of file SemMeshReader.cpp.
Referenced by SemMeshReader< SPACE_DIM >::SemMeshReader().
void SemMeshReader< SPACE_DIM >::Reset | ( | ) | [virtual] |
Reset pointers to beginning.
Implements AbstractMeshReader< SPACE_DIM, SPACE_DIM >.
Definition at line 91 of file SemMeshReader.cpp.
std::ifstream SemMeshReader< SPACE_DIM >::mElementsFile [private] |
The elements file for the mesh.
Definition at line 73 of file SemMeshReader.hpp.
unsigned SemMeshReader< SPACE_DIM >::mElementsRead [private] |
Number of elements read in by the reader.
Definition at line 88 of file SemMeshReader.hpp.
std::string SemMeshReader< SPACE_DIM >::mFilesBaseName [private] |
The base name for mesh files.
Definition at line 67 of file SemMeshReader.hpp.
bool SemMeshReader< SPACE_DIM >::mIndexFromZero [private] |
True if input data is numbered from zero, false otherwise.
Definition at line 76 of file SemMeshReader.hpp.
std::ifstream SemMeshReader< SPACE_DIM >::mNodesFile [private] |
The nodes file for the mesh.
Definition at line 70 of file SemMeshReader.hpp.
unsigned SemMeshReader< SPACE_DIM >::mNodesRead [private] |
Number of nodes read in by the reader.
Definition at line 85 of file SemMeshReader.hpp.
unsigned SemMeshReader< SPACE_DIM >::mNumElementAttributes [private] |
Is the number of attributes stored for each element.
Definition at line 94 of file SemMeshReader.hpp.
unsigned SemMeshReader< SPACE_DIM >::mNumElements [private] |
Number of elements in the mesh.
Definition at line 82 of file SemMeshReader.hpp.
unsigned SemMeshReader< SPACE_DIM >::mNumNodeAttributes [private] |
Is the number of attributes stored at each node.
Definition at line 91 of file SemMeshReader.hpp.
unsigned SemMeshReader< SPACE_DIM >::mNumNodes [private] |
Number of nodes in the mesh.
Definition at line 79 of file SemMeshReader.hpp.