Gyselalib++
 
Loading...
Searching...
No Matches
Evaluator2D::Evaluator< Eval1, Eval2 > Class Template Reference

An analytical 2D evaluator combining 2 1D evaluators, to be used for exact comparisons in tests. More...

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, double const y) const noexcept
 Evaluate the equation at (x,y)
 
template<class Grid1 , class Grid2 >
double operator() (ddc::Coordinate< Grid1, Grid2 > const x) const noexcept
 Evaluate the equation at \((x_1,x_2)\).
 
template<class Grid1 , class Grid2 >
void operator() (ddc::ChunkSpan< double, ddc::DiscreteDomain< Grid1, Grid2 > > chunk) const
 Evaluate the equation at the positions on which chunk is defined.
 
double deriv (double const x, double const y, int const derivative_x, int const derivative_y) const noexcept
 Evaluate the derivative of the equation at (x,y)
 
template<class Grid1 , class Grid2 >
double deriv (ddc::Coordinate< Grid1, Grid2 > const x, int const derivative_x, int const derivative_y) const noexcept
 Evaluate the derivative of the equation at \((x_1,x_2)\).
 
template<class Grid1 , class Grid2 >
void deriv (ddc::ChunkSpan< double, ddc::DiscreteDomain< Grid1, Grid2 > > chunk, int const derivative_x, int const derivative_y) const
 Evaluate the derivative of the equation at the positions on which chunk is defined.
 
double max_norm (int diff1=0, int diff2=0) const
 The maximum norm of this equation.
 

Detailed Description

template<class Eval1, class Eval2>
class Evaluator2D::Evaluator< Eval1, Eval2 >

An analytical 2D evaluator combining 2 1D evaluators, to be used for exact comparisons in tests.

Constructor & Destructor Documentation

◆ Evaluator()

template<class Eval1 , class Eval2 >
template<class IdxRange >
Evaluator2D::Evaluator< Eval1, Eval2 >::Evaluator ( IdxRange  idx_range)
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

Parameters
[in]idx_rangeThe range of the grid over which the evaluator will be applied.

Member Function Documentation

◆ operator()() [1/3]

template<class Eval1 , class Eval2 >
double Evaluator2D::Evaluator< Eval1, Eval2 >::operator() ( double const  x,
double const  y 
) const
inlinenoexcept

Evaluate the equation at (x,y)

Parameters
[in]xThe x-position where the equation is evaluated.
[in]yThe y-position where the equation is evaluated.
Returns
The result of the equation.

◆ operator()() [2/3]

template<class Eval1 , class Eval2 >
template<class Grid1 , class Grid2 >
double Evaluator2D::Evaluator< Eval1, Eval2 >::operator() ( ddc::Coordinate< Grid1, Grid2 > const  x) const
inlinenoexcept

Evaluate the equation at \((x_1,x_2)\).

Parameters
[in]xThe position where the equation is evaluated.
Returns
The result of the equation.

◆ operator()() [3/3]

template<class Eval1 , class Eval2 >
template<class Grid1 , class Grid2 >
void Evaluator2D::Evaluator< Eval1, Eval2 >::operator() ( ddc::ChunkSpan< double, ddc::DiscreteDomain< Grid1, Grid2 > >  chunk) const
inline

Evaluate the equation at the positions on which chunk is defined.

Parameters
[out]chunkThe result of the equation.

◆ deriv() [1/3]

template<class Eval1 , class Eval2 >
double Evaluator2D::Evaluator< Eval1, Eval2 >::deriv ( double const  x,
double const  y,
int const  derivative_x,
int const  derivative_y 
) const
inlinenoexcept

Evaluate the derivative of the equation at (x,y)

Parameters
[in]xThe x-position where the equation is evaluated.
[in]yThe y-position where the equation is evaluated.
[in]derivative_xThe order of the x-derivative.
[in]derivative_yThe order of the x-derivative.
Returns
The result of the equation.

◆ deriv() [2/3]

template<class Eval1 , class Eval2 >
template<class Grid1 , class Grid2 >
double Evaluator2D::Evaluator< Eval1, Eval2 >::deriv ( ddc::Coordinate< Grid1, Grid2 > const  x,
int const  derivative_x,
int const  derivative_y 
) const
inlinenoexcept

Evaluate the derivative of the equation at \((x_1,x_2)\).

Parameters
[in]xThe position where the equation is evaluated.
[in]derivative_xThe order of the x-derivative.
[in]derivative_yThe order of the x-derivative.
Returns
The result of the equation.

◆ deriv() [3/3]

template<class Eval1 , class Eval2 >
template<class Grid1 , class Grid2 >
void Evaluator2D::Evaluator< Eval1, Eval2 >::deriv ( ddc::ChunkSpan< double, ddc::DiscreteDomain< Grid1, Grid2 > >  chunk,
int const  derivative_x,
int const  derivative_y 
) const
inline

Evaluate the derivative of the equation at the positions on which chunk is defined.

Parameters
[out]chunkThe result of the equation.
[in]derivative_xThe order of the x-derivative.
[in]derivative_yThe order of the x-derivative.

◆ max_norm()

template<class Eval1 , class Eval2 >
double Evaluator2D::Evaluator< Eval1, Eval2 >::max_norm ( int  diff1 = 0,
int  diff2 = 0 
) const
inline

The maximum norm of this equation.

Used for normalisation.

Parameters
[in]diff1The x-derivative whose max norm should be returned.
[in]diff2The y-derivative whose max norm should be returned.
Returns
The maximum value of the infinite norm.

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