A functor for describing a spline boundary value by a constant extrapolation for 2D evaluator. More...
#include <constant_extrapolation_rule.hpp>
Public Member Functions | |
ConstantExtrapolationRule (ddc::Coordinate< DimI > eval_pos, ddc::Coordinate< DimNI > eval_pos_not_interest_min, ddc::Coordinate< DimNI > eval_pos_not_interest_max) | |
Instantiate a ConstantExtrapolationRule. | |
template<class DimNI_sfinae = DimNI, std::enable_if_t< DimNI_sfinae::PERIODIC, int > = 0> | |
ConstantExtrapolationRule (ddc::Coordinate< DimI > eval_pos) | |
Instantiate a ConstantExtrapolationRule. | |
template<class CoordType , class BSplines1 , class BSplines2 , class Layout , class MemorySpace > | |
KOKKOS_FUNCTION double | operator() (CoordType coord_extrap, ddc::ChunkSpan< double const, ddc::DiscreteDomain< BSplines1, BSplines2 >, Layout, MemorySpace > const spline_coef) const |
Get the value of the function on B-splines at a coordinate outside the domain. | |
A functor for describing a spline boundary value by a constant extrapolation for 2D evaluator.
To define the value of a function on B-splines out of the domain, we here use a constant extrapolation on the edge.
Definition at line 85 of file constant_extrapolation_rule.hpp.
|
inlineexplicit |
Instantiate a ConstantExtrapolationRule.
The boundary value will be the same as at the coordinate given in a dimension given. The dimension of the input defines the dimension of the boundary condition. The second and the third parameters are needed in case of non-periodic splines on the dimension off-interest (the complementary dimension of the boundary condition), because the evaluator can receive coordinates outside the domain in both dimension.
[in] | eval_pos | Coordinate in the dimension given inside the domain where we will evaluate each points outside the domain. |
[in] | eval_pos_not_interest_min | The minimum coordinate inside the domain on the complementary dimension of the boundary condition. |
[in] | eval_pos_not_interest_max | The maximum coordinate inside the domain on the complementary dimension of the boundary condition. |
Definition at line 110 of file constant_extrapolation_rule.hpp.
|
inlineexplicit |
Instantiate a ConstantExtrapolationRule.
The boundary value will be the same as at the coordinate given in a dimension given. The dimension of the input defines the dimension of the boundary condition. No second and third parameters are needed in case of periodic splines on the dimension off-interest (the complementary dimension of the boundary condition).
[in] | eval_pos | Coordinate in the dimension given inside the domain where we will evaluate each points outside the domain. |
Definition at line 133 of file constant_extrapolation_rule.hpp.
|
inline |
Get the value of the function on B-splines at a coordinate outside the domain.
In the dimension defined in the constructor Dim1 (or Dim2), it sets the coordinate pos_1 (or pos_2) given at the m_eval_pos coordinate if it is outside the domain. If the coordinate on the complementary dimension of the boundary condition dimension ddc::select<DimNI>(coord_extrap) is outside the domain, then it also sets the coordinate at eval_pos_not_interest_min (if ddc::select<DimNI>(coord_extrap) \( < \) eval_pos_not_interest_min) or at eval_pos_not_interest_max (if ddc::select<DimNI>(coord_extrap) \( > \) eval_pos_not_interest_max).
[in] | coord_extrap | The coordinates where we want to evaluate the function on B-splines |
[in] | spline_coef | The coefficients of the function on B-splines. |
Definition at line 158 of file constant_extrapolation_rule.hpp.