Chaste
Release::3.4
|
#include <FemlabMeshReader.hpp>
Private Member Functions | |
std::vector< std::vector < double > > | TokenizeStringsToDoubles (const std::vector< std::string > &rRawData) |
std::vector< std::vector < unsigned > > | TokenizeStringsToInts (const std::vector< std::string > &rRawData, unsigned dimensionOfObject) |
Additional Inherited Members | |
Protected Member Functions inherited from AbstractCachedMeshReader< ELEMENT_DIM, SPACE_DIM > | |
std::vector< std::string > | GetRawDataFromFile (const std::string &rFileName) |
Protected Attributes inherited from AbstractCachedMeshReader< ELEMENT_DIM, SPACE_DIM > | |
unsigned | mNumNodeAttributes |
unsigned | mMaxNodeBdyMarker |
unsigned | mNumElementNodes |
unsigned | mNumElementAttributes |
unsigned | mMaxFaceBdyMarker |
std::vector< std::string > | mNodeRawData |
std::vector< std::string > | mElementRawData |
std::vector< std::string > | mFaceRawData |
std::vector< std::vector < double > > | mNodeData |
std::vector< std::vector < unsigned > > | mElementData |
std::vector< std::vector < unsigned > > | mFaceData |
std::vector< std::vector < double > >::iterator | mpNodeIterator |
std::vector< std::vector < unsigned > >::iterator | mpElementIterator |
std::vector< std::vector < unsigned > >::iterator | mpFaceIterator |
bool | mIndexFromZero |
Concrete version of the AbstractCachedMeshReader class. A FemlabMeshReader takes the file names of a set of Femlab mesh files. Once constructed the public methods of the AbstractCachedMeshReader (std::vector<double> GetNextNode(); etc) can be called to interrogate the data
Definition at line 49 of file FemlabMeshReader.hpp.
FemlabMeshReader< ELEMENT_DIM, SPACE_DIM >::FemlabMeshReader | ( | const std::string & | rPathBaseName, |
const std::string & | rNodeFileName, | ||
const std::string & | rElementFileName, | ||
const std::string & | rEdgeFileName | ||
) |
The constructor takes the path to and names of a set of Femlab mesh files (ie. the nodes, elements and faces files (in that order) and allows the data to be queried. Typical use: AbstractMeshReader* pMeshReader = new FemlabMeshReader("pdes/tests/meshdata/", "femlab_lshape_nodes.dat", "femlab_lshape_elements.dat", "femlab_lshape_edges.dat",);
rPathBaseName | the base name of the files from which to read the mesh data |
rNodeFileName | the name of the nodes file |
rElementFileName | the name of the elements file |
rEdgeFileName | the name of the edges file |
Definition at line 46 of file FemlabMeshReader.cpp.
|
virtual |
Destructor
Definition at line 86 of file FemlabMeshReader.cpp.
|
private |
TokenizeStringsToDoubles is specific to reading node data which came from a Femlab or Matlab PDE toolbox file.
Each string is expected to be a series of doubles.
rRawData | the node data to be read |
Definition at line 91 of file FemlabMeshReader.cpp.
References EXCEPTION.
|
private |
TokenizeStringsToInts is for reading element, face or edge data which came from a Femlab or Matlab PDE toolbox file. Each string is expected to be a series of unsigned which represent: The first several lines denote the indices of nodes The rest contains extra information which are ignored currently. ( In 2-D: 2 indices for an edge, 3 for a triangle) ( In 3-D: 3 indices for a face, 4 for a tetrahedron)
rRawData | the element, face or edge data to be read |
dimensionOfObject | the number of lines of data to be read |
Definition at line 143 of file FemlabMeshReader.cpp.