Chaste Release::3.1
StreeterFibreGenerator< SPACE_DIM > Class Template Reference

#include <StreeterFibreGenerator.hpp>

Collaboration diagram for StreeterFibreGenerator< SPACE_DIM >:

List of all members.

Public Member Functions

 StreeterFibreGenerator (AbstractTetrahedralMesh< SPACE_DIM, SPACE_DIM > &rMesh)
 ~StreeterFibreGenerator ()
void SetSurfaceFiles (const std::string &rEpicardiumFile, const std::string &rRightVentricleFile, const std::string &rLeftVentricleFile, bool indexFromZero)
void GenerateOrthotropicFibreOrientation (std::string outputDirectory, std::string fibreOrientationFile, bool logInfo=false)
void SetApexToBase (const c_vector< double, SPACE_DIM > &apexToBase)
void SetApexToBase (unsigned axis)

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
c_vector< double, SPACE_DIM > mApexToBase

Detailed Description

template<unsigned SPACE_DIM>
class StreeterFibreGenerator< SPACE_DIM >

Generate fibre in a ventricular mesh using the description in 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.

Formulae used to generate the fibre orientations are in A Comparison of Monodomain and Bidomain Reaction-Diffusion Models for Action Potential Propagation in the Human Heart Mark Potse, Bruno Dubé, Jacques Richer, Alain Vinet, and Ramesh M. Gulrajani IEEE Trans. Biomed. Eng. 53(12):2425-2435, 2006.

Definition at line 57 of file StreeterFibreGenerator.hpp.


Constructor & Destructor Documentation

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

Constructor

Parameters:
rMeshreference to the tetrahedral mesh of the ventricles

Definition at line 138 of file StreeterFibreGenerator.cpp.

template<unsigned SPACE_DIM>
StreeterFibreGenerator< SPACE_DIM >::~StreeterFibreGenerator ( )

Destructor

Definition at line 146 of file StreeterFibreGenerator.cpp.


Member Function Documentation

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

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:
outputDirectoryOutput directory
fibreOrientationFileOutput file
logInfoTells the method to output extra debug info. To be eliminated once it's fully tested

Definition at line 163 of file StreeterFibreGenerator.cpp.

References PetscTools::AmMaster(), PetscTools::Barrier(), EXCEPTION, AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), NEVER_REACHED, OutputFileHandler::OpenOutputFile(), HeartGeometryInformation< SPACE_DIM >::rGetDistanceMapEpicardium(), and VectorProduct().

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

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

Parameters:
nodeIndexThe index of the node in question
wallThicknessvector 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 48 of file StreeterFibreGenerator.cpp.

References Node< SPACE_DIM >::ContainingElementsBegin(), Node< SPACE_DIM >::ContainingElementsEnd(), Node< SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes().

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

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

Parameters:
nodesRegionsForElementis 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 100 of file StreeterFibreGenerator.cpp.

References NEVER_REACHED.

template<unsigned SPACE_DIM>
void StreeterFibreGenerator< SPACE_DIM >::SetApexToBase ( const c_vector< double, SPACE_DIM > &  apexToBase)

Set the direction from apex to base

Parameters:
apexToBaseis a non-zero vector. It will be stored in normalised form

Definition at line 478 of file StreeterFibreGenerator.cpp.

References EXCEPTION.

template<unsigned SPACE_DIM>
void StreeterFibreGenerator< SPACE_DIM >::SetApexToBase ( unsigned  axis)

Set the direction from apex to base

Parameters:
axisis the Cartesian axis from apex to base.

Definition at line 488 of file StreeterFibreGenerator.cpp.

References EXCEPTION.

template<unsigned SPACE_DIM>
void StreeterFibreGenerator< SPACE_DIM >::SetSurfaceFiles ( const std::string &  rEpicardiumFile,
const std::string &  rRightVentricleFile,
const std::string &  rLeftVentricleFile,
bool  indexFromZero 
)

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

Parameters:
rEpicardiumFileEpicardium surface
rRightVentricleFileRight Ventricle surface.
rLeftVentricleFileLeft Ventricle surface
indexFromZeroAre the nodes in the original mesh file/surfaces indexed from 0?

If either rRightVentricleFile or rLeftVentricleFile are the empty string, then it is assumed that this is a wedge preparation for left or right ventricle, respectively. That is, the ventricle with a non-empty string. If both are empty strings then throws exception in HeartGeometryInformation.

Definition at line 152 of file StreeterFibreGenerator.cpp.


Member Data Documentation

template<unsigned SPACE_DIM>
c_vector<double, SPACE_DIM> StreeterFibreGenerator< SPACE_DIM >::mApexToBase [private]

Normalised direction from apex to base

Definition at line 64 of file StreeterFibreGenerator.hpp.

template<unsigned SPACE_DIM>
HeartGeometryInformation<SPACE_DIM>* StreeterFibreGenerator< SPACE_DIM >::mpGeometryInfo [private]

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

Definition at line 62 of file StreeterFibreGenerator.hpp.

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

Reference to the mesh (used for calculating distances to epi and endo surfaces)

Definition at line 60 of file StreeterFibreGenerator.hpp.


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