36#ifndef ABSTRACTLINEARPDESOLVER_HPP_
37#define ABSTRACTLINEARPDESOLVER_HPP_
39#include "LinearSystem.hpp"
40#include "BoundaryConditionsContainer.hpp"
41#include "AbstractTetrahedralMesh.hpp"
42#include "HeartEventHandler.hpp"
48template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM,
unsigned PROBLEM_DIM>
70 assert(pMesh!=
nullptr);
151template <
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);
virtual void InitialiseForSolve(Vec initialSolution=nullptr)
AbstractLinearPdeSolver(AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
virtual void FollowingSolveLinearSystem(Vec currentSolution)
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * mpMesh
virtual ~AbstractLinearPdeSolver()
virtual void PrepareForSetupLinearSystem(Vec currentSolution)
virtual void FinaliseLinearSystem(Vec currentSolution)
virtual void SetupLinearSystem(Vec currentSolution, bool computeMatrix)=0
LinearSystem * mpLinearSystem
LinearSystem * GetLinearSystem()
static void BeginEvent(unsigned event)
static void EndEvent(unsigned event)