GenericMeshReader< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <GenericMeshReader.hpp>

Inheritance diagram for GenericMeshReader< ELEMENT_DIM, SPACE_DIM >:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 GenericMeshReader (std::string pathBaseName, unsigned orderOfElements=1, unsigned orderOfBoundaryElements=1, bool readContainingElementsForBoundaryElements=false)
 ~GenericMeshReader ()
unsigned GetNumNodes () const
unsigned GetNumElements () const
unsigned GetNumFaces () const
unsigned GetNumElementAttributes () const
unsigned GetNumFaceAttributes () const
void Reset ()
std::vector< double > GetNextNode ()
ElementData GetNextElementData ()
ElementData GetNextFaceData ()
std::vector< double > GetNode (unsigned index)
ElementData GetElementData (unsigned index)
ElementData GetFaceData (unsigned index)
std::vector< unsigned > GetContainingElementIndices (unsigned index)
std::string GetMeshFileBaseName ()
bool IsFileFormatBinary ()
bool HasNclFile ()

Private Attributes

AbstractMeshReader
< ELEMENT_DIM, SPACE_DIM > * 
mpMeshReader


Detailed Description

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

A generic mesh reader Uses a delegated member variable of type AbstractMeshReader to probe for files which may be read via

Probing is done during construction.

Thereafter all public methods use the public methods of the delegated class and exceptions are passed back to the caller without being caught locally

Definition at line 51 of file GenericMeshReader.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::GenericMeshReader ( std::string  pathBaseName,
unsigned  orderOfElements = 1,
unsigned  orderOfBoundaryElements = 1,
bool  readContainingElementsForBoundaryElements = false 
) [inline]

Constructor.

Parameters:
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 71 of file GenericMeshReader.hpp.

References EXCEPTION, Exception::GetShortMessage(), and GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

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

Destructor

Definition at line 124 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.


Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes (  )  const [inline, virtual]

Method uses the public method of the delegated mesh reader

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 133 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements (  )  const [inline, virtual]

Method uses the public method of the delegated mesh reader

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 141 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

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

Method uses the public method of the delegated mesh reader

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 149 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElementAttributes (  )  const [inline, virtual]

Method uses the public method of the delegated mesh reader

Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 156 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaceAttributes (  )  const [inline, virtual]

Method uses the public method of the delegated mesh reader

Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 164 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset (  )  [inline, virtual]

Method uses the public method of the delegated mesh reader

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 172 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

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

Method uses the public method of the delegated mesh reader

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 180 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ElementData GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData (  )  [inline, virtual]

Method uses the public method of the delegated mesh reader

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 188 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ElementData GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData (  )  [inline, virtual]

Method uses the public method of the delegated mesh reader

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 195 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<double> GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNode ( unsigned  index  )  [inline, virtual]

Normally throws an exception. Only implemented for tetrahedral mesh reader of binary files.

Parameters:
index The global node index
Returns:
a vector of the coordinates of the node

Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 206 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ElementData GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData ( unsigned  index  )  [inline, virtual]

Normally throws an exception. Only implemented for tetrahedral mesh reader of binary files.

Parameters:
index The global element index
Returns:
a vector of the node indices of the element (and any attribute infomation, if there is any)

Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 218 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ElementData GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::GetFaceData ( unsigned  index  )  [inline, virtual]

Normally throws an exception. Only implemented for tetrahedral mesh reader of binary files.

Parameters:
index The global face index
Returns:
a vector of the node indices of the face (and any attribute/containment infomation, if there is any)

Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 230 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<unsigned> GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndices ( unsigned  index  )  [inline, virtual]

Normally throws an exception. When a NCL file is available, returns a list of the elements that contain the node (only available for binary files).

Parameters:
index The global node index
Returns:
a vector of the node indices of the face (and any attribute/containment infomation, if there is any)

Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 243 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::string GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::GetMeshFileBaseName (  )  [inline, virtual]

Get the base name (less any extension) for mesh files. Only implemented for some mesh types. Method uses the public method of the delegated mesh reader

Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 252 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::IsFileFormatBinary (  )  [inline, virtual]

Returns true if reading binary files, false if reading ascii files.

Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 260 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.

Referenced by AbstractTetrahedralMesh< SPACE_DIM, SPACE_DIM >::save().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::HasNclFile (  )  [inline, virtual]

Returns true if there is a node connectivity list (NCL) file available.

Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 268 of file GenericMeshReader.hpp.

References GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.


Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>* GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::mpMeshReader [private]


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

Generated on Mon Apr 18 11:37:09 2011 for Chaste by  doxygen 1.5.5