SimiLie
Loading...
Searching...
No Matches
sil::tensor::ExtrapolationRules< RulePairs > Class Template Reference

Select an extrapolation rule independently on each side of each dimension. More...

#include <extrapolation_rules.hpp>

Collaboration diagram for sil::tensor::ExtrapolationRules< RulePairs >:
Collaboration graph

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
 

Detailed Description

template<misc::Specialization< std::pair >... RulePairs>
class sil::tensor::ExtrapolationRules< RulePairs >

Select an extrapolation rule independently on each side of each dimension.

Important
This operator and documentation is fully AI-generated.

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.

Constructor & Destructor Documentation

◆ ExtrapolationRules() [1/3]

template<misc::Specialization< std::pair >... RulePairs>
KOKKOS_DEFAULTED_FUNCTION sil::tensor::ExtrapolationRules< RulePairs >::ExtrapolationRules ( )
default

◆ ExtrapolationRules() [2/3]

template<misc::Specialization< std::pair >... RulePairs>
KOKKOS_FUNCTION sil::tensor::ExtrapolationRules< RulePairs >::ExtrapolationRules ( RulePairs... rules)
inlineexplicit

Definition at line 170 of file extrapolation_rules.hpp.

◆ ExtrapolationRules() [3/3]

template<misc::Specialization< std::pair >... RulePairs>
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 sil::tensor::ExtrapolationRules< RulePairs >::ExtrapolationRules ( ExtrapolationRule rule)
inline

Definition at line 182 of file extrapolation_rules.hpp.

Member Function Documentation

◆ boundary_rule()

template<misc::Specialization< std::pair >... RulePairs>
template<std::size_t Axis, bool Upper>
KOKKOS_FUNCTION auto const & sil::tensor::ExtrapolationRules< RulePairs >::boundary_rule ( ) const
inline

Access one face policy for boundary integrals and nodal constraints.

Definition at line 188 of file extrapolation_rules.hpp.

◆ value()

template<misc::Specialization< std::pair >... RulePairs>
template<class Domain , class Element >
KOKKOS_FUNCTION auto sil::tensor::ExtrapolationRules< RulePairs >::value ( Domain const & domain,
Element sampled_element ) const
inline

Definition at line 195 of file extrapolation_rules.hpp.

◆ operator()()

template<misc::Specialization< std::pair >... RulePairs>
template<class Field , class Element >
KOKKOS_FUNCTION auto sil::tensor::ExtrapolationRules< RulePairs >::operator() ( Field const & field,
Element sampled_element ) const
inline

Definition at line 218 of file extrapolation_rules.hpp.


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