Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
PapillaryFibreCalculator Class Reference

#include <PapillaryFibreCalculator.hpp>

+ Collaboration diagram for PapillaryFibreCalculator:

Public Member Functions

 PapillaryFibreCalculator (TetrahedralMesh< 3, 3 > &rMesh)
 
std::vector< c_vector< double, 3 > > CalculateFibreOrientations ()
 

Private Member Functions

c_vector< double, 3 > GetRadiusVectorForOneElement (unsigned elementIndex)
 
void GetRadiusVectors ()
 
void ConstructStructureTensors ()
 
void SmoothStructureTensors ()
 

Private Attributes

TetrahedralMesh< 3, 3 > & mrMesh
 
std::vector< c_vector< double, 3 > > mRadiusVectors
 
std::vector< c_matrix< double, 3, 3 > > mStructureTensors
 
std::vector< c_matrix< double, 3, 3 > > mSmoothedStructureTensors
 

Friends

class TestPapillaryFibreCalculator
 

Detailed Description

Assigns fibre orientation vectors for papillary muscle structures. Vectors are assigned to be parallel to the direction of the axis of the muscle. To do this we use the "Structure Tensor" method.

Definition at line 46 of file PapillaryFibreCalculator.hpp.

Constructor & Destructor Documentation

◆ PapillaryFibreCalculator()

PapillaryFibreCalculator::PapillaryFibreCalculator ( TetrahedralMesh< 3, 3 > &  rMesh)

Constructor saves mesh and allocates memory

Parameters
rMeshThe mesh to calculate fibres on

Definition at line 112 of file PapillaryFibreCalculator.hpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), mRadiusVectors, mrMesh, mSmoothedStructureTensors, and mStructureTensors.

Member Function Documentation

◆ CalculateFibreOrientations()

std::vector< c_vector< double, 3 > > PapillaryFibreCalculator::CalculateFibreOrientations ( )

Main method - calculate the fibre orientations

Returns
A fibre vector for each element

Definition at line 120 of file PapillaryFibreCalculator.hpp.

References ConstructStructureTensors(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), GetRadiusVectors(), mrMesh, mSmoothedStructureTensors, and SmoothStructureTensors().

◆ ConstructStructureTensors()

void PapillaryFibreCalculator::ConstructStructureTensors ( )
private

This generates structure tensors from the radial vectors by taking

T = r.r'

Definition at line 182 of file PapillaryFibreCalculator.hpp.

References mRadiusVectors, and mStructureTensors.

Referenced by CalculateFibreOrientations().

◆ GetRadiusVectorForOneElement()

c_vector< double, 3 > PapillaryFibreCalculator::GetRadiusVectorForOneElement ( unsigned  elementIndex)
private

This method calculates the vector from the centroid of an element to all of the boundary nodes. It returns the shortest of the vectors.

Parameters
elementIndexThe index of the element we are calculating radial vectors for
Returns
The shortest radial vector

Definition at line 139 of file PapillaryFibreCalculator.hpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryNodeIteratorBegin(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryNodeIteratorEnd(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), and mrMesh.

Referenced by GetRadiusVectors().

◆ GetRadiusVectors()

void PapillaryFibreCalculator::GetRadiusVectors ( )
private

◆ SmoothStructureTensors()

void PapillaryFibreCalculator::SmoothStructureTensors ( )
private

Smoothes the structure tensor components for each papillary element by looping over all other papillary elements, calculating distance geometric distance between the two elements; if it is within a certain limit, include this in the Gaussian kernel

Here mStructureTensors[i] is the 'rough' tensor for each element and mSmoothedStructureTensors[i] is the smoothed tensor for each element

Definition at line 190 of file PapillaryFibreCalculator.hpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), mrMesh, mSmoothedStructureTensors, and mStructureTensors.

Referenced by CalculateFibreOrientations().

Friends And Related Symbol Documentation

◆ TestPapillaryFibreCalculator

friend class TestPapillaryFibreCalculator
friend

Definition at line 49 of file PapillaryFibreCalculator.hpp.

Member Data Documentation

◆ mRadiusVectors

std::vector< c_vector<double, 3> > PapillaryFibreCalculator::mRadiusVectors
private

vectors from the centre of each element to the nearest boundary node

Definition at line 55 of file PapillaryFibreCalculator.hpp.

Referenced by PapillaryFibreCalculator(), ConstructStructureTensors(), and GetRadiusVectors().

◆ mrMesh

TetrahedralMesh<3,3>& PapillaryFibreCalculator::mrMesh
private

◆ mSmoothedStructureTensors

std::vector< c_matrix<double,3,3> > PapillaryFibreCalculator::mSmoothedStructureTensors
private

Smoothed tensors created from mStructureTensors

Definition at line 59 of file PapillaryFibreCalculator.hpp.

Referenced by PapillaryFibreCalculator(), CalculateFibreOrientations(), and SmoothStructureTensors().

◆ mStructureTensors

std::vector< c_matrix<double,3,3> > PapillaryFibreCalculator::mStructureTensors
private

Tensors created from mRadiusVectors

Definition at line 57 of file PapillaryFibreCalculator.hpp.

Referenced by PapillaryFibreCalculator(), ConstructStructureTensors(), and SmoothStructureTensors().


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