![]() |
Chaste Commit::333233612e3dcc941d260418acd7b5ccdc30390e
|
#include <ElectroMechanicsProblemDefinition.hpp>
Friends | |
class | TestExplicitCardiacMechanicsSolver |
class | TestImplicitCardiacMechanicsSolver |
class | TestElectroMechanicsProblemDefinition |
Additional Inherited Members | |
![]() | |
static const double | FREE = std::numeric_limits<double>::max() |
![]() | |
AbstractTetrahedralMesh< DIM, DIM > & | mrMesh |
double | mDensity |
BodyForceType | mBodyForceType |
c_vector< double, DIM > | mConstantBodyForce |
c_vector< double, DIM >(* | mpBodyForceFunction )(c_vector< double, DIM > &rX, double t) |
TractionBoundaryConditionType | mTractionBoundaryConditionType |
std::vector< BoundaryElement< DIM-1, DIM > * > | mTractionBoundaryElements |
std::vector< c_vector< double, DIM > > | mElementwiseTractions |
double | mNormalPressure |
double | mOriginalNormalPressure |
c_vector< double, DIM >(* | mpTractionBoundaryConditionFunction )(c_vector< double, DIM > &rX, double t) |
double(* | mpNormalPressureFunction )(double t) |
std::vector< unsigned > | mDirichletNodes |
std::vector< c_vector< double, DIM > > | mDirichletNodeValues |
bool | mVerboseDuringSolve |
Subclass of SolidMechanicsProblemDefinition with some cardiac-electro-mechanics-specific methods.
Definition at line 52 of file ElectroMechanicsProblemDefinition.hpp.
ElectroMechanicsProblemDefinition< DIM >::ElectroMechanicsProblemDefinition | ( | QuadraticMesh< DIM > & | rMesh | ) |
Constructor
rMesh | the mesh |
Definition at line 40 of file ElectroMechanicsProblemDefinition.cpp.
|
virtual |
Destructor
Definition at line 59 of file ElectroMechanicsProblemDefinition.cpp.
|
inline |
Definition at line 375 of file ElectroMechanicsProblemDefinition.hpp.
References ElectroMechanicsProblemDefinition< DIM >::mApplyCrossFibreTension.
|
inline |
Definition at line 257 of file ElectroMechanicsProblemDefinition.hpp.
References ElectroMechanicsProblemDefinition< DIM >::mpContractionCellFactory.
|
inline |
Definition at line 278 of file ElectroMechanicsProblemDefinition.hpp.
References ElectroMechanicsProblemDefinition< DIM >::mContractionModelOdeTimeStep.
|
inline |
Definition at line 306 of file ElectroMechanicsProblemDefinition.hpp.
References ElectroMechanicsProblemDefinition< DIM >::mDeformationAffectsCellModels.
|
inline |
Definition at line 297 of file ElectroMechanicsProblemDefinition.hpp.
References ElectroMechanicsProblemDefinition< DIM >::mDeformationAffectsConductivity.
|
inline |
Definition at line 342 of file ElectroMechanicsProblemDefinition.hpp.
References ElectroMechanicsProblemDefinition< DIM >::mFibreSheetDirectionsDefinedPerQuadraturePoint, and ElectroMechanicsProblemDefinition< DIM >::mReadFibreSheetInformationFromFile.
|
inline |
Definition at line 330 of file ElectroMechanicsProblemDefinition.hpp.
References FileFinder::GetAbsolutePath(), ElectroMechanicsProblemDefinition< DIM >::mFibreSheetDirectionsFile, and ElectroMechanicsProblemDefinition< DIM >::mReadFibreSheetInformationFromFile.
|
inline |
Definition at line 287 of file ElectroMechanicsProblemDefinition.hpp.
References ElectroMechanicsProblemDefinition< DIM >::mMechanicsSolveTimestep.
|
inline |
Definition at line 367 of file ElectroMechanicsProblemDefinition.hpp.
References ElectroMechanicsProblemDefinition< DIM >::mNumIncrementsForInitialDeformation.
|
inline |
Definition at line 391 of file ElectroMechanicsProblemDefinition.hpp.
References ElectroMechanicsProblemDefinition< DIM >::mSheetNormalTensionFraction.
|
inline |
Definition at line 383 of file ElectroMechanicsProblemDefinition.hpp.
References ElectroMechanicsProblemDefinition< DIM >::mSheetTensionFraction.
|
inline |
Definition at line 314 of file ElectroMechanicsProblemDefinition.hpp.
References ElectroMechanicsProblemDefinition< DIM >::mSolverType.
|
inline |
Definition at line 322 of file ElectroMechanicsProblemDefinition.hpp.
References ElectroMechanicsProblemDefinition< DIM >::mReadFibreSheetInformationFromFile.
void ElectroMechanicsProblemDefinition< DIM >::SetApplyAnisotropicCrossFibreTension | ( | bool | applyCrossFibreTension, |
double | sheetTensionFraction, | ||
double | sheetNormalTensionFraction | ||
) |
Set if active tension should be applied in the cross-fibre directions. This only makes sense in 3D.
By default active tension is only applied in the fibre direction. This method allows the user to specify that a proportion of the active tension should also be applied in the cross-fibre directions. The fraction of the active tension that is applied in the two cross-fibre direction should be specified.
applyCrossFibreTension | active tension is applied in the cross-fibre directions if set to true. |
sheetTensionFraction | The fraction of the active tension to apply in the sheet direction. |
sheetNormalTensionFraction | The fraction of the active tension to apply in the sheet-normal direction. |
Definition at line 143 of file ElectroMechanicsProblemDefinition.cpp.
References EXCEPTION.
void ElectroMechanicsProblemDefinition< DIM >::SetApplyIsotropicCrossFibreTension | ( | bool | applyCrossFibreTension, |
double | crossFibreTensionFraction | ||
) |
Set if active tension should be applied in the cross-fibre directions. This can be done in 2D or 3D.
By default active tension is only applied in the fibre direction. This method allows the user to specify that a proportion of the active tension should also be applied in the cross-fibre directions (both in the sheet and sheet-normal directions equally). The fraction of the active tension that is applied in the cross-fibre direction should be specified.
applyCrossFibreTension | active tension is applied in the cross-fibre directions if set to true. |
crossFibreTensionFraction | The fraction of the active tension to apply in the cross-fibre directions. |
Definition at line 135 of file ElectroMechanicsProblemDefinition.cpp.
void ElectroMechanicsProblemDefinition< DIM >::SetContractionCellFactory | ( | AbstractContractionCellFactory< DIM > * | pCellFactory | ) |
We provide an interface to set heterogeneous contraction cells via a cell factory, which allows different models (or parameters) to be set per element.
Note you also need to call SetContractionModelOdeTimestep() before solving.
pCellFactory | The contraction cell factory to be used. |
Definition at line 155 of file ElectroMechanicsProblemDefinition.cpp.
References AbstractContractionCellFactory< DIM >::SetMechanicsMesh().
void ElectroMechanicsProblemDefinition< DIM >::SetContractionModel | ( | ContractionModelName | contractionModel, |
double | timestep | ||
) |
Set the contraction model to be used (throughout the tissue).
Note the timestep should be set to a (typical) ODE time-step even if the contraction model is not going to solve ODEs.
contractionModel | contraction model (from the enumeration ContractionModelName) |
timestep | timestep to be used in solving (ODE-based) contraction models. |
Definition at line 73 of file ElectroMechanicsProblemDefinition.cpp.
|
inline |
Set the timestep to be used when solving contraction models. Note that you will need to use the finest timestep that any of the models requires, it is not set on a per-model basis.
timestep | Timestep to use. |
Definition at line 270 of file ElectroMechanicsProblemDefinition.hpp.
References ElectroMechanicsProblemDefinition< DIM >::mContractionModelOdeTimeStep.
void ElectroMechanicsProblemDefinition< DIM >::SetDeformationAffectsElectrophysiology | ( | bool | deformationAffectsConductivity, |
bool | deformationAffectsCellModels | ||
) |
Set if and how the deformation should affect the electro-physiology.
deformationAffectsConductivity | Whether the deformation should affect the electrical physiological conductivity (or whether this effect is neglected) |
deformationAffectsCellModels | Whether the deformation should affect the cardiac cell models, for example if there are stretch-activated channels in the cell model. |
Several important things to note: (i) this can't be called if fibre-sheet directions have been defined from file for each quadrature point (as opposed to each mechanics element) - this is because if the stretch is to be passed back to the electric mesh nodes, the fibre direction has to be defined at those nodes (ii) currently the set-up stage (computing mechanics mesh elements and weights for electrics mesh nodes) is inefficiently implemented - setup will be very slow for big meshes (iii) if deformationAffectsCellModels is true, the cell model ought to be one for which AbstractCardiacCell::SetStretch() has been implemented to do something (i.e. not generated automatically from CellML). (iv) deformationAffectsConductivity is not currently allowed in the compressible material law case as the effect of the determinant of the deformation gradient on the conductivity has not currently been implemented.
Definition at line 113 of file ElectroMechanicsProblemDefinition.cpp.
void ElectroMechanicsProblemDefinition< DIM >::SetMechanicsSolveTimestep | ( | double | timestep | ) |
Set how often the mechanics is solved for.
timestep | timestep |
Definition at line 120 of file ElectroMechanicsProblemDefinition.cpp.
|
inline |
The first deformation (to find the equilibrium state given the loading) may require the loading to be incremented, in order for the Solve() to converge. Set the number of increments to be used.
numIncrements | number of increments |
Definition at line 354 of file ElectroMechanicsProblemDefinition.hpp.
References EXCEPTION, and ElectroMechanicsProblemDefinition< DIM >::mNumIncrementsForInitialDeformation.
|
inline |
Decide which type of solver to attempt to use. Default value is IMPLICIT if this method is not called.
solver | The solver type to use (EXPLICIT or IMPLICIT). |
Definition at line 175 of file ElectroMechanicsProblemDefinition.hpp.
References ElectroMechanicsProblemDefinition< DIM >::mSolverType.
void ElectroMechanicsProblemDefinition< DIM >::SetUseDefaultCardiacMaterialLaw | ( | CompressibilityType | compressibilityType | ) |
Use the default material law (NashHunter in the incompressible case, exponential in the compressible case), throughout the tissue.
compressibilityType | Either INCOMPRESSIBLE or COMPRESSIBLE |
Definition at line 93 of file ElectroMechanicsProblemDefinition.cpp.
void ElectroMechanicsProblemDefinition< DIM >::SetVariableFibreSheetDirectionsFile | ( | const FileFinder & | rFibreSheetDirectionsFile, |
bool | definedPerQuadPoint | ||
) |
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 standard .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.
If this method is not called, the default fibre-sheet directions are used - ie fibres parallel to X-axis, sheets parallel to Y-axis.
rFibreSheetDirectionsFile | the file containing the fibre/sheet directions |
definedPerQuadPoint | whether the fibre-sheet definitions are for each quadrature point in the mesh (if not, one for each element is assumed). |
Definition at line 127 of file ElectroMechanicsProblemDefinition.cpp.
|
virtual |
Check all variables are set appropriately. Exceptions are thrown if any are not. Derived classes can override but should call this version as well.
Reimplemented from SolidMechanicsProblemDefinition< DIM >.
Definition at line 165 of file ElectroMechanicsProblemDefinition.cpp.
References EXCEPTION, and SolidMechanicsProblemDefinition< DIM >::Validate().
|
friend |
Definition at line 57 of file ElectroMechanicsProblemDefinition.hpp.
|
friend |
Definition at line 55 of file ElectroMechanicsProblemDefinition.hpp.
|
friend |
Definition at line 56 of file ElectroMechanicsProblemDefinition.hpp.
|
private |
Whether to apply active tension in the cross-fibre directions (either iso- or aniso-tropic).
Definition at line 108 of file ElectroMechanicsProblemDefinition.hpp.
Referenced by ElectroMechanicsProblemDefinition< DIM >::GetApplyCrossFibreTension().
|
private |
Timestep to use when solving contraction models
Definition at line 60 of file ElectroMechanicsProblemDefinition.hpp.
Referenced by ElectroMechanicsProblemDefinition< DIM >::GetContractionModelOdeTimestep(), and ElectroMechanicsProblemDefinition< DIM >::SetContractionModelOdeTimestep().
|
private |
Whether the deformation should affect the cardiac cell models, for example if there are stretch-activated channels in the cell model.
Definition at line 75 of file ElectroMechanicsProblemDefinition.hpp.
Referenced by ElectroMechanicsProblemDefinition< DIM >::GetDeformationAffectsCellModels().
|
private |
Whether the deformation should affect the electrical physiological conductivity (or whether this effect is neglected)
Definition at line 69 of file ElectroMechanicsProblemDefinition.hpp.
Referenced by ElectroMechanicsProblemDefinition< DIM >::GetDeformationAffectsConductivity().
|
private |
Whether the mFibreSheetDirectionsFile file gives the fibre-sheet info for each element or for each quadrature point
Definition at line 96 of file ElectroMechanicsProblemDefinition.hpp.
Referenced by ElectroMechanicsProblemDefinition< DIM >::GetFibreSheetDirectionsDefinedPerQuadraturePoint().
|
private |
.ortho/.orthoquad file from which to read element-wise, or quadrature-point-wise fibre-sheet-normal-directions
Definition at line 90 of file ElectroMechanicsProblemDefinition.hpp.
Referenced by ElectroMechanicsProblemDefinition< DIM >::GetFibreSheetDirectionsFile().
|
private |
How often a mechanics solve should be done
Definition at line 63 of file ElectroMechanicsProblemDefinition.hpp.
Referenced by ElectroMechanicsProblemDefinition< DIM >::GetMechanicsSolveTimestep().
|
private |
The first deformation (to find the equilibrium state given the loading) may require the loading to be incremented, in order for the Solve() to converge - this stores the number of increments to be used (initialised to 1)
Definition at line 103 of file ElectroMechanicsProblemDefinition.hpp.
Referenced by ElectroMechanicsProblemDefinition< DIM >::GetNumIncrementsForInitialDeformation(), and ElectroMechanicsProblemDefinition< DIM >::SetNumIncrementsForInitialDeformation().
|
private |
The contraction cell factory, provides the contraction model to use on each element
Definition at line 121 of file ElectroMechanicsProblemDefinition.hpp.
Referenced by ElectroMechanicsProblemDefinition< DIM >::GetContractionCellFactory().
|
private |
This member variable is used if SetDefaultCardiacMateriawLaw() is called.
Definition at line 80 of file ElectroMechanicsProblemDefinition.hpp.
|
private |
Whether to read fibre-sheet information from file
Definition at line 84 of file ElectroMechanicsProblemDefinition.hpp.
Referenced by ElectroMechanicsProblemDefinition< DIM >::GetFibreSheetDirectionsDefinedPerQuadraturePoint(), ElectroMechanicsProblemDefinition< DIM >::GetFibreSheetDirectionsFile(), and ElectroMechanicsProblemDefinition< DIM >::ReadFibreSheetDirectionsFromFile().
|
private |
The fraction of the fibre tension to apply in the sheet-normal direction.
Definition at line 118 of file ElectroMechanicsProblemDefinition.hpp.
Referenced by ElectroMechanicsProblemDefinition< DIM >::GetSheetNormalTensionFraction().
|
private |
The fraction of the fibre tension to apply in the sheet direction.
Definition at line 113 of file ElectroMechanicsProblemDefinition.hpp.
Referenced by ElectroMechanicsProblemDefinition< DIM >::GetSheetTensionFraction().
|
private |
Whether to use an explicit or implicit solver
Definition at line 127 of file ElectroMechanicsProblemDefinition.hpp.
Referenced by ElectroMechanicsProblemDefinition< DIM >::GetSolverType(), and ElectroMechanicsProblemDefinition< DIM >::SetSolverType().
|
private |
Whether we made the cell factory and therefore need to delete it!
Definition at line 124 of file ElectroMechanicsProblemDefinition.hpp.