Chaste  Release::2018.1
AbstractCardiacMechanicsSolverInterface< DIM > Class Template Referenceabstract

#include <AbstractCardiacMechanicsSolverInterface.hpp>

+ Inheritance diagram for AbstractCardiacMechanicsSolverInterface< DIM >:
+ Collaboration diagram for AbstractCardiacMechanicsSolverInterface< DIM >:

Public Member Functions

 AbstractCardiacMechanicsSolverInterface ()
 
virtual ~AbstractCardiacMechanicsSolverInterface ()
 
virtual unsigned GetTotalNumQuadPoints ()=0
 
virtual GaussianQuadratureRule
< DIM > * 
GetQuadratureRule ()=0
 
virtual void Initialise ()=0
 
virtual void SetFineCoarseMeshPair (FineCoarseMeshPair< DIM > *pMeshPair)=0
 
virtual void SetConstantFibreSheetDirections (const c_matrix< double, DIM, DIM > &rFibreSheetMatrix)=0
 
virtual void SetVariableFibreSheetDirections (const FileFinder &rOrthoFile, bool definedPerQuadraturePoint)=0
 
virtual void SetCalciumAndVoltage (std::vector< double > &rCalciumConcentrations, std::vector< double > &rVoltages)=0
 
virtual void Solve (double time, double nextTime, double odeTimestep)=0
 
virtual void ComputeDeformationGradientAndStretchInEachElement (std::vector< c_matrix< double, DIM, DIM > > &rDeformationGradients, std::vector< double > &rStretches)=0
 

Detailed Description

template<unsigned DIM>
class AbstractCardiacMechanicsSolverInterface< DIM >

This class declares all the main public methods in AbstractCardiacMechanicsSolver.

The methods declared here are all pure virtual, and implemented in AbstractCardiacMechanicsSolver or it's children. The point of this class is that it is nothing templated over elasticity solver (unlike AbstractCardiacMechanicsSolver), so is more convenient to use, in particular the cardiac electro-mechanics problem class can own a pointer to one of these (ie, a AbstractCardiacMechanicsSolverInterface<DIM>*), and then the problem does not also require templating over solver.

Definition at line 55 of file AbstractCardiacMechanicsSolverInterface.hpp.

Constructor & Destructor Documentation

Constructor, does nothing

Definition at line 59 of file AbstractCardiacMechanicsSolverInterface.hpp.

template<unsigned DIM>
virtual AbstractCardiacMechanicsSolverInterface< DIM >::~AbstractCardiacMechanicsSolverInterface ( )
inlinevirtual

Destructor, does nothing

Definition at line 64 of file AbstractCardiacMechanicsSolverInterface.hpp.

Member Function Documentation

template<unsigned DIM>
virtual void AbstractCardiacMechanicsSolverInterface< DIM >::ComputeDeformationGradientAndStretchInEachElement ( std::vector< c_matrix< double, DIM, DIM > > &  rDeformationGradients,
std::vector< double > &  rStretches 
)
pure virtual

Compute the deformation gradient, and stretch in the fibre direction, for each element in the mesh. Note: using quadratic interpolation for position, the deformation gradients and stretches actually vary linearly in each element. However, for computational efficiency reasons, when computing deformation gradients and stretches to pass back to the electrophysiology solver, we just assume they are constant in each element (ie ignoring the quadratic correction to the displacement). This means that the (const) deformation gradient and stretch for each element can be computed in advance and stored, and we don't have to worry about interpolation onto the precise location of the cell-model (electrics-mesh) node, just which element it is in, and ditto the electric mesh element centroid.

To compute this (elementwise-)constant F (and from it the constant stretch), we just have to compute F using the deformed positions at the vertices only, with linear bases, rather than all the nodes and quadratic bases.

Parameters
rDeformationGradientsA reference of a std::vector in which the deformation gradient in each element will be returned. Must be allocated prior to being passed in.
rStretchesA reference of a std::vector in which the stretch in each element will be returned. Must be allocated prior to being passed in.

Implemented in AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >.

template<unsigned DIM>
virtual GaussianQuadratureRule<DIM>* AbstractCardiacMechanicsSolverInterface< DIM >::GetQuadratureRule ( )
pure virtual
Returns
the quadrature rule used in the elements.

Implemented in AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >.

template<unsigned DIM>
virtual unsigned AbstractCardiacMechanicsSolverInterface< DIM >::GetTotalNumQuadPoints ( )
pure virtual
Returns
the total number of quad points in the mesh. Pure, implemented in concrete solver

Implemented in AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >.

template<unsigned DIM>
virtual void AbstractCardiacMechanicsSolverInterface< DIM >::Initialise ( )
pure virtual

Sets relevant data at all quad points, including whether it is an active region or not. The contraction model is set to NULL. At the end, it calls InitialiseContractionModels in the child class to assign a proper model.

Implemented in AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >.

template<unsigned DIM>
virtual void AbstractCardiacMechanicsSolverInterface< DIM >::SetCalciumAndVoltage ( std::vector< double > &  rCalciumConcentrations,
std::vector< double > &  rVoltages 
)
pure virtual

Set the intracellular Calcium concentrations and voltages at each quad point. Pure.

Implicit solvers (for contraction models which are functions of stretch (and maybe stretch rate) would integrate the contraction model with this Ca/V/t using the current stretch (ie inside AssembleOnElement, ie inside GetActiveTensionAndTensionDerivs). Explicit solvers (for contraction models which are NOT functions of stretch can immediately integrate the contraction models to get the active tension.

Parameters
rCalciumConcentrationsReference to a vector of intracellular calcium concentrations at each quadrature point
rVoltagesReference to a vector of voltages at each quadrature point

Implemented in AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >.

template<unsigned DIM>
virtual void AbstractCardiacMechanicsSolverInterface< DIM >::SetConstantFibreSheetDirections ( const c_matrix< double, DIM, DIM > &  rFibreSheetMatrix)
pure virtual

Set a constant fibre-sheet-normal direction (a matrix) to something other than the default (fibres in X-direction, sheet in the XY plane)

Parameters
rFibreSheetMatrixThe fibre-sheet-normal matrix (fibre dir the first column, normal-to-fibre-in sheet in second column, sheet-normal in third column).

Implemented in AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >.

template<unsigned DIM>
virtual void AbstractCardiacMechanicsSolverInterface< DIM >::SetFineCoarseMeshPair ( FineCoarseMeshPair< DIM > *  pMeshPair)
pure virtual

Sets the fine-coarse mesh pair object so that the solver knows about electrics too. It checks that the coarse mesh of the fine-mesh pair has the same number of elements as the quad mesh of this object and throws an exception otherwise.

Parameters
pMeshPairthe FineCoarseMeshPair object to be set

Implemented in AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >.

template<unsigned DIM>
virtual void AbstractCardiacMechanicsSolverInterface< DIM >::SetVariableFibreSheetDirections ( const FileFinder rOrthoFile,
bool  definedPerQuadraturePoint 
)
pure virtual

Set a variable fibre-sheet-normal direction (matrices), from file. If the second parameter is false, there should be one fibre-sheet definition for each element; otherwise there should be one fibre-sheet definition for each *quadrature point* in the mesh. In the first case, the file should be a .ortho file (ie each line has the fibre dir, sheet dir, normal dir for that element), in the second it should have .orthoquad as the format.

Parameters
rOrthoFilethe file containing the fibre/sheet directions
definedPerQuadraturePointwhether the fibre-sheet definitions are for each quadrature point in the mesh (if not, one for each element is assumed).

Implemented in AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >.

template<unsigned DIM>
virtual void AbstractCardiacMechanicsSolverInterface< DIM >::Solve ( double  time,
double  nextTime,
double  odeTimestep 
)
pure virtual

Solve for the deformation, integrating the contraction model ODEs.

Parameters
timethe current time
nextTimethe next time
odeTimestepthe ODE timestep

Implemented in AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >, ExplicitCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >, and ImplicitCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >.


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