AbstractExtendedBidomainSolver.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
00031
00032
00033
00034
00035
00036
00037 #ifndef ABSTRACTEXTENDEDBIDOMAINSOLVER_HPP_
00038 #define ABSTRACTEXTENDEDBIDOMAINSOLVER_HPP_
00039
00040 #include "AbstractDynamicLinearPdeSolver.hpp"
00041 #include "ExtendedBidomainTissue.hpp"
00042 #include "HeartConfig.hpp"
00043 #include "ExtendedBidomainAssembler.hpp"
00044
00049 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00050 class AbstractExtendedBidomainSolver
00051 : public AbstractDynamicLinearPdeSolver<ELEMENT_DIM,SPACE_DIM,3>
00052 {
00053
00054 protected:
00055
00057 bool mBathSimulation;
00058
00059
00061 ExtendedBidomainTissue<SPACE_DIM>* mpExtendedBidomainTissue;
00062
00064 BoundaryConditionsContainer<ELEMENT_DIM,SPACE_DIM,3>* mpBoundaryConditions;
00065
00070 ExtendedBidomainAssembler<ELEMENT_DIM,SPACE_DIM>* mpExtendedBidomainAssembler;
00071
00073 HeartConfig* mpConfig;
00074
00076 bool mNullSpaceCreated;
00077
00082 std::vector<unsigned> mFixedExtracellularPotentialNodes;
00083
00090 unsigned mRowForAverageOfPhiZeroed;
00091
00092
00099 void InitialiseForSolve(Vec initialSolution);
00100
00101
00113 virtual void CheckCompatibilityCondition();
00114
00115
00123 void PrepareForSetupLinearSystem(Vec existingSolution);
00124
00133 virtual void FinaliseLinearSystem(Vec existingSolution);
00134
00135
00142 virtual Vec GenerateNullBasis() const;
00143
00144 public:
00145
00154 AbstractExtendedBidomainSolver(bool bathSimulation,
00155 AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* pMesh,
00156 ExtendedBidomainTissue<SPACE_DIM>* pTissue,
00157 BoundaryConditionsContainer<ELEMENT_DIM, SPACE_DIM, 3>* pBcc);
00158
00162 virtual ~AbstractExtendedBidomainSolver();
00163
00174 void SetFixedExtracellularPotentialNodes(std::vector<unsigned> fixedExtracellularPotentialNodes);
00175
00181 void SetRowForAverageOfPhiZeroed(unsigned rowMeanPhiEZero);
00182
00186 BoundaryConditionsContainer<ELEMENT_DIM,SPACE_DIM,3>* GetBoundaryConditions()
00187 {
00188 return mpBoundaryConditions;
00189 }
00190
00191 };
00192
00193 #endif