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 "QuadraticBasisFunction.hpp"
00035 #include "LinearBasisFunction.hpp"
00036 #include "NashHunterPoleZeroLaw.hpp"
00037 #include "AbstractContractionModel.hpp"
00038 #include "LogFile.hpp"
00039 #include <cfloat>
00040
00041
00050 template<unsigned DIM>
00051 class ImplicitCardiacMechanicsSolver : public AbstractCardiacMechanicsSolver<DIM>
00052 {
00053 friend class TestImplicitCardiacMechanicsSolver;
00054
00055 private:
00061 std::vector<double> mStretchesLastTimeStep;
00062
00069 bool IsImplicitSolver()
00070 {
00071 return true;
00072 }
00087 void GetActiveTensionAndTensionDerivs(double currentFibreStretch,
00088 unsigned currentQuadPointGlobalIndex,
00089 bool assembleJacobian,
00090 double& rActiveTension,
00091 double& rDerivActiveTensionWrtLambda,
00092 double& rDerivActiveTensionWrtDLambdaDt);
00093
00094 public:
00105 ImplicitCardiacMechanicsSolver(ContractionModel contractionModel,
00106 QuadraticMesh<DIM>* pQuadMesh,
00107 std::string outputDirectory,
00108 std::vector<unsigned>& rFixedNodes,
00109 AbstractIncompressibleMaterialLaw<DIM>* pMaterialLaw = NULL);
00110
00114 virtual ~ImplicitCardiacMechanicsSolver();
00115
00116
00124 std::vector<double>& rGetFibreStretches();
00125
00137 void Solve(double time, double nextTime, double odeTimestep);
00138 };
00139
00140
00141
00142 #endif