CEPS  24.01
Cardiac ElectroPhysiology Simulator
HeatSolver Class Reference

Detailed Description

Solve heat equation.

Definition at line 38 of file HeatSolver.hpp.

#include <HeatSolver.hpp>

Inheritance diagram for HeatSolver:
[legend]

Public Member Functions

 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...
 
virtual void output (DHVecPtr solution, CepsBool immediateWriting=true)
 Prints the solution. 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...
 

Protected Member Functions

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...
 
virtual CepsBool finished () const
 Tells if simulation reached end time or, if enabled, all points have seen an AP. 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 fillSourceTermsVector (CepsReal tn)
 Adds contributions from all source terms into m_regSourcesNm[0]. 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...
 

Additional Inherited Members

- 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

◆ HeatSolver() [1/2]

HeatSolver::HeatSolver ( )
delete

Deleted constructor.

◆ HeatSolver() [2/2]

HeatSolver::HeatSolver ( HeatProblem problem)
explicit

Constructor (valid with HeatProblem and PseudoWaveFrontProblem)

Definition at line 39 of file HeatSolver.cpp.

◆ ~HeatSolver()

HeatSolver::~HeatSolver ( )
override

Destructor.

Definition at line 45 of file HeatSolver.cpp.

Member Function Documentation

◆ getHeatProblem()

HeatProblem * HeatSolver::getHeatProblem ( ) const
protected

Returns a pointer to the pb with appropriate type.

Definition at line 66 of file HeatSolver.cpp.

◆ initializeAssemblers()

void HeatSolver::initializeAssemblers ( )
overrideprotectedvirtual

Creates the right type of assemblers for LHS and BCs. Needs to be overriden.

Implements AbstractPdeSolver.

Definition at line 50 of file HeatSolver.cpp.


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