CEPS  24.01
Cardiac ElectroPhysiology Simulator
MonodomainSolver Class Reference

Detailed Description

Solves the monodomain problem with FBE, SBDF RK or CN schemes.

Definition at line 36 of file MonodomainSolver.hpp.

#include <MonodomainSolver.hpp>

Inheritance diagram for MonodomainSolver:
[legend]

Public Member Functions

 MonodomainSolver (MonodomainProblem *p)
 Constructor. More...
 
virtual ~MonodomainSolver ()=default
 Destructor. More...
 
void initializeAssemblers () override
 Sets the assemblers. More...
 
MonodomainProblemgetMonodomainProblem () const
 Converts own pointer to abstract pde problem to cardiac problem. More...
 
- Public Member Functions inherited from CardiacSolver
virtual ~CardiacSolver ()
 Destructor. More...
 
 CardiacSolver (CardiacProblem *problem)
 Constructor with associated PDE problem. More...
 
void solve () override
 Performs all iterations of the PDE solver. More...
 
CepsString getResultsLocationMessage () const
 To be displayed at the end of computation. More...
 
CardiacProblemgetCardiacProblem () const
 Converts own pointer to abstract pde problem to cardiac problem. More...
 
ActivationTrackergetActivationTracker () const
 Link to activation tracker. More...
 
- Public Member Functions inherited from HeatSolver
 HeatSolver ()=delete
 Deleted constructor. More...
 
 HeatSolver (HeatProblem *problem)
 Constructor (valid with HeatProblem and PseudoWaveFrontProblem) More...
 
 ~HeatSolver () override
 Destructor. More...
 
- Public Member Functions inherited from FETimedSolver
 FETimedSolver ()=delete
 Deleted constructor. More...
 
 FETimedSolver (AbstractTimedPdeProblem *problem)
 Constructor (valid with HeatProblem and PseudoWaveFrontProblem) More...
 
 ~FETimedSolver () override
 Destructor. More...
 
- Public Member Functions inherited from AbstractTimedPdeSolver
 AbstractTimedPdeSolver (AbstractTimedPdeProblem *pb)
 Default constructor. More...
 
virtual ~AbstractTimedPdeSolver ()
 Destructor. More...
 
void solve () override
 Solves the all PDE (all iterations) More...
 
void setupWithParameters (InputParameters *params) override
 Set attributes from input file. Parameters are passed as arguments in case one wants to use other parameters. More...
 
CepsUInt getExpectedNumberOfOutputs () const override
 Number of files written. More...
 
DHVecPtr getSolution () const
 Returns a copy of the distributed vector containing the current solution. More...
 
void enableErrorComputation ()
 Sets the comparison with analytic solution. More...
 
CepsArray2< CepsArray3< CepsArray3< CepsReal > > > getErrors () const
 Gets the currently computed errors. First index selects absolute(0) or relative(1) second index select max on t(0), integral on t(1), or error at end of time interval(2) third index is L-inf, L1, L2 selector. More...
 
- Public Member Functions inherited from AbstractPdeSolver
 AbstractPdeSolver ()=delete
 Deleted default constructor. More...
 
 AbstractPdeSolver (AbstractPdeProblem *pb)
 Constructor with problem. More...
 
 AbstractPdeSolver (const AbstractPdeSolver &that)=delete
 No copy. More...
 
AbstractPdeSolveroperator= (const AbstractPdeSolver &that)=delete
 No assignment. More...
 
 ~AbstractPdeSolver () override
 Destructor. More...
 
void disableOutput ()
 Stops output. More...
 
void enableOutput ()
 Starts output. More...
 
TimeWritergetTimeWriter () const
 Access to Time Writer to be able to add data. More...
 
void disableErrorComputation ()
 Sets the comparison with analytic solution. More...
 
- Public Member Functions inherited from CepsObject
 CepsObject ()=default
 default constructor More...
 
 CepsObject (const CepsObject &)=default
 Copy constructor. More...
 
virtual ~CepsObject ()=default
 Destructor. More...
 
CepsObjectoperator= (const CepsObject &)=default
 Assignment operator. More...
 
CepsObjecttoBaseObject ()
 Returns a pointer to CepsObject class. More...
 
const CepsObjecttoBaseObject () const
 Returns a pointer to CepsObject class, const version. More...
 
ProfilergetProfiler () const
 Access to profiler. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CardiacSolver
void assembleAndSolve () override
 Performs one iteration of the solver. More...
 
CepsBool finished () const override
 Tells if simulation reached end time or, if enabled, all points have seen an AP. More...
 
void fillSourceTermsVector (CepsReal tn) override
 Computes all contributions to source terms (ionic current, stimcurrent, field sources) with a loop on source terms. More...
 
void output (DHVecPtr dummy, CepsBool immediatWriting=true) override
 Calls the appropriate post-processing and writing methods. More...
 
- Protected Member Functions inherited from HeatSolver
void initializeAssemblers () override
 Creates the right type of assemblers for LHS and BCs. Needs to be overriden. More...
 
HeatProblemgetHeatProblem () const
 Returns a pointer to the pb with appropriate type. More...
 
- Protected Member Functions inherited from FETimedSolver
void assembleAndSolve () override
 Main routine used during solving, assemble the system depending on the scheme and solve the linear system. More...
 
void assembleAndSolveSBDF (CepsUInt nSteps)
 Updates matrix and RHS for the SBDF numerical scheme. More...
 
void assembleAndSolveCN (CepsUInt nSteps)
 Updates matrix and RHS for the CN numerical scheme. More...
 
- Protected Member Functions inherited from AbstractTimedPdeSolver
AbstractTimedPdeProblemgetTimedProblem () const
 Returns a pointer with the appropriate type of pb. More...
 
virtual void displayProgress () const
 Tells time. More...
 
void determineSolverType (CepsString s)
 Initialize the type from parameter string. More...
 
virtual void allocateArrays ()
 Allocates the arrays with the correct number of multistep. More...
 
void updateAssemblers () override
 Update assemblers and recompute everything is needed. More...
 
virtual void swapMultiStepPointers ()
 Swaps vectors of array pointers for next step (for multistep methods) More...
 
- Protected Member Functions inherited from AbstractPdeSolver
virtual void initializeWriter ()
 Creates the solution writer. More...
 
- Protected Attributes inherited from CardiacSolver
ActivationTrackerm_activationTracker
 Output computation and writing. More...
 
CepsVector< IonicSolver * > m_ionSolvers
 One solver per ionic model in the problem. More...
 
CepsString m_ionSolvOpts
 Options for ionic ODE solvers. More...
 
CepsBool m_writeIIon
 Flag for additional output. More...
 
CepsBool m_writeIapp
 Flag for additional output. More...
 
CepsReal m_postProcessPeriod
 Period of post process calculations. More...
 
std::set< CepsUIntm_saveDepolarizationTime
 Components of which to save depolarization times. More...
 
CepsBool m_stopAtCompleteActivation
 stop when all points have activation time computed More...
 
CepsBool m_stopAtCompleteRepolarization
 stop when all points have APD computed More...
 
- Protected Attributes inherited from FETimedSolver
FiniteElementsm_fe
 Geometry and reference FE. More...
 
DHVecPtr m_temp1
 Temporary vector for assembly of source terms. More...
 
DHVecPtr m_temp2
 Temporary vector for assembly of source terms. More...
 
- Protected Attributes inherited from AbstractTimedPdeSolver
DMatPtr m_dtMat
 Matrix of time derivative of the system. More...
 
DVecPtr m_timeDerEqsVec
 Vector of 1 or 0, depending on whether the dof equation has a time derivative or not. More...
 
DVecPtr m_noTimeDerEqsVec
 The opposite version of m_timeDerEqsVec, such as m_timeDerEqsVec + m_noTimeDerEqsVec = vec(1) More...
 
DHVecPtr m_uNp1
 Vectors of unknowns at time t^n+1. More...
 
CepsVector< DHVecPtrm_uNm
 Solution vectors at different time steps. Several vectors are needed for multi-step methods. (read u^{n-k}). m_uNm[0] is current solution. More...
 
CepsString m_type
 Numerical scheme descriptor. More...
 
CepsString m_rkType
 RK Method if the solver is of type "RK". More...
 
CepsUInt m_nbMultiSteps
 Maximum number of steps needed to compute next solution (eg CN:2) More...
 
TimeStepperm_timeStepper
 Monitors time evolution. More...
 
CepsVector< DHVecPtrm_regSourcesNm
 Sources at previous steps (if problem has source terms) More...
 
CepsVector< DHVecPtrm_lapSourcesNm
 Sources at previous steps (if problem has laplace source terms) More...
 
CepsVector< DHVecPtrm_rkF
 RK methods: intermediate rates. More...
 
CepsVector< DHVecPtrm_rkU
 RK methods: intermediate evaluations. More...
 
CepsReal m_scaleSystem
 A factor for both matrix and vector (typically 1/dt) More...
 
CepsBool m_cheatConvergence
 If true, use exact solution for first steps of multi steps methods. More...
 
CepsUInt m_nbIterSnapshot
 Output perdiodicity. More...
 
- Protected Attributes inherited from AbstractPdeSolver
AbstractPdeProblemm_problem
 Link to PDE to solve. More...
 
AbstractDiscretizationm_discretization
 Link to PDE discretization. More...
 
LinearSystemm_linearSystem
 Linear system. More...
 
DMatPtr m_lhs
 Left hand side of the system. More...
 
DVecPtr m_rhs
 Right hand side of the system. More...
 
AbstractAssemblerm_opAsb
 Assembler for the operator matrix. More...
 
DMatPtr m_opMat
 Matrix of operator. More...
 
AbstractAssemblerm_bcAsb
 Assembler for Robin and Neumann BCs. More...
 
DMatPtr m_bcMat
 Matrix of boundary conditions. More...
 
DVecPtr m_bcVec
 Vector of boundary conditions. More...
 
AbstractAssemblerm_lapSrcAsb
 Assembler for laplace source terms. More...
 
DMatPtr m_lapSrcMat
 Matrix used for laplace source terms. More...
 
CepsBool m_hasRegSrc
 Flag telling if there are regular source terms. More...
 
CepsBool m_hasLapSrc
 Flag telling if there are Delta f source terms. More...
 
CepsBool m_useMassLumping
 Put the mass on the diagonal of the matrix. More...
 
CepsBool m_doOutput
 Enables/disables outputs. More...
 
VtkWriterm_writer
 Manages output. More...
 
TimeWriterm_timeWriter
 Writer for time dependant data (even for static problems...) More...
 
CepsBool m_doError
 Compute error wrt analytic solution or reference. More...
 
PdeErrorCalculatorm_errors
 Error computation. More...
 
- Static Protected Attributes inherited from AbstractTimedPdeSolver
static constexpr CepsReal c_alphaSBDF [5] = {0., 1., 2. / 3., 6. / 11., 12. / 25.}
 LHS coeffcients of the SBDF schemes. More...
 
static constexpr CepsReal c_alphaCN [3] = {0., 1., 1. / 2.}
 LHS coeffcients of the CN scheme. More...
 
static constexpr CepsReal c_akSBDF [4][4] = {{1.}, {4. / 3., -1. / 3.}, {18. / 11., -9. / 11., 2. / 11.}, {48. / 25., -36. / 25., 16. / 25., -3. / 25.}}
 RHS coeffcients of the SBDF schemes. More...
 
- Static Protected Attributes inherited from CepsObject
static Profiler m_profiler
 The same profiler for each big object. More...
 

Constructor & Destructor Documentation

◆ MonodomainSolver()

MonodomainSolver::MonodomainSolver ( MonodomainProblem p)

Constructor.

Definition at line 36 of file MonodomainSolver.cpp.

◆ ~MonodomainSolver()

virtual MonodomainSolver::~MonodomainSolver ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getMonodomainProblem()

MonodomainProblem * MonodomainSolver::getMonodomainProblem ( ) const

Converts own pointer to abstract pde problem to cardiac problem.

Definition at line 53 of file MonodomainSolver.cpp.

◆ initializeAssemblers()

void MonodomainSolver::initializeAssemblers ( )
overridevirtual

Sets the assemblers.

Implements AbstractPdeSolver.

Definition at line 42 of file MonodomainSolver.cpp.


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