An analytical evaluator to be used for exact comparisons in tests. More...
Public Types | |
using | Dim = Grid1D |
The grid dimension. | |
Public Member Functions | |
template<class IdxRange > | |
Evaluator (IdxRange idx_range) | |
A constructor taking the range over which the evaluator will be applied. | |
double | operator() (double const x) const noexcept |
Evaluate the equation at x. | |
void | operator() (ddc::ChunkSpan< double, ddc::DiscreteDomain< Grid1D > > chunk) const |
Evaluate the equation at the positions on which chunk is defined. | |
double | deriv (double const x, int const derivative) const noexcept |
Evaluate the derivative of the equation at x. | |
void | deriv (ddc::ChunkSpan< double, ddc::DiscreteDomain< Grid1D > > chunk, int const derivative) const |
Evaluate the derivative of the equation at the positions on which chunk is defined. | |
double | max_norm (int diff=0) const |
The maximum norm of this equation. | |
An analytical evaluator to be used for exact comparisons in tests.
|
inline |
A constructor taking the range over which the evaluator will be applied.
The polynomial is initialised with random values between 0.0 and 1.0
[in] | idx_range | The range of the grid over which the evaluator will be applied. |
|
inlinenoexcept |
Evaluate the equation at x.
[in] | x | The position where the equation is evaluated. |
|
inline |
Evaluate the equation at the positions on which chunk is defined.
[out] | chunk | The result of the equation. |
|
inlinenoexcept |
Evaluate the derivative of the equation at x.
[in] | x | The position where the equation is evaluated. |
[in] | derivative | The order of the derivative. |
|
inline |
Evaluate the derivative of the equation at the positions on which chunk is defined.
[out] | chunk | The result of the equation. |
[in] | derivative | The order of the derivative. |
|
inline |
The maximum norm of this equation.
Used for normalisation.
[in] | diff | The derivative whose max norm should be returned. |