float CepsReal
Need single precision floating point.
CepsArray< _Type, 3U > CepsArray3
C++ array, 3 elements.
int32_t CepsInt
Need 32 bit integer.
std::shared_ptr< DistributedHaloVector > DHVecPtr
Typedef for pointer on Distributed Halo CepsVector.
Base class for creating PDEs to solve.
Astract Problem which does not depend on time.
Astract Problem which does depend on time.
Utility to measure distance with respect to analytic solution or given vectors.
CepsReal getAbsoluteErrorNow(CepsInt px) const
Get norm of difference at current time.
void setAnalyticSolution(ceps::Function< CepsReal(CepsStandardArgs)> *func)
Manually set the analytic solution.
CepsArray3< CepsReal > m_refNow
Norm of reference at current time.
AbstractPdeProblem * m_problem
Link to problem.
CepsArray3< CepsReal > m_errNow
Norm of difference at current time.
CepsReal m_dt
Time step, 1 by default,.
CepsReal getRelativeErrorNow(CepsInt px) const
Get relative norm of difference at current time.
CepsReal getReferenceNormNow(CepsInt px) const
Get norm of reference at current time. p=0 max, p=1 l1 normm, p=2 l2 norm.
PdeErrorCalculator(AbstractPdeProblem *pb, CepsReal dt=1.)
Constructor with discretization.
CepsArray3< CepsReal > m_mxTNormsRef
max norm in time
CepsBool m_ignoreZeroD
Do not add errors from 0D unknowns.
CepsArray3< TimeIntegrator * > m_l1TNormsRef
Integrator for L1 norm in time.
CepsArray3< TimeIntegrator * > m_l1TNormsErr
Integrator for L1 norm in time.
void reset()
Reset all cumulated norms.
CepsReal getAbsoluteErrorCumulative(CepsInt px, CepsInt pt) const
Get cumulated norm of difference.
~PdeErrorCalculator()
Destructor.
CepsReal getRelativeErrorCumulative(CepsInt px, CepsInt pt) const
Get relative cumulated norm of difference.
void compute(DHVecPtr num, CepsReal time=0.)
Compute the error at current time and add to total.
ScalarSAFunc * m_solution
Analytic function.
CepsArray3< CepsReal > m_mxTNormsErr
max norm in time
void checkPxPt(CepsInt px, CepsInt pt) const
Aborts if pw or pt is not 0,1,2.
CepsReal getReferenceNormCumulative(CepsInt px, CepsInt pt) const
Get cumulated norm of reference so far.
A SAFunc is a ceps::Function that uses CepsStandardArgs as argument of call operator (),...
Structure used to pass arguments to SAFunc (see pde directory) The flags of the SAFunc allows extract...
function caller : abstract base, only contains an variadic operator()