ImplicitCardiacMechanicsSolver.hpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef IMPLICITCARDIACMECHANICSSOLVER_HPP_
00031 #define IMPLICITCARDIACMECHANICSSOLVER_HPP_
00032
00033 #include "AbstractCardiacMechanicsSolver.hpp"
00034 #include "AbstractCardiacMechanicsSolverInterface.hpp"
00035 #include "LogFile.hpp"
00036 #include <cfloat>
00037
00038
00051 template<class ELASTICITY_SOLVER, unsigned DIM>
00052 class ImplicitCardiacMechanicsSolver : public AbstractCardiacMechanicsSolver<ELASTICITY_SOLVER,DIM>
00053 {
00054 friend class TestImplicitCardiacMechanicsSolver;
00055
00056 private:
00062 std::vector<double> mStretchesLastTimeStep;
00063
00070 bool IsImplicitSolver()
00071 {
00072 return true;
00073 }
00088 void GetActiveTensionAndTensionDerivs(double currentFibreStretch,
00089 unsigned currentQuadPointGlobalIndex,
00090 bool assembleJacobian,
00091 double& rActiveTension,
00092 double& rDerivActiveTensionWrtLambda,
00093 double& rDerivActiveTensionWrtDLambdaDt);
00094
00100 void InitialiseContractionModels(ContractionModelName contractionModel);
00101
00102 public:
00111 ImplicitCardiacMechanicsSolver(ContractionModelName contractionModel,
00112 QuadraticMesh<DIM>& rQuadMesh,
00113 SolidMechanicsProblemDefinition<DIM>& rProblemDefinition,
00114 std::string outputDirectory);
00115
00119 virtual ~ImplicitCardiacMechanicsSolver();
00120
00121
00129 std::vector<double>& rGetFibreStretches();
00130
00142 void Solve(double time, double nextTime, double odeTimestep);
00143 };
00144
00145
00146
00147 #endif