VertexMeshReader< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <VertexMeshReader.hpp>

Inherits AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Collaboration diagram for VertexMeshReader< ELEMENT_DIM, SPACE_DIM >:
Collaboration graph
[legend]

List of all members.

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< doubleGetNextNode ()
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

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class VertexMeshReader< ELEMENT_DIM, SPACE_DIM >

A mesh reader class for vertex-based meshes. So far implemented in 2D only.

Definition at line 44 of file VertexMeshReader.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::VertexMeshReader ( std::string  pathBaseName  )  [inline]

Constructor.

Parameters:
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().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::~VertexMeshReader (  )  [inline]

Destructor.

Definition at line 123 of file VertexMeshReader.hpp.


Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles (  )  [inline, private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ElementData VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData (  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ElementData VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData (  )  [inline, virtual]

Returns a vector of the nodes of each face in turn.

Todo:
Implement this method (#1076)

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 74 of file VertexMeshReader.cpp.

References ElementData::AttributeValue, and ElementData::NodeIndices.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream ( std::ifstream &  fileStream,
std::string &  rawLine 
) [inline, private]

Get the next line from a given file stream.

Parameters:
fileStream the file stream
rawLine the raw line (may contain comments)

Definition at line 251 of file VertexMeshReader.cpp.

Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< double > VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode (  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumEdges (  )  const [inline, virtual]

Returns the number of edges in the mesh (synonym of GetNumFaces())

Todo:
Implement this method (#1076)

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 84 of file VertexMeshReader.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VertexMeshReader< 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 61 of file VertexMeshReader.cpp.

References VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VertexMeshReader< 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 49 of file VertexMeshReader.cpp.

References VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaces (  )  const [inline, virtual]

Returns the number of faces in the mesh (synonym of GetNumEdges()).

Todo:
Implement this method (#1076)

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 67 of file VertexMeshReader.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VertexMeshReader< 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 55 of file VertexMeshReader.cpp.

References VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenElementsFile (  )  [inline, private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles (  )  [inline, private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile (  )  [inline, private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders (  )  [inline, private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset (  )  [inline, virtual]

Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::ifstream VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsRead [private]

Number of elements read in by the reader.

Definition at line 70 of file VertexMeshReader.hpp.

Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::string VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesBaseName [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::ifstream VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesFile [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesRead [private]

Number of nodes read in by the reader.

Definition at line 67 of file VertexMeshReader.hpp.

Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), and VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodeAttributes [private]

Is the number of attributes stored at each node.

Definition at line 73 of file VertexMeshReader.hpp.

Referenced by VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes [private]

The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2