HeartGeometryInformation< SPACE_DIM > Class Template Reference

#include <HeartGeometryInformation.hpp>

Collaboration diagram for HeartGeometryInformation< SPACE_DIM >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 HeartGeometryInformation (TetrahedralMesh< SPACE_DIM, SPACE_DIM > &rMesh, std::string mEpiFile, std::string mEndoFile)
 HeartGeometryInformation (TetrahedralMesh< SPACE_DIM, SPACE_DIM > &rMesh, std::string mEpiFile, std::string mLVFile, std::string mRVFile)
 HeartGeometryInformation (TetrahedralMesh< SPACE_DIM, SPACE_DIM > &rMesh, std::vector< unsigned > &rNodesAtEpi, std::vector< unsigned > &rNodesAtEndo)
 HeartGeometryInformation (TetrahedralMesh< SPACE_DIM, SPACE_DIM > &rMesh, std::vector< unsigned > &rNodesAtEpi, std::vector< unsigned > &rNodesAtLv, std::vector< unsigned > &rNodesAtRv)
HeartRegionType GetHeartRegion (unsigned nodeIndex) const
std::vector< double > & rGetDistanceMapEpicardium ()
std::vector< double > & rGetDistanceMapEndocardium ()
std::vector< double > & rGetDistanceMapRightVentricle ()
std::vector< double > & rGetDistanceMapLeftVentricle ()
const std::vector< unsigned > & rGetNodesOnEpiSurface ()
const std::vector< unsigned > & rGetNodesOnEndoSurface ()
const std::vector< unsigned > & rGetNodesOnLVSurface ()
const std::vector< unsigned > & rGetNodesOnRVSurface ()
const std::vector
< HeartLayerType > & 
rGetLayerForEachNode ()
double CalculateRelativeWallPosition (unsigned nodeIndex)
void DetermineLayerForEachNode (double epiFraction, double endoFraction)
void WriteLayerForEachNode (std::string outputDir, std::string file)

Private Member Functions

void GetNodesAtSurface (const std::string &surfaceFile, std::vector< unsigned > &rSurfaceNodes) const
void ProcessLine (const std::string &line, std::set< unsigned > &surfaceNodeIndexSet) const
double GetDistanceToEndo (unsigned nodeIndex)
double GetDistanceToEpi (unsigned nodeIndex)

Private Attributes

std::vector< unsigned > mEpiSurface
std::vector< unsigned > mEndoSurface
std::vector< unsigned > mLVSurface
std::vector< unsigned > mRVSurface
TetrahedralMesh< SPACE_DIM,
SPACE_DIM > & 
mrMesh
std::vector< double > mDistMapEpicardium
std::vector< double > mDistMapEndocardium
std::vector< double > mDistMapRightVentricle
std::vector< double > mDistMapLeftVentricle
unsigned mNumberOfSurfacesProvided
std::vector< HeartLayerType > mLayerForEachNode

Static Private Attributes

static const double LEFT_SEPTUM_SIZE = 2.0/3.0
static const double RIGHT_SEPTUM_SIZE = 1.0/3.0


Detailed Description

template<unsigned SPACE_DIM>
class HeartGeometryInformation< SPACE_DIM >

This class provides a method to calculate the relative position of a node with respect to two (or three) given surfaces

Definition at line 52 of file HeartGeometryInformation.hpp.


Constructor & Destructor Documentation

template<unsigned SPACE_DIM>
HeartGeometryInformation< SPACE_DIM >::HeartGeometryInformation ( TetrahedralMesh< SPACE_DIM, SPACE_DIM > &  rMesh,
std::string  mEpiFile,
std::string  mEndoFile 
) [inline]

template<unsigned SPACE_DIM>
HeartGeometryInformation< SPACE_DIM >::HeartGeometryInformation ( TetrahedralMesh< SPACE_DIM, SPACE_DIM > &  rMesh,
std::string  mEpiFile,
std::string  mLVFile,
std::string  mRVFile 
) [inline]

template<unsigned SPACE_DIM>
HeartGeometryInformation< SPACE_DIM >::HeartGeometryInformation ( TetrahedralMesh< SPACE_DIM, SPACE_DIM > &  rMesh,
std::vector< unsigned > &  rNodesAtEpi,
std::vector< unsigned > &  rNodesAtEndo 
) [inline]

Constructor which takes in the nodes indices for each surface (mainly for testing or simple geometries) - 2 surface version

Parameters:
rMesh,: reference to the mesh
rNodesAtEpi,: indices of the nodes in the epicardial surface
rNodesAtEndo,: indices of the nodes in the endocardial surface

Definition at line 88 of file HeartGeometryInformation.cpp.

References DistanceMapCalculator< SPACE_DIM >::ComputeDistanceMap(), HeartGeometryInformation< SPACE_DIM >::mDistMapEndocardium, HeartGeometryInformation< SPACE_DIM >::mDistMapEpicardium, HeartGeometryInformation< SPACE_DIM >::mNumberOfSurfacesProvided, and HeartGeometryInformation< SPACE_DIM >::mrMesh.

template<unsigned SPACE_DIM>
HeartGeometryInformation< SPACE_DIM >::HeartGeometryInformation ( TetrahedralMesh< SPACE_DIM, SPACE_DIM > &  rMesh,
std::vector< unsigned > &  rNodesAtEpi,
std::vector< unsigned > &  rNodesAtLv,
std::vector< unsigned > &  rNodesAtRv 
) [inline]

Constructor which takes in the nodes indices for each surface (mainly for testing or simple geometries)

Parameters:
rMesh,: reference to the mesh
rNodesAtEpi,: indices of the nodes in the epicardial surface
rNodesAtLv,: indices of the nodes in the lv surface
rNodesAtRv,: indices of the nodes in the rv surface

Definition at line 104 of file HeartGeometryInformation.cpp.

References DistanceMapCalculator< SPACE_DIM >::ComputeDistanceMap(), HeartGeometryInformation< SPACE_DIM >::mDistMapEpicardium, HeartGeometryInformation< SPACE_DIM >::mDistMapLeftVentricle, HeartGeometryInformation< SPACE_DIM >::mDistMapRightVentricle, HeartGeometryInformation< SPACE_DIM >::mNumberOfSurfacesProvided, and HeartGeometryInformation< SPACE_DIM >::mrMesh.


Member Function Documentation

template<unsigned SPACE_DIM>
void HeartGeometryInformation< SPACE_DIM >::GetNodesAtSurface ( const std::string &  surfaceFile,
std::vector< unsigned > &  rSurfaceNodes 
) const [inline, private]

Takes in a file of all the surface elements on ONE PARTICULAR surface of the mesh (eg the right ventricular endo-cardial surface) and collects all the nodes on that surface in one vector

Parameters:
surfaceFile The surface file
rSurfaceNodes The returned vector of nodes indices on this surface

Definition at line 146 of file HeartGeometryInformation.cpp.

References HeartGeometryInformation< SPACE_DIM >::ProcessLine().

Referenced by HeartGeometryInformation< SPACE_DIM >::HeartGeometryInformation().

template<unsigned SPACE_DIM>
void HeartGeometryInformation< SPACE_DIM >::ProcessLine ( const std::string &  line,
std::set< unsigned > &  surfaceNodeIndexSet 
) const [inline, private]

Helper function for GetNodesAtSurface

Parameters:
line A line in a surface file
surfaceNodeIndexSet The nodes in the element corresponding to this line

Definition at line 121 of file HeartGeometryInformation.cpp.

Referenced by HeartGeometryInformation< SPACE_DIM >::GetNodesAtSurface().

template<unsigned SPACE_DIM>
double HeartGeometryInformation< SPACE_DIM >::GetDistanceToEndo ( unsigned  nodeIndex  )  [inline, private]

template<unsigned SPACE_DIM>
double HeartGeometryInformation< SPACE_DIM >::GetDistanceToEpi ( unsigned  nodeIndex  )  [inline, private]

Helper method to calculate the distance between the node and the Epicardial surface

Parameters:
nodeIndex is the index of the node in the mesh
Returns:
the distance

\ to do: there needs to be the logic for the septum as in Streeter

Definition at line 276 of file HeartGeometryInformation.cpp.

References HeartGeometryInformation< SPACE_DIM >::mDistMapEpicardium.

Referenced by HeartGeometryInformation< SPACE_DIM >::CalculateRelativeWallPosition().

template<unsigned SPACE_DIM>
HeartRegionType HeartGeometryInformation< SPACE_DIM >::GetHeartRegion ( unsigned  nodeIndex  )  const [inline]

template<unsigned SPACE_DIM>
std::vector<double>& HeartGeometryInformation< SPACE_DIM >::rGetDistanceMapEpicardium (  )  [inline]

Returns:
the distance map to the epicardium

Definition at line 189 of file HeartGeometryInformation.hpp.

References HeartGeometryInformation< SPACE_DIM >::mDistMapEpicardium.

template<unsigned SPACE_DIM>
std::vector<double>& HeartGeometryInformation< SPACE_DIM >::rGetDistanceMapEndocardium (  )  [inline]

template<unsigned SPACE_DIM>
std::vector<double>& HeartGeometryInformation< SPACE_DIM >::rGetDistanceMapRightVentricle (  )  [inline]

template<unsigned SPACE_DIM>
std::vector<double>& HeartGeometryInformation< SPACE_DIM >::rGetDistanceMapLeftVentricle (  )  [inline]

template<unsigned SPACE_DIM>
const std::vector<unsigned>& HeartGeometryInformation< SPACE_DIM >::rGetNodesOnEpiSurface (  )  [inline]

Get the nodes on the epicardial surface

Definition at line 225 of file HeartGeometryInformation.hpp.

References HeartGeometryInformation< SPACE_DIM >::mEpiSurface.

template<unsigned SPACE_DIM>
const std::vector<unsigned>& HeartGeometryInformation< SPACE_DIM >::rGetNodesOnEndoSurface (  )  [inline]

template<unsigned SPACE_DIM>
const std::vector<unsigned>& HeartGeometryInformation< SPACE_DIM >::rGetNodesOnLVSurface (  )  [inline]

Get the nodes on the endocardial left ventricular surface

Definition at line 239 of file HeartGeometryInformation.hpp.

References HeartGeometryInformation< SPACE_DIM >::mLVSurface, and HeartGeometryInformation< SPACE_DIM >::mNumberOfSurfacesProvided.

template<unsigned SPACE_DIM>
const std::vector<unsigned>& HeartGeometryInformation< SPACE_DIM >::rGetNodesOnRVSurface (  )  [inline]

Get the nodes on the endocardial right ventricular surface

Definition at line 246 of file HeartGeometryInformation.hpp.

References HeartGeometryInformation< SPACE_DIM >::mNumberOfSurfacesProvided, and HeartGeometryInformation< SPACE_DIM >::mRVSurface.

template<unsigned SPACE_DIM>
const std::vector<HeartLayerType>& HeartGeometryInformation< SPACE_DIM >::rGetLayerForEachNode (  )  [inline]

Get the layer for every node in the mesh.

Definition at line 255 of file HeartGeometryInformation.hpp.

References HeartGeometryInformation< SPACE_DIM >::mLayerForEachNode.

template<unsigned SPACE_DIM>
double HeartGeometryInformation< SPACE_DIM >::CalculateRelativeWallPosition ( unsigned  nodeIndex  )  [inline]

Calculates the relative position within the wall thickness (normalised to [0,1])

Parameters:
nodeIndex index is the index of the node in the mesh
Returns:
the relative position

Definition at line 283 of file HeartGeometryInformation.cpp.

References HeartGeometryInformation< SPACE_DIM >::GetDistanceToEndo(), and HeartGeometryInformation< SPACE_DIM >::GetDistanceToEpi().

Referenced by HeartGeometryInformation< SPACE_DIM >::DetermineLayerForEachNode().

template<unsigned SPACE_DIM>
void HeartGeometryInformation< SPACE_DIM >::DetermineLayerForEachNode ( double  epiFraction,
double  endoFraction 
) [inline]

Compute which layer (endocardial, midmyocardial or epicardial) each node is in

Parameters:
epiFraction is the fraction of wall designed to be epicardial layer
endoFraction is the fraction of wall designed to be endocardial layer

Definition at line 307 of file HeartGeometryInformation.cpp.

References HeartGeometryInformation< SPACE_DIM >::CalculateRelativeWallPosition(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), HeartGeometryInformation< SPACE_DIM >::mLayerForEachNode, and HeartGeometryInformation< SPACE_DIM >::mrMesh.

template<unsigned SPACE_DIM>
void HeartGeometryInformation< SPACE_DIM >::WriteLayerForEachNode ( std::string  outputDir,
std::string  file 
) [inline]

Write the layer for each node. DetermineLayerForEachNode() must have been called first.

Parameters:
outputDir Output directory - note not cleaned
file Output file

Definition at line 334 of file HeartGeometryInformation.cpp.

References PetscTools::AmMaster(), PetscTools::Barrier(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), HeartGeometryInformation< SPACE_DIM >::mLayerForEachNode, HeartGeometryInformation< SPACE_DIM >::mrMesh, and OutputFileHandler::OpenOutputFile().


Member Data Documentation

template<unsigned SPACE_DIM>
const double HeartGeometryInformation< SPACE_DIM >::LEFT_SEPTUM_SIZE = 2.0/3.0 [inline, static, private]

Area of the septum considered to belong to the left septum (relative to 1)

Definition at line 57 of file HeartGeometryInformation.hpp.

Referenced by HeartGeometryInformation< SPACE_DIM >::GetHeartRegion().

template<unsigned SPACE_DIM>
const double HeartGeometryInformation< SPACE_DIM >::RIGHT_SEPTUM_SIZE = 1.0/3.0 [inline, static, private]

Area of the septum considered to belong to the right septum (relative to 1)

Definition at line 59 of file HeartGeometryInformation.hpp.

template<unsigned SPACE_DIM>
std::vector<unsigned> HeartGeometryInformation< SPACE_DIM >::mEpiSurface [private]

template<unsigned SPACE_DIM>
std::vector<unsigned> HeartGeometryInformation< SPACE_DIM >::mEndoSurface [private]

The nodes on the endocardial surface (only used in the 2 surface case)

Definition at line 65 of file HeartGeometryInformation.hpp.

Referenced by HeartGeometryInformation< SPACE_DIM >::HeartGeometryInformation(), and HeartGeometryInformation< SPACE_DIM >::rGetNodesOnEndoSurface().

template<unsigned SPACE_DIM>
std::vector<unsigned> HeartGeometryInformation< SPACE_DIM >::mLVSurface [private]

The nodes on the endocardial left ventricular surface (only used in the 3 surface case)

Definition at line 68 of file HeartGeometryInformation.hpp.

Referenced by HeartGeometryInformation< SPACE_DIM >::HeartGeometryInformation(), and HeartGeometryInformation< SPACE_DIM >::rGetNodesOnLVSurface().

template<unsigned SPACE_DIM>
std::vector<unsigned> HeartGeometryInformation< SPACE_DIM >::mRVSurface [private]

The nodes on the endocardial right ventricular surface (only used in the 3 surface case)

Definition at line 71 of file HeartGeometryInformation.hpp.

Referenced by HeartGeometryInformation< SPACE_DIM >::HeartGeometryInformation(), and HeartGeometryInformation< SPACE_DIM >::rGetNodesOnRVSurface().

template<unsigned SPACE_DIM>
TetrahedralMesh<SPACE_DIM,SPACE_DIM>& HeartGeometryInformation< SPACE_DIM >::mrMesh [private]

template<unsigned SPACE_DIM>
std::vector<double> HeartGeometryInformation< SPACE_DIM >::mDistMapEpicardium [private]

template<unsigned SPACE_DIM>
std::vector<double> HeartGeometryInformation< SPACE_DIM >::mDistMapEndocardium [private]

template<unsigned SPACE_DIM>
std::vector<double> HeartGeometryInformation< SPACE_DIM >::mDistMapRightVentricle [private]

template<unsigned SPACE_DIM>
std::vector<double> HeartGeometryInformation< SPACE_DIM >::mDistMapLeftVentricle [private]

template<unsigned SPACE_DIM>
unsigned HeartGeometryInformation< SPACE_DIM >::mNumberOfSurfacesProvided [private]

template<unsigned SPACE_DIM>
std::vector<HeartLayerType> HeartGeometryInformation< SPACE_DIM >::mLayerForEachNode [private]


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

Generated on Tue Aug 4 16:11:18 2009 for Chaste by  doxygen 1.5.5