11#include "Kokkos_Macros.hpp"
32 struct eval_deriv_type
36 using tag_type =
typename BSplinesType::tag_type;
58 ddc::detail::TypeSeq<
IDimX...>,
59 ddc::detail::TypeSeq<interpolation_mesh_type>>>;
63 ddc::detail::TypeSeq<
IDimX...>,
64 ddc::detail::TypeSeq<interpolation_mesh_type>,
65 ddc::detail::TypeSeq<bsplines_type>>>;
77 tag_type>> == bsplines_type::is_periodic()
81 tag_type>> == bsplines_type::is_periodic(),
82 "PeriodicExtrapolationRule has to be used if and only if dimension is periodic");
84 std::is_invocable_r_v<
91 std::experimental::layout_right,
93 "LeftExtrapolationRule::operator() has to be callable with usual arguments.");
95 std::is_invocable_r_v<
102 std::experimental::layout_right,
104 "RightExtrapolationRule::operator() has to be callable with usual arguments.");
126 return m_left_extrap_rule;
131 return m_right_extrap_rule;
165 for (
auto const i : interpolation_domain) {
202 for (
auto const i : interpolation_domain) {
209 template <
class Layout1,
class Layout2>
220 Kokkos::parallel_for(
221 Kokkos::RangePolicy<exec_space>(0, 1),
227 KOKKOS_LAMBDA(
typename batch_domain_type::discrete_element_type
const j) {
247 if constexpr (bsplines_type::is_periodic()) {
274 std::is_same_v<EvalType, eval_type> || std::is_same_v<EvalType, eval_deriv_type>);
277 std::experimental::mdspan<
279 std::experimental::extents<std::size_t, bsplines_type::degree() + 1>>
const
285 if constexpr (std::is_same_v<EvalType, eval_type>) {
287 }
else if constexpr (std::is_same_v<EvalType, eval_deriv_type>) {
291 for (std::size_t
i = 0;
i < bsplines_type::degree() + 1; ++
i) {
Definition discrete_domain.hpp:51
Definition kokkos_allocator.hpp:17
Definition spline_evaluator.hpp:25
~SplineEvaluator()=default
MemorySpace memory_space
Definition spline_evaluator.hpp:41
KOKKOS_FUNCTION double operator()(ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
Definition spline_evaluator.hpp:135
KOKKOS_FUNCTION double deriv(ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
Definition spline_evaluator.hpp:172
SplineEvaluator & operator=(SplineEvaluator &&x)=default
RightExtrapolationRule right_extrapolation_rule_type
Definition spline_evaluator.hpp:46
SplineEvaluator & operator=(SplineEvaluator const &x)=default
typename ddc::detail::convert_type_seq_to_discrete_domain< ddc::type_seq_remove_t< ddc::detail::TypeSeq< IDimX... >, ddc::detail::TypeSeq< interpolation_mesh_type > > > batch_domain_type
Definition spline_evaluator.hpp:56
ddc::DiscreteDomain< bsplines_type > spline_domain_type
Definition spline_evaluator.hpp:54
void integrate(ddc::ChunkSpan< double, batch_domain_type, Layout1, memory_space > const integrals, ddc::ChunkSpan< double const, batched_spline_domain_type, Layout2, memory_space > const spline_coef) const
Definition spline_evaluator.hpp:210
SplineEvaluator(SplineEvaluator &&x)=default
void deriv(ddc::ChunkSpan< double, batched_interpolation_domain_type, Layout1, memory_space > const spline_eval, ddc::ChunkSpan< ddc::Coordinate< CoordsDims... > const, batched_interpolation_domain_type, Layout2, memory_space > const coords_eval, ddc::ChunkSpan< double const, batched_spline_domain_type, Layout3, memory_space > const spline_coef) const
Definition spline_evaluator.hpp:181
ExecSpace exec_space
Definition spline_evaluator.hpp:39
right_extrapolation_rule_type right_extrapolation_rule() const
Definition spline_evaluator.hpp:129
LeftExtrapolationRule left_extrapolation_rule_type
Definition spline_evaluator.hpp:45
SplineEvaluator(LeftExtrapolationRule const &left_extrap_rule, RightExtrapolationRule const &right_extrap_rule)
Definition spline_evaluator.hpp:106
void operator()(ddc::ChunkSpan< double, batched_interpolation_domain_type, Layout1, memory_space > const spline_eval, ddc::ChunkSpan< ddc::Coordinate< CoordsDims... > const, batched_interpolation_domain_type, Layout2, memory_space > const coords_eval, ddc::ChunkSpan< double const, batched_spline_domain_type, Layout3, memory_space > const spline_coef) const
Definition spline_evaluator.hpp:144
BSplinesType bsplines_type
Definition spline_evaluator.hpp:43
InterpolationMesh interpolation_mesh_type
Definition spline_evaluator.hpp:48
typename ddc::detail::convert_type_seq_to_discrete_domain< ddc::type_seq_replace_t< ddc::detail::TypeSeq< IDimX... >, ddc::detail::TypeSeq< interpolation_mesh_type >, ddc::detail::TypeSeq< bsplines_type > > > batched_spline_domain_type
Definition spline_evaluator.hpp:61
SplineEvaluator(SplineEvaluator const &x)=default
left_extrapolation_rule_type left_extrapolation_rule() const
Definition spline_evaluator.hpp:124
The top-level namespace of DDC.
Definition aligned_allocator.hpp:11
constexpr bool enable_chunk
Definition chunk_traits.hpp:16
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > rmax(DiscreteDomain< DDim > const &d)
Definition non_uniform_point_sampling.hpp:182
void parallel_for_each(std::string const &label, ExecSpace const &execution_space, DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
iterates over a nD domain using a given Kokkos execution space
Definition parallel_for_each.hpp:155
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > rmin(DiscreteDomain< DDim > const &d)
Definition non_uniform_point_sampling.hpp:175
detail::TaggedVector< CoordinateElement, CDims... > Coordinate
A Coordinate represents a coordinate in the continuous space.
Definition coordinate.hpp:26
Definition chunk_span.hpp:30