StreeterFibreGenerator< SPACE_DIM > Class Template Reference

#include <StreeterFibreGenerator.hpp>

Collaboration diagram for StreeterFibreGenerator< SPACE_DIM >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 StreeterFibreGenerator (AbstractTetrahedralMesh< SPACE_DIM, SPACE_DIM > &rMesh)
 ~StreeterFibreGenerator ()
void SetSurfaceFiles (const std::string &epicardiumFile, const std::string &rightVentricleFile, const std::string &leftVentricleFile)
void GenerateOrthotropicFibreOrientation (std::string outputDirectory, std::string fibreOrientationFile, bool logInfo=false)
void CheckVentricleAlignment ()

Private Member Functions

double GetAveragedThicknessLocalNode (const unsigned nodeIndex, const std::vector< double > &wallThickness) const
double GetFibreMaxAngle (const c_vector< HeartRegionType, SPACE_DIM+1 > &nodesRegionsForElement) const

Private Attributes

AbstractTetrahedralMesh
< SPACE_DIM, SPACE_DIM > & 
mrMesh
HeartGeometryInformation
< SPACE_DIM > * 
mpGeometryInfo

Detailed Description

template<unsigned SPACE_DIM>
class StreeterFibreGenerator< SPACE_DIM >

Generate fibre in a ventricular mesh using the formulae from Streeter DD, Jr, Spotnitz HM, Patel DP, Ross J, Jr, Sonnenblick EH. Fiber orientation in the canine left ventricle during diastole and systole. Circ Res. 1969 Mar;24(3):339–347.

Definition at line 45 of file StreeterFibreGenerator.hpp.


Constructor & Destructor Documentation

template<unsigned SPACE_DIM>
StreeterFibreGenerator< SPACE_DIM >::StreeterFibreGenerator ( AbstractTetrahedralMesh< SPACE_DIM, SPACE_DIM > &  rMesh  )  [inline]

Constructor

Parameters:
rMesh reference to the tetrahedral mesh of the ventricles

Definition at line 131 of file StreeterFibreGenerator.cpp.

template<unsigned SPACE_DIM>
StreeterFibreGenerator< SPACE_DIM >::~StreeterFibreGenerator (  )  [inline]

Destructor

Definition at line 138 of file StreeterFibreGenerator.cpp.

References StreeterFibreGenerator< SPACE_DIM >::mpGeometryInfo.


Member Function Documentation

template<unsigned SPACE_DIM>
void StreeterFibreGenerator< SPACE_DIM >::CheckVentricleAlignment (  )  [inline]

Check that the two ventricles are separated in the y-axis The heart ought to have x: apex to base y: right to left z: front to back

Note this method only covers some of the possible missalignments of the mesh

Definition at line 464 of file StreeterFibreGenerator.cpp.

References StreeterFibreGenerator< SPACE_DIM >::mpGeometryInfo, ChasteCuboid< SPACE_DIM >::rGetLowerCorner(), and ChasteCuboid< SPACE_DIM >::rGetUpperCorner().

Referenced by StreeterFibreGenerator< SPACE_DIM >::GenerateOrthotropicFibreOrientation().

template<unsigned SPACE_DIM>
void StreeterFibreGenerator< SPACE_DIM >::GenerateOrthotropicFibreOrientation ( std::string  outputDirectory,
std::string  fibreOrientationFile,
bool  logInfo = false 
) [inline]

Generates an orthotropic fibre orientation model of the ventricular mesh provided. Assumes that the base-apex axis is x. Based on Streeter 1969 and Potse 2006

File format: The first line indicates the number of elements. Each of the following lines contain SPACE_DIM vectors of SPACE_DIM elements for the direction of the myofibre, the transverse to it in the plane of the myocite laminae and the normal to this laminae.

Parameters:
outputDirectory Output directory
fibreOrientationFile Output file
logInfo Tells the method to output extra debug info. To be eliminated once it's fully tested

Definition at line 154 of file StreeterFibreGenerator.cpp.

References PetscTools::AmMaster(), PetscTools::Barrier(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CalculateDesignatedOwnershipOfElement(), StreeterFibreGenerator< SPACE_DIM >::CheckVentricleAlignment(), StreeterFibreGenerator< SPACE_DIM >::GetAveragedThicknessLocalNode(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), StreeterFibreGenerator< SPACE_DIM >::GetFibreMaxAngle(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetInverseJacobianForElement(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), HeartRegionCode::LEFT_SEPTUM, HeartRegionCode::LEFT_VENTRICLE_SURFACE, HeartRegionCode::LEFT_VENTRICLE_WALL, StreeterFibreGenerator< SPACE_DIM >::mpGeometryInfo, StreeterFibreGenerator< SPACE_DIM >::mrMesh, OutputFileHandler::OpenOutputFile(), HeartRegionCode::RIGHT_SEPTUM, HeartRegionCode::RIGHT_VENTRICLE_SURFACE, HeartRegionCode::RIGHT_VENTRICLE_WALL, and HeartRegionCode::UNKNOWN.

template<unsigned SPACE_DIM>
double StreeterFibreGenerator< SPACE_DIM >::GetAveragedThicknessLocalNode ( const unsigned  nodeIndex,
const std::vector< double > &  wallThickness 
) const [inline, private]

Compute the wallthickness of a given node based on a neighbourhood average of its thickness and of those in the forward star.

Parameters:
nodeIndex The index of the node in question
wallThickness vector of thickness of all nodes in node index order
Returns:
Neighbourhood average thickness (will return 0 if the node is not local to this process)

Definition at line 41 of file StreeterFibreGenerator.cpp.

References Node< SPACE_DIM >::ContainingElementsBegin(), Node< SPACE_DIM >::ContainingElementsEnd(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetDistributedVectorFactory(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), DistributedVectorFactory::GetHigh(), Node< SPACE_DIM >::GetIndex(), DistributedVectorFactory::GetLow(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and StreeterFibreGenerator< SPACE_DIM >::mrMesh.

Referenced by StreeterFibreGenerator< SPACE_DIM >::GenerateOrthotropicFibreOrientation().

template<unsigned SPACE_DIM>
double StreeterFibreGenerator< SPACE_DIM >::GetFibreMaxAngle ( const c_vector< HeartRegionType, SPACE_DIM+1 > &  nodesRegionsForElement  )  const [inline, private]

R is the maximum angle between the fibre and the v axis (heart region dependant)

Parameters:
nodesRegionsForElement is a small vector containing the region tags of the element's nodes
Returns:
Pi/4 (if the element is in RV), Pi/3 otherwise

Definition at line 93 of file StreeterFibreGenerator.cpp.

References HeartRegionCode::LEFT_SEPTUM, HeartRegionCode::LEFT_VENTRICLE_SURFACE, HeartRegionCode::LEFT_VENTRICLE_WALL, HeartRegionCode::RIGHT_SEPTUM, HeartRegionCode::RIGHT_VENTRICLE_SURFACE, HeartRegionCode::RIGHT_VENTRICLE_WALL, and HeartRegionCode::UNKNOWN.

Referenced by StreeterFibreGenerator< SPACE_DIM >::GenerateOrthotropicFibreOrientation().

template<unsigned SPACE_DIM>
void StreeterFibreGenerator< SPACE_DIM >::SetSurfaceFiles ( const std::string &  epicardiumFile,
const std::string &  rightVentricleFile,
const std::string &  leftVentricleFile 
) [inline]

Uses the names of files defining the diferent surfaces of the mesh to construct the geometry information class File format: list of triangles

Parameters:
epicardiumFile Epicardium surface
rightVentricleFile Right Ventricle surface
leftVentricleFile Left Ventricle surface

Definition at line 144 of file StreeterFibreGenerator.cpp.

References StreeterFibreGenerator< SPACE_DIM >::mpGeometryInfo, and StreeterFibreGenerator< SPACE_DIM >::mrMesh.


Member Data Documentation

template<unsigned SPACE_DIM>
HeartGeometryInformation<SPACE_DIM>* StreeterFibreGenerator< SPACE_DIM >::mpGeometryInfo [private]
template<unsigned SPACE_DIM>
AbstractTetrahedralMesh<SPACE_DIM,SPACE_DIM>& StreeterFibreGenerator< SPACE_DIM >::mrMesh [private]

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

Generated by  doxygen 1.6.2