Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <ImmersedBoundaryMeshReader.hpp>

+ Inheritance diagram for ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >:
+ Collaboration diagram for ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >:

Public Member Functions

 ImmersedBoundaryMeshReader (std::string pathBaseName)
 
 ~ImmersedBoundaryMeshReader ()
 
unsigned GetNumElements () const
 
unsigned GetNumLaminas () const
 
unsigned GetNumNodes () const
 
unsigned GetNumGridPtsX () const
 
unsigned GetNumGridPtsY () const
 
unsigned GetNumElementAttributes () const
 
unsigned GetNumLaminaAttributes () const
 
double GetCharacteristicNodeSpacing ()
 
void Reset ()
 
std::vector< doubleGetNextNode ()
 
std::vector< doubleGetNextGridRow ()
 
ImmersedBoundaryElementData GetNextImmersedBoundaryElementData ()
 
ImmersedBoundaryElementData GetNextImmersedBoundaryLaminaData ()
 
unsigned GetNumFaces () const
 
ElementData GetNextElementData ()
 
ElementData GetNextFaceData ()
 
- Public Member Functions inherited from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >
virtual unsigned GetNumCableElements () const
 
virtual unsigned GetNumFaceAttributes () const
 
virtual unsigned GetNumCableElementAttributes () const
 
virtual std::vector< doubleGetNodeAttributes ()
 
unsigned GetNumEdges () const
 
virtual ElementData GetNextCableElementData ()
 
ElementData GetNextEdgeData ()
 
virtual std::vector< doubleGetNode (unsigned index)
 
virtual ElementData GetElementData (unsigned index)
 
virtual ElementData GetFaceData (unsigned index)
 
ElementData GetEdgeData (unsigned index)
 
virtual std::vector< unsignedGetContainingElementIndices (unsigned index)
 
virtual std::string GetMeshFileBaseName ()
 
virtual unsigned GetOrderOfElements ()
 
virtual unsigned GetOrderOfBoundaryElements ()
 
virtual bool GetReadContainingElementOfBoundaryElement ()
 
virtual bool IsFileFormatBinary ()
 
virtual bool HasNclFile ()
 
virtual bool HasNodePermutation ()
 
virtual const std::vector< unsigned > & rGetNodePermutation ()
 
ElementIterator GetElementIteratorBegin ()
 
ElementIterator GetElementIteratorBegin (const std::set< unsigned > &rIndices)
 
ElementIterator GetElementIteratorEnd ()
 
NodeIterator GetNodeIteratorBegin ()
 
NodeIterator GetNodeIteratorBegin (const std::set< unsigned > &rIndices)
 
NodeIterator GetNodeIteratorEnd ()
 

Private Member Functions

void OpenFiles ()
 
void OpenNodeFile ()
 
void OpenElementsFile ()
 
void OpenLaminasFile ()
 
void OpenGridFile ()
 
void ReadHeaders ()
 
void CloseFiles ()
 
void GetNextLineFromStream (std::ifstream &fileStream, std::string &rawLine)
 

Private Attributes

std::string mFilesBaseName
 
std::ifstream mNodesFile
 
std::ifstream mElementsFile
 
std::ifstream mLaminasFile
 
std::ifstream mGridFile
 
bool mIndexFromZero
 
unsigned mNumNodes
 
unsigned mNumElements
 
unsigned mNumLaminas
 
unsigned mNodesRead
 
unsigned mElementsRead
 
unsigned mLaminasRead
 
unsigned mNumNodeAttributes
 
unsigned mNumElementAttributes
 
unsigned mNumLaminaAttributes
 
unsigned mNumGridPtsX
 
unsigned mNumGridPtsY
 
double mCharacteristicNodeSpacing
 

Detailed Description

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

A mesh reader class for immersed boundary meshes.

Definition at line 79 of file ImmersedBoundaryMeshReader.hpp.

Constructor & Destructor Documentation

◆ ImmersedBoundaryMeshReader()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryMeshReader ( std::string  pathBaseName)

Constructor.

Parameters
pathBaseNamethe base name for results files

Definition at line 42 of file ImmersedBoundaryMeshReader.cpp.

References ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles(), and ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders().

◆ ~ImmersedBoundaryMeshReader()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::~ImmersedBoundaryMeshReader ( )
inline

Destructor.

Definition at line 192 of file ImmersedBoundaryMeshReader.hpp.

Member Function Documentation

◆ CloseFiles()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::CloseFiles ( )
private

Close node and element files.

Definition at line 401 of file ImmersedBoundaryMeshReader.cpp.

◆ GetCharacteristicNodeSpacing()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::GetCharacteristicNodeSpacing ( )
Returns
the characteristic node spacing in the mesh

Definition at line 100 of file ImmersedBoundaryMeshReader.cpp.

◆ GetNextElementData()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ElementData ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData ( )
virtual
Returns
the nodes of each element (and any attribute information, if there is any) in turn.

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 438 of file ImmersedBoundaryMeshReader.cpp.

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

◆ GetNextFaceData()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ElementData ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData ( )
virtual
Returns
a vector of the nodes of each face in turn.

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 447 of file ImmersedBoundaryMeshReader.cpp.

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

◆ GetNextGridRow()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< double > ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextGridRow ( )
Returns
the next row of the fluid velocity grids.

Definition at line 147 of file ImmersedBoundaryMeshReader.cpp.

◆ GetNextImmersedBoundaryElementData()

◆ GetNextImmersedBoundaryLaminaData()

◆ GetNextLineFromStream()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream ( std::ifstream &  fileStream,
std::string &  rawLine 
)
private

Get the next line from a given file stream.

Parameters
fileStreamthe file stream
rawLinethe raw line (may contain comments)

Definition at line 410 of file ImmersedBoundaryMeshReader.cpp.

References EXCEPTION.

◆ GetNextNode()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< double > ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode ( )
virtual
Returns
the coordinates of each node in turn.

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 117 of file ImmersedBoundaryMeshReader.cpp.

References EXCEPTION.

◆ GetNumElementAttributes()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElementAttributes ( ) const
virtual
Returns
the number of attributes associated with elements in the mesh

Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 88 of file ImmersedBoundaryMeshReader.cpp.

◆ GetNumElements()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements ( ) const
virtual
Returns
the number of elements in the mesh.

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 58 of file ImmersedBoundaryMeshReader.cpp.

◆ GetNumFaces()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaces ( ) const
virtual
Returns
the number of faces in the mesh (synonym of GetNumEdges()).

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 432 of file ImmersedBoundaryMeshReader.cpp.

◆ GetNumGridPtsX()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumGridPtsX ( ) const
Returns
the number of grid points in the x direction

Definition at line 76 of file ImmersedBoundaryMeshReader.cpp.

◆ GetNumGridPtsY()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumGridPtsY ( ) const
Returns
the number of grid points in the y direction

Definition at line 82 of file ImmersedBoundaryMeshReader.cpp.

◆ GetNumLaminaAttributes()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumLaminaAttributes ( ) const
Returns
the number of attributes associated with laminas in the mesh

Definition at line 94 of file ImmersedBoundaryMeshReader.cpp.

◆ GetNumLaminas()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumLaminas ( ) const
Returns
the number of laminas in the mesh.

Definition at line 64 of file ImmersedBoundaryMeshReader.cpp.

◆ GetNumNodes()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes ( ) const
virtual
Returns
the number of nodes in the mesh.

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 70 of file ImmersedBoundaryMeshReader.cpp.

◆ OpenElementsFile()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenElementsFile ( )
private

Open element file.

Definition at line 318 of file ImmersedBoundaryMeshReader.cpp.

References EXCEPTION.

◆ OpenFiles()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles ( )
private

◆ OpenGridFile()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenGridFile ( )
private

Open grids file.

Definition at line 346 of file ImmersedBoundaryMeshReader.cpp.

References EXCEPTION.

◆ OpenLaminasFile()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenLaminasFile ( )
private

Open laminas file.

Definition at line 332 of file ImmersedBoundaryMeshReader.cpp.

References EXCEPTION.

◆ OpenNodeFile()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile ( )
private

Open node file.

Definition at line 306 of file ImmersedBoundaryMeshReader.cpp.

References EXCEPTION.

◆ ReadHeaders()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders ( )
private

Read the file headers to determine node and element numbers and attributes.

Definition at line 360 of file ImmersedBoundaryMeshReader.cpp.

Referenced by ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryMeshReader().

◆ Reset()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset ( )
virtual

Reset pointers to beginning.

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 106 of file ImmersedBoundaryMeshReader.cpp.

Member Data Documentation

◆ mCharacteristicNodeSpacing

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mCharacteristicNodeSpacing
private

The characteristic node spacing.

Definition at line 135 of file ImmersedBoundaryMeshReader.hpp.

◆ mElementsFile

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::ifstream ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsFile
private

The elements file for the mesh.

Definition at line 90 of file ImmersedBoundaryMeshReader.hpp.

◆ mElementsRead

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsRead
private

Number of elements read in by the reader.

Definition at line 114 of file ImmersedBoundaryMeshReader.hpp.

◆ mFilesBaseName

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::string ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mFilesBaseName
private

The base name for mesh files.

Definition at line 84 of file ImmersedBoundaryMeshReader.hpp.

◆ mGridFile

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::ifstream ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mGridFile
private

The grid file for the mesh.

Definition at line 96 of file ImmersedBoundaryMeshReader.hpp.

◆ mIndexFromZero

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero
private

True if input data are numbered from zero, false otherwise.

Definition at line 99 of file ImmersedBoundaryMeshReader.hpp.

◆ mLaminasFile

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::ifstream ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mLaminasFile
private

The laminas file for the mesh.

Definition at line 93 of file ImmersedBoundaryMeshReader.hpp.

◆ mLaminasRead

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mLaminasRead
private

Number of laminas read in by the reader.

Definition at line 117 of file ImmersedBoundaryMeshReader.hpp.

◆ mNodesFile

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::ifstream ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesFile
private

The nodes file for the mesh.

Definition at line 87 of file ImmersedBoundaryMeshReader.hpp.

◆ mNodesRead

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesRead
private

Number of nodes read in by the reader.

Definition at line 111 of file ImmersedBoundaryMeshReader.hpp.

◆ mNumElementAttributes

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes
private

Number of attributes stored for each element.

Definition at line 123 of file ImmersedBoundaryMeshReader.hpp.

◆ mNumElements

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements
private

Number of elements in the mesh.

Definition at line 105 of file ImmersedBoundaryMeshReader.hpp.

◆ mNumGridPtsX

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumGridPtsX
private

Is the number of grid points in the x direction.

Definition at line 129 of file ImmersedBoundaryMeshReader.hpp.

◆ mNumGridPtsY

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumGridPtsY
private

Is the number of grid points in the y direction.

Definition at line 132 of file ImmersedBoundaryMeshReader.hpp.

◆ mNumLaminaAttributes

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumLaminaAttributes
private

Number of attributes stored for each lamina.

Definition at line 126 of file ImmersedBoundaryMeshReader.hpp.

◆ mNumLaminas

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumLaminas
private

Number of laminas in the mesh.

Definition at line 108 of file ImmersedBoundaryMeshReader.hpp.

◆ mNumNodeAttributes

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodeAttributes
private

Number of attributes stored at each node.

Definition at line 120 of file ImmersedBoundaryMeshReader.hpp.

◆ mNumNodes

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes
private

Number of nodes in the mesh.

Definition at line 102 of file ImmersedBoundaryMeshReader.hpp.


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