36 #ifndef ABSTRACTLINEARPDESOLVER_HPP_
37 #define ABSTRACTLINEARPDESOLVER_HPP_
39 #include "LinearSystem.hpp"
40 #include "BoundaryConditionsContainer.hpp"
41 #include "AbstractTetrahedralMesh.hpp"
42 #include "HeartEventHandler.hpp"
48 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
70 assert(pMesh!=
nullptr);
151 template <
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
154 if (this->mpLinearSystem ==
nullptr)
156 unsigned preallocation = PROBLEM_DIM * mpMesh->CalculateMaximumNodeConnectivityPerProcess();
159 if (initialSolution ==
nullptr)
165 Vec template_vec = mpMesh->GetDistributedVectorFactory()->CreateVec(PROBLEM_DIM);
167 this->mpLinearSystem =
new LinearSystem(template_vec, preallocation);
178 this->mpLinearSystem =
new LinearSystem(initialSolution, preallocation);
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * mpMesh
virtual void PrepareForSetupLinearSystem(Vec currentSolution)
virtual void InitialiseForSolve(Vec initialSolution=nullptr)
static void BeginEvent(unsigned event)
virtual void FollowingSolveLinearSystem(Vec currentSolution)
LinearSystem * GetLinearSystem()
AbstractLinearPdeSolver(AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
virtual void SetupLinearSystem(Vec currentSolution, bool computeMatrix)=0
static void EndEvent(unsigned event)
virtual void FinaliseLinearSystem(Vec currentSolution)
virtual ~AbstractLinearPdeSolver()
LinearSystem * mpLinearSystem