CEPS  24.01
Cardiac ElectroPhysiology Simulator
AbstractStaticPdeSolver Class Reference

Detailed Description

Base class for solving PDE with no time dependance.

Definition at line 38 of file AbstractStaticPdeSolver.hpp.

#include <AbstractStaticPdeSolver.hpp>

Inheritance diagram for AbstractStaticPdeSolver:
[legend]

Public Member Functions

 AbstractStaticPdeSolver (AbstractStaticPdeProblem *pb)
 Constructor with problem. More...
 
virtual ~AbstractStaticPdeSolver ()
 Destructor. More...
 
void solve () override
 Solves the whole PDE in time. 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 final
 Number of files written. More...
 
virtual void output (DHVecPtr solution, CepsBool immediateWriting=true)
 Prints the solution and flush the writer if immediateWriting is true. 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< CepsReal > > getErrors () const
 Gets the currently computed errors. First index selects absolute(0) orrelative(1) second 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

AbstractStaticPdeProblemgetStaticProblem () const
 Returns a pointer with the appropriate type of pb. More...
 
void updateAssemblers () override
 Update assemblers and recompute everything is needed. More...
 
- Protected Member Functions inherited from AbstractPdeSolver
virtual void assembleAndSolve ()=0
 Main routine used during solving, perform one single step on time problem or solve directly in static ones. This function is defined in child classes. More...
 
virtual void initializeWriter ()
 Creates the solution writer. More...
 
virtual void initializeAssemblers ()=0
 Creates the right type of assemblers for LHS and BCs. Needs to be overriden. More...
 

Protected Attributes

DHVecPtr m_solution
 The actual vector with the solution. More...
 
CepsBool m_writeInitialGuess
 Flag for outputs. 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...
 

Additional Inherited Members

- Static Protected Attributes inherited from CepsObject
static Profiler m_profiler
 The same profiler for each big object. More...
 

Constructor & Destructor Documentation

◆ AbstractStaticPdeSolver()

AbstractStaticPdeSolver::AbstractStaticPdeSolver ( AbstractStaticPdeProblem pb)
explicit

Constructor with problem.

Definition at line 34 of file AbstractStaticPdeSolver.cpp.

◆ ~AbstractStaticPdeSolver()

AbstractStaticPdeSolver::~AbstractStaticPdeSolver ( )
virtual

Destructor.

Definition at line 55 of file AbstractStaticPdeSolver.cpp.

Member Function Documentation

◆ enableErrorComputation()

void AbstractStaticPdeSolver::enableErrorComputation ( )

Sets the comparison with analytic solution.

Definition at line 138 of file AbstractStaticPdeSolver.cpp.

◆ getErrors()

CepsArray2< CepsArray3< CepsReal > > AbstractStaticPdeSolver::getErrors ( ) const

Gets the currently computed errors. First index selects absolute(0) orrelative(1) second index is L-inf, L1, L2 selector.

Definition at line 146 of file AbstractStaticPdeSolver.cpp.

◆ getExpectedNumberOfOutputs()

CepsUInt AbstractStaticPdeSolver::getExpectedNumberOfOutputs ( ) const
finalvirtual

Number of files written.

Implements AbstractPdeSolver.

Definition at line 89 of file AbstractStaticPdeSolver.cpp.

◆ getSolution()

DHVecPtr AbstractStaticPdeSolver::getSolution ( ) const

Returns a copy of the distributed vector containing the current solution.

Returns

Definition at line 132 of file AbstractStaticPdeSolver.cpp.

◆ getStaticProblem()

AbstractStaticPdeProblem * AbstractStaticPdeSolver::getStaticProblem ( ) const
protected

Returns a pointer with the appropriate type of pb.

Definition at line 163 of file AbstractStaticPdeSolver.cpp.

◆ output()

void AbstractStaticPdeSolver::output ( DHVecPtr  solution,
CepsBool  immediateWriting = true 
)
virtual

Prints the solution and flush the writer if immediateWriting is true.

Definition at line 95 of file AbstractStaticPdeSolver.cpp.

◆ setupWithParameters()

void AbstractStaticPdeSolver::setupWithParameters ( InputParameters params)
overridevirtual

Set attributes from input file. Parameters are passed as arguments in case one wants to use other parameters.

Reimplemented from AbstractPdeSolver.

Reimplemented in FluxAnodeCathodeSolver.

Definition at line 83 of file AbstractStaticPdeSolver.cpp.

◆ solve()

void AbstractStaticPdeSolver::solve ( )
overridevirtual

Solves the whole PDE in time.

Implements AbstractPdeSolver.

Reimplemented in FluxAnodeCathodeSolver.

Definition at line 60 of file AbstractStaticPdeSolver.cpp.

◆ updateAssemblers()

void AbstractStaticPdeSolver::updateAssemblers ( )
overrideprotectedvirtual

Update assemblers and recompute everything is needed.

Implements AbstractPdeSolver.

Definition at line 169 of file AbstractStaticPdeSolver.cpp.

Field Documentation

◆ m_solution

DHVecPtr AbstractStaticPdeSolver::m_solution
protected

The actual vector with the solution.

Definition at line 93 of file AbstractStaticPdeSolver.hpp.

◆ m_writeInitialGuess

CepsBool AbstractStaticPdeSolver::m_writeInitialGuess
protected

Flag for outputs.

Definition at line 94 of file AbstractStaticPdeSolver.hpp.


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