CEPS
24.01
Cardiac ElectroPhysiology Simulator
|
Base class for solving PDE with no time dependance.
Definition at line 38 of file AbstractStaticPdeSolver.hpp.
#include <AbstractStaticPdeSolver.hpp>
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... | |
AbstractPdeSolver & | operator= (const AbstractPdeSolver &that)=delete |
No assignment. More... | |
~AbstractPdeSolver () override | |
Destructor. More... | |
void | disableOutput () |
Stops output. More... | |
void | enableOutput () |
Starts output. More... | |
TimeWriter * | getTimeWriter () 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... | |
CepsObject & | operator= (const CepsObject &)=default |
Assignment operator. More... | |
CepsObject * | toBaseObject () |
Returns a pointer to CepsObject class. More... | |
const CepsObject * | toBaseObject () const |
Returns a pointer to CepsObject class, const version. More... | |
Profiler * | getProfiler () const |
Access to profiler. More... | |
Protected Member Functions | |
AbstractStaticPdeProblem * | getStaticProblem () 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 | |
AbstractPdeProblem * | m_problem |
Link to PDE to solve. More... | |
AbstractDiscretization * | m_discretization |
Link to PDE discretization. More... | |
LinearSystem * | m_linearSystem |
Linear system. More... | |
DMatPtr | m_lhs |
Left hand side of the system. More... | |
DVecPtr | m_rhs |
Right hand side of the system. More... | |
AbstractAssembler * | m_opAsb |
Assembler for the operator matrix. More... | |
DMatPtr | m_opMat |
Matrix of operator. More... | |
AbstractAssembler * | m_bcAsb |
Assembler for Robin and Neumann BCs. More... | |
DMatPtr | m_bcMat |
Matrix of boundary conditions. More... | |
DVecPtr | m_bcVec |
Vector of boundary conditions. More... | |
AbstractAssembler * | m_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... | |
VtkWriter * | m_writer |
Manages output. More... | |
TimeWriter * | m_timeWriter |
Writer for time dependant data (even for static problems...) More... | |
CepsBool | m_doError |
Compute error wrt analytic solution or reference. More... | |
PdeErrorCalculator * | m_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... | |
|
explicit |
Constructor with problem.
Definition at line 34 of file AbstractStaticPdeSolver.cpp.
|
virtual |
Destructor.
Definition at line 55 of file AbstractStaticPdeSolver.cpp.
void AbstractStaticPdeSolver::enableErrorComputation | ( | ) |
Sets the comparison with analytic solution.
Definition at line 138 of file AbstractStaticPdeSolver.cpp.
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.
|
finalvirtual |
Number of files written.
Implements AbstractPdeSolver.
Definition at line 89 of file AbstractStaticPdeSolver.cpp.
DHVecPtr AbstractStaticPdeSolver::getSolution | ( | ) | const |
Returns a copy of the distributed vector containing the current solution.
Definition at line 132 of file AbstractStaticPdeSolver.cpp.
|
protected |
Returns a pointer with the appropriate type of pb.
Definition at line 163 of file AbstractStaticPdeSolver.cpp.
|
virtual |
Prints the solution and flush the writer if immediateWriting is true.
Definition at line 95 of file AbstractStaticPdeSolver.cpp.
|
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.
|
overridevirtual |
Solves the whole PDE in time.
Implements AbstractPdeSolver.
Reimplemented in FluxAnodeCathodeSolver.
Definition at line 60 of file AbstractStaticPdeSolver.cpp.
|
overrideprotectedvirtual |
Update assemblers and recompute everything is needed.
Implements AbstractPdeSolver.
Definition at line 169 of file AbstractStaticPdeSolver.cpp.
|
protected |
The actual vector with the solution.
Definition at line 93 of file AbstractStaticPdeSolver.hpp.
|
protected |
Flag for outputs.
Definition at line 94 of file AbstractStaticPdeSolver.hpp.