36 #include "ElectroMechanicsProblemDefinition.hpp" 37 #include "LabelBasedContractionCellFactory.hpp" 39 template<
unsigned DIM>
42 mContractionModelOdeTimeStep(-1.0),
43 mMechanicsSolveTimestep(-1.0),
44 mDeformationAffectsConductivity(false),
45 mDeformationAffectsCellModels(false),
46 mpDefaultMaterialLaw(NULL),
47 mReadFibreSheetInformationFromFile(false),
48 mNumIncrementsForInitialDeformation(1),
49 mApplyCrossFibreTension(false),
52 mpContractionCellFactory(NULL),
53 mWeMadeCellFactory(false),
58 template<
unsigned DIM>
72 template<
unsigned DIM>
75 assert(timestep > 0.0);
78 if (contractionModel == NASH2004 || contractionModel == CONSTANT)
92 template<
unsigned DIM>
100 if (compressibilityType == INCOMPRESSIBLE)
112 template<
unsigned DIM>
119 template<
unsigned DIM>
122 assert(timestep > 0.0);
126 template<
unsigned DIM>
134 template<
unsigned DIM>
142 template<
unsigned DIM>
147 EXCEPTION(
"You can only apply anisotropic cross fibre tensions in a 3D simulation.");
154 template<
unsigned DIM>
164 template<
unsigned DIM>
171 EXCEPTION(
"Timestep for mechanics solve hasn't been set yet");
176 std::string message =
"Contraction model or contraction model ODE timestep have not been set. " 177 "Make sure SetContractionModel(), or SetContractionCellFactory() AND SetContractionModelOdeTimestep " 178 "are called. (Pass in a timestep even if contraction model is algebraic and won't use it). ";
187 EXCEPTION(
"Deformation affecting the conductivity is currently not implemented fully for compressible problems");
193 std::stringstream message;
194 message <<
"Deformation affecting cell models cannot be done when fibres-sheet information is defined for each quadrature point.";
195 message <<
"Define fibre-sheet information for each element instead.";
ElectroMechanicsProblemDefinition(QuadraticMesh< DIM > &rMesh)
void SetContractionCellFactory(AbstractContractionCellFactory< DIM > *pCellFactory)
bool mFibreSheetDirectionsDefinedPerQuadraturePoint
double mMechanicsSolveTimestep
AbstractContractionCellFactory< DIM > * mpContractionCellFactory
#define EXCEPTION(message)
AbstractMaterialLaw< DIM > * mpDefaultMaterialLaw
void SetContractionModel(ContractionModelName contractionModel, double timestep)
void SetSolverType(SolverType solver)
void SetContractionModelOdeTimestep(double timestep)
const double DOUBLE_UNSET
void SetMaterialLaw(CompressibilityType compressibilityType, AbstractMaterialLaw< DIM > *pMaterialLaw)
void SetMechanicsSolveTimestep(double timestep)
AbstractTetrahedralMesh< DIM, DIM > & mrMesh
void SetVariableFibreSheetDirectionsFile(const FileFinder &rFibreSheetDirectionsFile, bool definedPerQuadPoint)
virtual ~ElectroMechanicsProblemDefinition()
double mSheetTensionFraction
double mContractionModelOdeTimeStep
bool mReadFibreSheetInformationFromFile
CompressibilityType GetCompressibilityType()
bool mDeformationAffectsCellModels
bool mApplyCrossFibreTension
void SetApplyAnisotropicCrossFibreTension(bool applyCrossFibreTension, double sheetTensionFraction, double sheetNormalTensionFraction)
double mSheetNormalTensionFraction
bool mDeformationAffectsConductivity
void SetDeformationAffectsElectrophysiology(bool deformationAffectsConductivity, bool deformationAffectsCellModels)
void SetApplyIsotropicCrossFibreTension(bool applyCrossFibreTension, double crossFibreTensionFraction)
void SetUseDefaultCardiacMaterialLaw(CompressibilityType compressibilityType)
FileFinder mFibreSheetDirectionsFile