Select an extrapolation rule independently on each side of each dimension. More...
#include <extrapolation_rules.hpp>

Public Member Functions | |
| KOKKOS_DEFAULTED_FUNCTION | ExtrapolationRules ()=default |
| KOKKOS_FUNCTION | ExtrapolationRules (RulePairs... rules) |
| template<class ExtrapolationRule > requires ( sizeof...(RulePairs) > 0 && ((std::is_same_v<ExtrapolationRule, typename RulePairs::first_type> && std::is_same_v<ExtrapolationRule, typename RulePairs::second_type>) && ...)) | |
| KOKKOS_FUNCTION | ExtrapolationRules (ExtrapolationRule rule) |
| template<std::size_t Axis, bool Upper> | |
| KOKKOS_FUNCTION auto const & | boundary_rule () const |
| Access one face policy for boundary integrals and nodal constraints. | |
| template<class Domain , class Element > | |
| KOKKOS_FUNCTION auto | value (Domain const &domain, Element sampled_element) const |
| template<class Field , class Element > | |
| KOKKOS_FUNCTION auto | operator() (Field const &field, Element sampled_element) const |
Select an extrapolation rule independently on each side of each dimension.
Supply one std::pair of callable rules per non-index dimension of the tensor, in its non_indices_domain_t order. The first rule samples beyond the lower (left) boundary, and the second beyond the upper (right) boundary. Boundary nodes themselves are stored samples and are returned directly, as are all interior samples. The pair count is checked against the domain rank at compile time, independently of the ordering of the sampled element's tags.
Outside the domain, blend the selected boundary rules using normalized outward distances in logical grid-index units: the result is sum(distance_i * rule_i(tensor, element)) / sum(distance_i). Each selected rule receives the original sample. Dimensions whose bounds are not crossed contribute zero weight and their rules are not evaluated. A sample outside only one dimension therefore uses that boundary rule alone.
For example, beyond the upper-left corner, the left rule has weight (x_min - x) / ((x_min - x) + (y - y_max)) and the upper rule has the complementary weight. Approaching either adjacent single-boundary region recovers its rule continuously, provided the individual rules are continuous. Continuity at the stored corner itself also requires compatible rule limits. Interior samples bypass normalization, including the corner where all outward distances vanish. Each rule and its state must be copyable and accessible in the caller's execution space. This class implements the same (tensor, element) pointwise interface as individual rules.
Definition at line 163 of file extrapolation_rules.hpp.
|
default |
|
inlineexplicit |
Definition at line 170 of file extrapolation_rules.hpp.
|
inline |
Definition at line 182 of file extrapolation_rules.hpp.
|
inline |
Access one face policy for boundary integrals and nodal constraints.
Definition at line 188 of file extrapolation_rules.hpp.
|
inline |
Definition at line 195 of file extrapolation_rules.hpp.
|
inline |
Definition at line 218 of file extrapolation_rules.hpp.