#include <AbstractLinearPdeSolver.hpp>
Inherits boost::noncopyable.
Inherited by AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, 1 >, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, 2 >, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, 3 >, AbstractStaticLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >, and AbstractStaticLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, 1 >.
Public Member Functions | |
AbstractLinearPdeSolver (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh) | |
virtual | ~AbstractLinearPdeSolver () |
virtual void | InitialiseForSolve (Vec initialSolution=NULL) |
virtual void | PrepareForSetupLinearSystem (Vec currentSolution) |
virtual void | FinaliseLinearSystem (Vec currentSolution) |
virtual void | FollowingSolveLinearSystem (Vec currentSolution) |
virtual void | SetupLinearSystem (Vec currentSolution, bool computeMatrix)=0 |
LinearSystem * | GetLinearSystem () |
Protected Attributes | |
LinearSystem * | mpLinearSystem |
AbstractTetrahedralMesh < ELEMENT_DIM, SPACE_DIM > * | mpMesh |
Simple abstract class containing some common functionality between AbstractStaticLinearPdeSolver and AbstractDynamicLinearPdeSolver.
Definition at line 42 of file AbstractLinearPdeSolver.hpp.
AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractLinearPdeSolver | ( | AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * | pMesh | ) | [inline] |
virtual AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::~AbstractLinearPdeSolver | ( | ) | [inline, virtual] |
Destructor.
Definition at line 69 of file AbstractLinearPdeSolver.hpp.
References AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpLinearSystem.
virtual void AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::FinaliseLinearSystem | ( | Vec | currentSolution | ) | [inline, virtual] |
The static and dynamic Solve() implementations both call this immediately after SetupLinearSystem(). It can be overloaded if further work needs to be done.
currentSolution | The current solution |
Reimplemented in AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >, AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >, AbstractBidomainSolver< DIM, DIM >, AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >, and AbstractExtendedBidomainSolver< DIM, DIM >.
Definition at line 105 of file AbstractLinearPdeSolver.hpp.
Referenced by AbstractStaticLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), and AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
virtual void AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::FollowingSolveLinearSystem | ( | Vec | currentSolution | ) | [inline, virtual] |
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.
currentSolution | The current solution (solution of the linear system solve) |
Reimplemented in OperatorSplittingMonodomainSolver< ELEMENT_DIM, SPACE_DIM >.
Definition at line 118 of file AbstractLinearPdeSolver.hpp.
Referenced by AbstractStaticLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), and AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
LinearSystem* AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetLinearSystem | ( | ) | [inline] |
Get a pointer to the linear system.
Definition at line 138 of file AbstractLinearPdeSolver.hpp.
References AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpLinearSystem.
Referenced by BidomainProblem< DIM >::AtBeginningOfTimestep().
void AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseForSolve | ( | Vec | initialSolution = NULL |
) | [inline, 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.
initialSolution | Initial solution (defaults to NULL) for PETSc to use as a template. |
Reimplemented in AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >, BidomainSolver< ELEMENT_DIM, SPACE_DIM >, AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >, ExtendedBidomainSolver< ELEM_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 >, CellBasedPdeSolver< DIM >, AbstractBidomainSolver< DIM, DIM >, BidomainSolver< 3, 3 >, AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >, AbstractExtendedBidomainSolver< DIM, DIM >, and SimpleLinearEllipticSolver< DIM, DIM >.
Definition at line 145 of file AbstractLinearPdeSolver.hpp.
References GenericEventHandler< 16, HeartEventHandler >::BeginEvent(), GenericEventHandler< 16, HeartEventHandler >::EndEvent(), AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpLinearSystem, and AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh.
Referenced by AbstractStaticLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), and AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
virtual void AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::PrepareForSetupLinearSystem | ( | Vec | currentSolution | ) | [inline, virtual] |
The static and dynamic Solve() implementations both call this before after SetupLinearSystem(). It can be overloaded if needed.
currentSolution | The current solution |
Reimplemented in AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >, AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >, MonodomainSolver< ELEMENT_DIM, SPACE_DIM >, OperatorSplittingMonodomainSolver< ELEMENT_DIM, SPACE_DIM >, LinearParabolicPdeSystemWithCoupledOdeSystemSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >, AbstractBidomainSolver< DIM, DIM >, AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >, and AbstractExtendedBidomainSolver< DIM, DIM >.
Definition at line 94 of file AbstractLinearPdeSolver.hpp.
Referenced by AbstractStaticLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), and AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
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).
currentSolution | The current solution which can be used in setting up the linear system if needed (NULL if there isn't a current solution) | |
computeMatrix | Whether 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 >, MonodomainSolver< ELEMENT_DIM, SPACE_DIM >, OperatorSplittingMonodomainSolver< ELEMENT_DIM, SPACE_DIM >, LinearParabolicPdeSystemWithCoupledOdeSystemSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >, SimpleLinearEllipticSolver< ELEMENT_DIM, SPACE_DIM >, SimpleLinearParabolicSolver< ELEMENT_DIM, SPACE_DIM >, BidomainSolver< 3, 3 >, and SimpleLinearEllipticSolver< DIM, DIM >.
Referenced by AbstractStaticLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), and AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
LinearSystem* AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpLinearSystem [protected] |
The linear system that will be set up and solved as part of the PDE solve.
Definition at line 47 of file AbstractLinearPdeSolver.hpp.
Referenced by AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::CheckCompatibilityCondition(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::CheckCompatibilityCondition(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::FinaliseForBath(), AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::FinaliseLinearSystem(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::FinaliseLinearSystem(), AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetLinearSystem(), SimpleLinearEllipticSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), LinearParabolicPdeSystemWithCoupledOdeSystemSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseForSolve(), AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseForSolve(), OperatorSplittingMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), MonodomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::InitialiseForSolve(), AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), BidomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), CellBasedPdeSolver< DIM >::InitialiseForSolve(), SimpleLinearParabolicSolver< ELEMENT_DIM, SPACE_DIM >::SetupLinearSystem(), SimpleLinearEllipticSolver< DIM, DIM >::SetupLinearSystem(), LinearParabolicPdeSystemWithCoupledOdeSystemSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetupLinearSystem(), OperatorSplittingMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::SetupLinearSystem(), MonodomainSolver< ELEMENT_DIM, SPACE_DIM >::SetupLinearSystem(), ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::SetupLinearSystem(), BidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetupLinearSystem(), AbstractStaticLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), and AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::~AbstractLinearPdeSolver().
AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh [protected] |
Pointer to the mesh.
Reimplemented in LinearParabolicPdeSystemWithCoupledOdeSystemSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.
Definition at line 50 of file AbstractLinearPdeSolver.hpp.
Referenced by BidomainSolver< ELEMENT_DIM, SPACE_DIM >::BidomainSolver(), AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::CheckCompatibilityCondition(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::CheckCompatibilityCondition(), ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::ExtendedBidomainSolver(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::FinaliseForBath(), AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::GenerateNullBasis(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::GenerateNullBasis(), AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseForSolve(), OperatorSplittingMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), MonodomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::InitialiseForSolve(), BidomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseHdf5Writer(), MonodomainSolver< ELEMENT_DIM, SPACE_DIM >::MonodomainSolver(), OperatorSplittingMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::OperatorSplittingMonodomainSolver(), AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetFixedExtracellularPotentialNodes(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetFixedExtracellularPotentialNodes(), OperatorSplittingMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::SetupLinearSystem(), MonodomainSolver< ELEMENT_DIM, SPACE_DIM >::SetupLinearSystem(), ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::SetupLinearSystem(), BidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetupLinearSystem(), and AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().