#include <StreeterFibreGenerator.hpp>
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, 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 |
Definition at line 45 of file StreeterFibreGenerator.hpp.
StreeterFibreGenerator< SPACE_DIM >::StreeterFibreGenerator | ( | AbstractTetrahedralMesh< SPACE_DIM, SPACE_DIM > & | rMesh | ) | [inline] |
Constructor
rMesh | reference to the tetrahedral mesh of the ventricles |
Definition at line 131 of file StreeterFibreGenerator.cpp.
StreeterFibreGenerator< SPACE_DIM >::~StreeterFibreGenerator | ( | ) | [inline] |
Destructor
Definition at line 139 of file StreeterFibreGenerator.cpp.
References StreeterFibreGenerator< SPACE_DIM >::mpGeometryInfo.
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.
nodeIndex | The index of the node in question | |
wallThickness | vector of thickness of all nodes in node index order |
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().
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)
nodesRegionsForElement | is a small vector containing the region tags of the element's nodes |
Definition at line 93 of file StreeterFibreGenerator.cpp.
References NEVER_REACHED.
Referenced by StreeterFibreGenerator< SPACE_DIM >::GenerateOrthotropicFibreOrientation().
void StreeterFibreGenerator< SPACE_DIM >::SetSurfaceFiles | ( | const std::string & | epicardiumFile, | |
const std::string & | rightVentricleFile, | |||
const std::string & | leftVentricleFile, | |||
bool | indexFromZero | |||
) | [inline] |
Uses the names of files defining the diferent surfaces of the mesh to construct the geometry information class File format: list of triangles
epicardiumFile | Epicardium surface | |
rightVentricleFile | Right Ventricle surface | |
leftVentricleFile | Left Ventricle surface | |
indexFromZero | Are the nodes in the original mesh file/surfaces indexed from 0? |
Definition at line 145 of file StreeterFibreGenerator.cpp.
References StreeterFibreGenerator< SPACE_DIM >::mpGeometryInfo, and StreeterFibreGenerator< SPACE_DIM >::mrMesh.
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.
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 156 of file StreeterFibreGenerator.cpp.
References PetscTools::AmMaster(), PetscTools::Barrier(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CalculateDesignatedOwnershipOfElement(), EXCEPTION, 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(), StreeterFibreGenerator< SPACE_DIM >::mApexToBase, StreeterFibreGenerator< SPACE_DIM >::mpGeometryInfo, StreeterFibreGenerator< SPACE_DIM >::mrMesh, NEVER_REACHED, OutputFileHandler::OpenOutputFile(), and VectorProduct().
void StreeterFibreGenerator< SPACE_DIM >::SetApexToBase | ( | const c_vector< double, SPACE_DIM > & | apexToBase | ) | [inline] |
Set the direction from apex to base
apexToBase | is a non-zero vector. It will be stored in normalised form |
Definition at line 471 of file StreeterFibreGenerator.cpp.
References EXCEPTION, and StreeterFibreGenerator< SPACE_DIM >::mApexToBase.
void StreeterFibreGenerator< SPACE_DIM >::SetApexToBase | ( | unsigned | axis | ) | [inline] |
Set the direction from apex to base
axis | is the Cartesian axis from apex to base. |
Definition at line 481 of file StreeterFibreGenerator.cpp.
References EXCEPTION, and StreeterFibreGenerator< SPACE_DIM >::mApexToBase.
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 48 of file StreeterFibreGenerator.hpp.
Referenced by StreeterFibreGenerator< SPACE_DIM >::GenerateOrthotropicFibreOrientation(), StreeterFibreGenerator< SPACE_DIM >::GetAveragedThicknessLocalNode(), and StreeterFibreGenerator< SPACE_DIM >::SetSurfaceFiles().
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 50 of file StreeterFibreGenerator.hpp.
Referenced by StreeterFibreGenerator< SPACE_DIM >::GenerateOrthotropicFibreOrientation(), StreeterFibreGenerator< SPACE_DIM >::SetSurfaceFiles(), and StreeterFibreGenerator< SPACE_DIM >::~StreeterFibreGenerator().
c_vector<double, SPACE_DIM> StreeterFibreGenerator< SPACE_DIM >::mApexToBase [private] |
Normalised direction from apex to base
Definition at line 52 of file StreeterFibreGenerator.hpp.
Referenced by StreeterFibreGenerator< SPACE_DIM >::GenerateOrthotropicFibreOrientation(), and StreeterFibreGenerator< SPACE_DIM >::SetApexToBase().