CEPS
24.01
Cardiac ElectroPhysiology Simulator
|
Utility to measure distance with respect to analytic solution or given vectors.
Definition at line 42 of file PdeErrorCalculator.hpp.
#include <PdeErrorCalculator.hpp>
Public Member Functions | |
PdeErrorCalculator (AbstractPdeProblem *pb, CepsReal dt=1.) | |
Constructor with discretization. More... | |
~PdeErrorCalculator () | |
Destructor. More... | |
void | compute (DHVecPtr num, CepsReal time=0.) |
Compute the error at current time and add to total. More... | |
CepsReal | getReferenceNormNow (CepsInt px) const |
Get norm of reference at current time. p=0 max, p=1 l1 normm, p=2 l2 norm. More... | |
CepsReal | getReferenceNormCumulative (CepsInt px, CepsInt pt) const |
Get cumulated norm of reference so far. More... | |
CepsReal | getAbsoluteErrorNow (CepsInt px) const |
Get norm of difference at current time. More... | |
CepsReal | getAbsoluteErrorCumulative (CepsInt px, CepsInt pt) const |
Get cumulated norm of difference. More... | |
CepsReal | getRelativeErrorNow (CepsInt px) const |
Get relative norm of difference at current time. More... | |
CepsReal | getRelativeErrorCumulative (CepsInt px, CepsInt pt) const |
Get relative cumulated norm of difference. More... | |
void | setAnalyticSolution (ceps::Function< CepsReal(CepsStandardArgs)> *func) |
Manually set the analytic solution. More... | |
void | reset () |
Reset all cumulated norms. More... | |
Protected Member Functions | |
void | checkPxPt (CepsInt px, CepsInt pt) const |
Aborts if pw or pt is not 0,1,2. More... | |
Protected Attributes | |
AbstractPdeProblem * | m_problem |
Link to problem. More... | |
ScalarSAFunc * | m_solution |
Analytic function. More... | |
CepsReal | m_dt |
Time step, 1 by default,. More... | |
CepsArray3< CepsReal > | m_refNow |
Norm of reference at current time. More... | |
CepsArray3< CepsReal > | m_errNow |
Norm of difference at current time. More... | |
CepsArray3< CepsReal > | m_mxTNormsRef |
max norm in time More... | |
CepsArray3< CepsReal > | m_mxTNormsErr |
max norm in time More... | |
CepsArray3< TimeIntegrator * > | m_l1TNormsRef |
Integrator for L1 norm in time. More... | |
CepsArray3< TimeIntegrator * > | m_l1TNormsErr |
Integrator for L1 norm in time. More... | |
CepsBool | m_ignoreZeroD |
Do not add errors from 0D unknowns. More... | |
|
explicit |
Constructor with discretization.
Definition at line 34 of file PdeErrorCalculator.cpp.
PdeErrorCalculator::~PdeErrorCalculator | ( | ) |
Destructor.
Definition at line 55 of file PdeErrorCalculator.cpp.
Aborts if pw or pt is not 0,1,2.
Definition at line 178 of file PdeErrorCalculator.cpp.
Compute the error at current time and add to total.
Definition at line 64 of file PdeErrorCalculator.cpp.
Get cumulated norm of difference.
Definition at line 130 of file PdeErrorCalculator.cpp.
Get norm of difference at current time.
Definition at line 123 of file PdeErrorCalculator.cpp.
Get cumulated norm of reference so far.
Definition at line 114 of file PdeErrorCalculator.cpp.
Get norm of reference at current time. p=0 max, p=1 l1 normm, p=2 l2 norm.
Definition at line 107 of file PdeErrorCalculator.cpp.
Get relative cumulated norm of difference.
Definition at line 147 of file PdeErrorCalculator.cpp.
Get relative norm of difference at current time.
Definition at line 139 of file PdeErrorCalculator.cpp.
void PdeErrorCalculator::reset | ( | ) |
Reset all cumulated norms.
Definition at line 165 of file PdeErrorCalculator.cpp.
void PdeErrorCalculator::setAnalyticSolution | ( | ceps::Function< CepsReal(CepsStandardArgs)> * | func | ) |
Manually set the analytic solution.
Definition at line 156 of file PdeErrorCalculator.cpp.
|
protected |
Time step, 1 by default,.
Definition at line 105 of file PdeErrorCalculator.hpp.
|
protected |
Norm of difference at current time.
Definition at line 111 of file PdeErrorCalculator.hpp.
|
protected |
Do not add errors from 0D unknowns.
Definition at line 126 of file PdeErrorCalculator.hpp.
|
protected |
Integrator for L1 norm in time.
Definition at line 123 of file PdeErrorCalculator.hpp.
|
protected |
Integrator for L1 norm in time.
Definition at line 120 of file PdeErrorCalculator.hpp.
|
protected |
max norm in time
Definition at line 117 of file PdeErrorCalculator.hpp.
|
protected |
max norm in time
Definition at line 114 of file PdeErrorCalculator.hpp.
|
protected |
Link to problem.
Definition at line 99 of file PdeErrorCalculator.hpp.
|
protected |
Norm of reference at current time.
Definition at line 108 of file PdeErrorCalculator.hpp.
|
protected |
Analytic function.
Definition at line 102 of file PdeErrorCalculator.hpp.