Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM > Class Template Referenceabstract

#include <AbstractLinearPdeSolver.hpp>

+ Inheritance diagram for AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >:
+ Collaboration diagram for AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >:

Public Member Functions

 AbstractLinearPdeSolver (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
 
virtual ~AbstractLinearPdeSolver ()
 
virtual void InitialiseForSolve (Vec initialSolution=nullptr)
 
virtual void PrepareForSetupLinearSystem (Vec currentSolution)
 
virtual void FinaliseLinearSystem (Vec currentSolution)
 
virtual void FollowingSolveLinearSystem (Vec currentSolution)
 
virtual void SetupLinearSystem (Vec currentSolution, bool computeMatrix)=0
 
LinearSystemGetLinearSystem ()
 

Protected Attributes

LinearSystemmpLinearSystem
 
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * mpMesh
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
class AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >

Simple abstract class containing some common functionality between AbstractStaticLinearPdeSolver and AbstractDynamicLinearPdeSolver.

Definition at line 49 of file AbstractLinearPdeSolver.hpp.

Constructor & Destructor Documentation

◆ AbstractLinearPdeSolver()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractLinearPdeSolver ( AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *  pMesh)
inline

Constructor.

Parameters
pMeshthe mesh

Definition at line 66 of file AbstractLinearPdeSolver.hpp.

◆ ~AbstractLinearPdeSolver()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
virtual AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::~AbstractLinearPdeSolver ( )
inlinevirtual

Member Function Documentation

◆ FinaliseLinearSystem()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
virtual void AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::FinaliseLinearSystem ( Vec  currentSolution)
inlinevirtual

The static and dynamic Solve() implementations both call this immediately after SetupLinearSystem(). It can be overloaded if further work needs to be done.

Parameters
currentSolutionThe current solution

Reimplemented in AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >, AbstractBidomainSolver< DIM, DIM >, AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >, AbstractExtendedBidomainSolver< DIM, DIM >, and AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >.

Definition at line 112 of file AbstractLinearPdeSolver.hpp.

◆ FollowingSolveLinearSystem()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
virtual void AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::FollowingSolveLinearSystem ( Vec  currentSolution)
inlinevirtual

The static and dynamic Solve() implementations both call this immediately after the linear solve is carried out (but before the timestep counter is incremented. This can be overloaded if further work on the solution vector needs to be done (for example, in operator splitting of the diffusion and reaction terms in the OperatorSplittingMonodomainSolver.

Parameters
currentSolutionThe current solution (solution of the linear system solve)

Reimplemented in OperatorSplittingMonodomainSolver< ELEMENT_DIM, SPACE_DIM >.

Definition at line 125 of file AbstractLinearPdeSolver.hpp.

◆ GetLinearSystem()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
LinearSystem * AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetLinearSystem ( )
inline
Returns
a pointer to the linear system.

Definition at line 145 of file AbstractLinearPdeSolver.hpp.

References AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpLinearSystem.

◆ InitialiseForSolve()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseForSolve ( Vec  initialSolution = nullptr)
virtual

Initialise method: sets up the linear system (using the mesh to determine the number of unknowns per row to preallocate) if it is not already set up. Can use an initial solution as PETSc template, or base it on the mesh size.

Parameters
initialSolutionInitial solution (defaults to NULL) for PETSc to use as a template.

Reimplemented in CellBasedEllipticPdeSolver< DIM >, AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >, AbstractBidomainSolver< DIM, DIM >, BidomainSolver< ELEMENT_DIM, SPACE_DIM >, AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >, AbstractExtendedBidomainSolver< DIM, DIM >, AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >, ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >, MonodomainPurkinjeSolver< ELEMENT_DIM, SPACE_DIM >, MonodomainSolver< ELEMENT_DIM, SPACE_DIM >, OperatorSplittingMonodomainSolver< ELEMENT_DIM, SPACE_DIM >, LinearParabolicPdeSystemWithCoupledOdeSystemSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >, SimpleLinearEllipticSolver< ELEMENT_DIM, SPACE_DIM >, and SimpleLinearEllipticSolver< DIM, DIM >.

Definition at line 152 of file AbstractLinearPdeSolver.hpp.

References GenericEventHandler< 16, HeartEventHandler >::BeginEvent(), PetscTools::Destroy(), and GenericEventHandler< 16, HeartEventHandler >::EndEvent().

Referenced by AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), MonodomainPurkinjeSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), MonodomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), OperatorSplittingMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), and SimpleLinearEllipticSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve().

◆ PrepareForSetupLinearSystem()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
virtual void AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::PrepareForSetupLinearSystem ( Vec  currentSolution)
inlinevirtual

◆ SetupLinearSystem()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
virtual void AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetupLinearSystem ( Vec  currentSolution,
bool  computeMatrix 
)
pure virtual

The main Solve() methods in the child classes use this method. The concrete solver classes must implement it, depending on the the choice of numerical approach. The method should completely set up the linear system that has to be solved (that timestep, if dynamic PDEs).

Parameters
currentSolutionThe current solution which can be used in setting up the linear system if needed (NULL if there isn't a current solution)
computeMatrixWhether to compute the LHS matrix of the linear system (mainly for dynamic solves).

Implemented in BidomainSolver< ELEMENT_DIM, SPACE_DIM >, ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >, MonodomainPurkinjeSolver< ELEMENT_DIM, SPACE_DIM >, MonodomainSolver< ELEMENT_DIM, SPACE_DIM >, OperatorSplittingMonodomainSolver< ELEMENT_DIM, SPACE_DIM >, LinearParabolicPdeSystemWithCoupledOdeSystemSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >, SimpleLinearEllipticSolver< ELEMENT_DIM, SPACE_DIM >, SimpleLinearEllipticSolver< DIM, DIM >, SimpleLinearParabolicSolver< ELEMENT_DIM, SPACE_DIM >, and SimpleLinearParabolicSolver< DIM, DIM >.

Member Data Documentation

◆ mpLinearSystem

◆ mpMesh


The documentation for this class was generated from the following file: