DDC 0.1.0
Loading...
Searching...
No Matches
ddc::ConstantExtrapolationRule< DimI, DimNI > Struct Template Reference

A functor for describing a spline boundary value by a constant extrapolation for 2D evaluator. More...

#include <constant_extrapolation_rule.hpp>

Collaboration diagram for ddc::ConstantExtrapolationRule< DimI, DimNI >:
Collaboration graph

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.
 

Detailed Description

template<class DimI, class DimNI>
struct ddc::ConstantExtrapolationRule< DimI, DimNI >

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.

Constructor & Destructor Documentation

◆ ConstantExtrapolationRule() [1/2]

template<class DimI , class DimNI >
ddc::ConstantExtrapolationRule< DimI, DimNI >::ConstantExtrapolationRule ( ddc::Coordinate< DimI eval_pos,
ddc::Coordinate< DimNI eval_pos_not_interest_min,
ddc::Coordinate< DimNI eval_pos_not_interest_max 
)
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.

Parameters
[in]eval_posCoordinate in the dimension given inside the domain where we will evaluate each points outside the domain.
[in]eval_pos_not_interest_minThe minimum coordinate inside the domain on the complementary dimension of the boundary condition.
[in]eval_pos_not_interest_maxThe maximum coordinate inside the domain on the complementary dimension of the boundary condition.

Definition at line 110 of file constant_extrapolation_rule.hpp.

◆ ConstantExtrapolationRule() [2/2]

template<class DimI , class DimNI >
template<class DimNI_sfinae = DimNI, std::enable_if_t< DimNI_sfinae::PERIODIC, int > = 0>
ddc::ConstantExtrapolationRule< DimI, DimNI >::ConstantExtrapolationRule ( ddc::Coordinate< DimI eval_pos)
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).

Parameters
[in]eval_posCoordinate 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.

Member Function Documentation

◆ operator()()

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).

Parameters
[in]coord_extrapThe coordinates where we want to evaluate the function on B-splines
[in]spline_coefThe coefficients of the function on B-splines.
Returns
A double with the value of the function on B-splines evaluated at the coordinate.

Definition at line 158 of file constant_extrapolation_rule.hpp.


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