DDC 0.10.0
Loading...
Searching...
No Matches
spline_evaluator_2d.hpp
1// Copyright (C) The DDC development team, see COPYRIGHT.md file
2//
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
7#include <array>
8#include <cstddef>
9#include <type_traits>
10
11#include <ddc/ddc.hpp>
12
13#include <Kokkos_Core.hpp>
14
15#include "deriv.hpp"
16#include "integrals.hpp"
17#include "periodic_extrapolation_rule.hpp"
18
19namespace ddc {
20
37template <
38 class ExecSpace,
39 class MemorySpace,
40 class BSplines1,
41 class BSplines2,
42 class EvaluationDDim1,
43 class EvaluationDDim2,
49{
50public:
52 using continuous_dimension_type1 = typename BSplines1::continuous_dimension_type;
53
55 using continuous_dimension_type2 = typename BSplines2::continuous_dimension_type;
56
59
62
65
68
71
74
77
80
85
91 template <
93 class = std::enable_if_t<ddc::is_discrete_domain_v<BatchedInterpolationDDom>>>
95
98
101
104
111 template <
113 class = std::enable_if_t<ddc::is_discrete_domain_v<BatchedInterpolationDDom>>>
118
125 template <
127 class = std::enable_if_t<ddc::is_discrete_domain_v<BatchedInterpolationDDom>>>
129 typename ddc::detail::convert_type_seq_to_discrete_domain_t<ddc::type_seq_replace_t<
131 ddc::detail::TypeSeq<
134 ddc::detail::TypeSeq<bsplines_type1, bsplines_type2>>>;
135
138
141
144
147
148private:
149 LowerExtrapolationRule1 m_lower_extrap_rule_1;
150
151 UpperExtrapolationRule1 m_upper_extrap_rule_1;
152
153 LowerExtrapolationRule2 m_lower_extrap_rule_2;
154
155 UpperExtrapolationRule2 m_upper_extrap_rule_2;
156
157public:
158 static_assert(
159 std::is_same_v<LowerExtrapolationRule1,
161 == bsplines_type1::is_periodic()
162 && std::is_same_v<
165 == bsplines_type1::is_periodic()
166 && std::is_same_v<
169 == bsplines_type2::is_periodic()
170 && std::is_same_v<
173 == bsplines_type2::is_periodic(),
174 "PeriodicExtrapolationRule has to be used if and only if dimension is periodic");
175 static_assert(
176 std::is_invocable_r_v<
177 double,
181 double const,
183 Kokkos::layout_right,
184 memory_space>>,
185 "LowerExtrapolationRule1::operator() has to be callable "
186 "with usual arguments.");
187 static_assert(
188 std::is_invocable_r_v<
189 double,
193 double const,
195 Kokkos::layout_right,
196 memory_space>>,
197 "UpperExtrapolationRule1::operator() has to be callable "
198 "with usual arguments.");
199 static_assert(
200 std::is_invocable_r_v<
201 double,
205 double const,
207 Kokkos::layout_right,
208 memory_space>>,
209 "LowerExtrapolationRule2::operator() has to be callable "
210 "with usual arguments.");
211 static_assert(
212 std::is_invocable_r_v<
213 double,
217 double const,
219 Kokkos::layout_right,
220 memory_space>>,
221 "UpperExtrapolationRule2::operator() has to be callable "
222 "with usual arguments.");
223
239 : m_lower_extrap_rule_1(lower_extrap_rule1)
240 , m_upper_extrap_rule_1(upper_extrap_rule1)
241 , m_lower_extrap_rule_2(lower_extrap_rule2)
242 , m_upper_extrap_rule_2(upper_extrap_rule2)
243 {
244 }
245
252
259
262
270
278
289 {
290 return m_lower_extrap_rule_1;
291 }
292
303 {
304 return m_upper_extrap_rule_1;
305 }
306
317 {
318 return m_lower_extrap_rule_2;
319 }
320
331 {
332 return m_upper_extrap_rule_2;
333 }
334
347 template <class Layout, class... CoordsDims>
355
376 template <
377 class Layout1,
378 class Layout2,
379 class Layout3,
381 class... CoordsDims>
388 Layout2,
391 double const,
393 Layout3,
394 memory_space> const spline_coef) const
395 {
396 batch_domain_type<BatchedInterpolationDDom> const batch_domain(coords_eval.domain());
400 "ddc_splines_evaluate_2d",
401 exec_space(),
402 batch_domain,
404 typename batch_domain_type<
405 BatchedInterpolationDDom>::discrete_element_type const j) {
406 auto const spline_eval_2D = spline_eval[j];
407 auto const coords_eval_2D = coords_eval[j];
408 auto const spline_coef_2D = spline_coef[j];
409 for (auto const i1 : evaluation_domain1) {
410 for (auto const i2 : evaluation_domain2) {
412 }
413 }
414 });
415 }
416
432 template <class Layout1, class Layout2, class BatchedInterpolationDDom>
463
464#if defined(DDC_BUILD_DEPRECATED_CODE)
476 template <class Layout, class... CoordsDims>
477 [[deprecated(
478 "Use deriv(DiscreteElement<Deriv<Dim1>>(1), ...) instead)")]] KOKKOS_FUNCTION double
482 spline_coef) const
483 {
484 return deriv(
488 }
489
501 template <class Layout, class... CoordsDims>
502 [[deprecated(
503 "Use deriv(DiscreteElement<Deriv<Dim2>>(1), ...) instead)")]] KOKKOS_FUNCTION double
507 spline_coef) const
508 {
509 return deriv(
513 }
514
526 template <class Layout, class... CoordsDims>
527 [[deprecated(
528 "Use deriv(DiscreteElement<Deriv<Dim1>, Deriv<Dim2>>(1, 1), ...) "
529 "instead)")]] KOKKOS_FUNCTION double
533 spline_coef) const
534 {
535 return deriv(
541 }
542
556 template <class InterestDim, class Layout, class... CoordsDims>
557 [[deprecated(
558 "Use deriv(DiscreteElement<Deriv<InterestDim>>(1), ...) "
559 "instead)")]] KOKKOS_FUNCTION double
562 const
563 {
568 if constexpr (std::is_same_v<
571 continuous_dimension_type>) {
573 } else if constexpr (std::is_same_v<
575 typename evaluation_discrete_dimension_type2::
576 continuous_dimension_type>) {
578 }
580 }
581
598 template <class InterestDim1, class InterestDim2, class Layout, class... CoordsDims>
599 [[deprecated(
600 "Use deriv(DiscreteElement<Deriv<InterestDim1, InterestDim2>>(1, 1), ...) "
601 "instead)")]] KOKKOS_FUNCTION double
604 const
605 {
608 (std::is_same_v<
610 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
612 || (std::is_same_v<
614 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
618 }
619
640 template <
645 class... CoordsDims>
646 [[deprecated("Use deriv(DiscreteElement<Deriv<Dim1>>(1), ...) instead)")]] void deriv_dim_1(
649 ddc::ChunkSpan<
652 Layout2,
654 ddc::ChunkSpan<
655 double const,
657 Layout3,
659 {
660 return deriv(
665 }
666
680 template <class Layout1, class Layout2, class BatchedInterpolationDDom>
681 [[deprecated("Use deriv(DiscreteElement<Deriv<Dim1>>(1), ...) instead)")]] void deriv_dim_1(
685 double const,
687 Layout2,
688 memory_space> const spline_coef) const
689 {
690 return deriv(
694 }
695
714 template <
715 class Layout1,
716 class Layout2,
717 class Layout3,
719 class... CoordsDims>
720 [[deprecated("Use deriv(DiscreteElement<Deriv<Dim2>>(1), ...) instead)")]] void deriv_dim_2(
726 Layout2,
729 double const,
731 Layout3,
732 memory_space> const spline_coef) const
733 {
734 return deriv(
739 }
740
754 template <class Layout1, class Layout2, class BatchedInterpolationDDom>
755 [[deprecated("Use deriv(DiscreteElement<Deriv<Dim2>>(1), ...) instead)")]] void deriv_dim_2(
759 double const,
761 Layout2,
762 memory_space> const spline_coef) const
763 {
764 return deriv(
768 }
769
788 template <
789 class Layout1,
790 class Layout2,
791 class Layout3,
793 class... CoordsDims>
794 [[deprecated("Use deriv(DiscreteElement<Deriv<Dim1>, Deriv<Dim2>>(1, 1), ...) instead)")]] void
801 Layout2,
804 double const,
806 Layout3,
807 memory_space> const spline_coef) const
808 {
809 return deriv(
816 }
817
831 template <class Layout1, class Layout2, class BatchedInterpolationDDom>
832 [[deprecated("Use deriv(DiscreteElement<Deriv<Dim1>, Deriv<Dim2>>(1, 1), ...) instead)")]] void
837 double const,
839 Layout2,
840 memory_space> const spline_coef) const
841 {
842 return deriv(
848 }
849
869 template <
870 class InterestDim,
871 class Layout1,
872 class Layout2,
873 class Layout3,
875 class... CoordsDims>
876 [[deprecated("Use deriv(DiscreteElement<Deriv<InterestDim>>(1), ...) instead)")]] void deriv(
882 Layout2,
885 double const,
887 Layout3,
888 memory_space> const spline_coef) const
889 {
892 std::is_same_v<
894 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
896 if constexpr (std::is_same_v<
899 continuous_dimension_type>) {
901 } else if constexpr (std::is_same_v<
903 typename evaluation_discrete_dimension_type2::
904 continuous_dimension_type>) {
906 }
908 }
909
924 template <class InterestDim, class Layout1, class Layout2, class BatchedInterpolationDDom>
925 [[deprecated("Use deriv(DiscreteElement<Deriv<InterestDim>>(1), ...) instead)")]] void deriv(
929 double const,
931 Layout2,
932 memory_space> const spline_coef) const
933 {
936 std::is_same_v<
938 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
940 if constexpr (std::is_same_v<
943 continuous_dimension_type>) {
945 } else if constexpr (std::is_same_v<
947 typename evaluation_discrete_dimension_type2::
948 continuous_dimension_type>) {
950 }
952 }
953
977 template <
978 class InterestDim1,
979 class InterestDim2,
980 class Layout1,
981 class Layout2,
982 class Layout3,
984 class... CoordsDims>
985 [[deprecated(
986 "Use deriv(DiscreteElement<Deriv<InterestDim1>, Deriv<InterestDim2>>(1, 1), ...) "
987 "instead)")]] void
993 Layout2,
996 double const,
998 Layout3,
999 memory_space> const spline_coef) const
1000 {
1003 (std::is_same_v<
1005 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
1007 || (std::is_same_v<
1009 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
1013 }
1014
1033 template <
1036 class Layout1,
1037 class Layout2,
1039 [[deprecated(
1040 "Use deriv(DiscreteElement<Deriv<InterestDim1>, Deriv<InterestDim2>>(1, 1), ...) "
1041 "instead)")]] void
1044 ddc::ChunkSpan<
1045 double const,
1047 Layout2,
1049 {
1052 (std::is_same_v<
1054 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
1056 || (std::is_same_v<
1058 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
1062 }
1063#endif
1064
1078 template <class DElem, class Layout, class... CoordsDims>
1087
1110 template <
1111 class DElem,
1112 class Layout1,
1113 class Layout2,
1114 class Layout3,
1116 class... CoordsDims>
1117 void deriv(
1118 DElem const& deriv_order,
1124 Layout2,
1127 double const,
1129 Layout3,
1130 memory_space> const spline_coef) const
1131 {
1132 static_assert(is_discrete_element_v<DElem>);
1133
1134 batch_domain_type<BatchedInterpolationDDom> const batch_domain(coords_eval.domain());
1138 "ddc_splines_differentiate_2d",
1139 exec_space(),
1140 batch_domain,
1142 typename batch_domain_type<
1143 BatchedInterpolationDDom>::discrete_element_type const j) {
1144 auto const spline_eval_2D = spline_eval[j];
1145 auto const coords_eval_2D = coords_eval[j];
1146 auto const spline_coef_2D = spline_coef[j];
1147 for (auto const i1 : evaluation_domain1) {
1148 for (auto const i2 : evaluation_domain2) {
1149 spline_eval_2D(i1, i2) = eval_no_bc(
1153 }
1154 }
1155 });
1156 }
1157
1173 template <class DElem, class Layout1, class Layout2, class BatchedInterpolationDDom>
1174 void deriv(
1175 DElem const& deriv_order,
1179 double const,
1181 Layout2,
1182 memory_space> const spline_coef) const
1183 {
1184 static_assert(is_discrete_element_v<DElem>);
1185
1186 batch_domain_type<BatchedInterpolationDDom> const batch_domain(spline_eval.domain());
1190 "ddc_splines_differentiate_2d",
1191 exec_space(),
1192 batch_domain,
1194 typename batch_domain_type<
1195 BatchedInterpolationDDom>::discrete_element_type const j) {
1196 auto const spline_eval_2D = spline_eval[j];
1197 auto const spline_coef_2D = spline_coef[j];
1198 for (auto const i1 : evaluation_domain1) {
1199 for (auto const i2 : evaluation_domain2) {
1204 }
1205 }
1206 });
1207 }
1208
1222 template <class Layout1, class Layout2, class BatchedDDom, class BatchedSplineDDom>
1226 spline_coef) const
1227 {
1228 static_assert(
1230 ddc::detail::TypeSeq<bsplines_type1, bsplines_type2>,
1232 "The spline coefficients domain must contain the bsplines dimensions");
1233 using batch_domain_type
1235 static_assert(
1236 std::is_same_v<batch_domain_type, BatchedDDom>,
1237 "The integrals domain must only contain the batch dimensions");
1238
1239 batch_domain_type batch_domain(integrals.domain());
1250
1252 "ddc_splines_integrate_bsplines",
1253 exec_space(),
1254 batch_domain,
1255 KOKKOS_LAMBDA(typename batch_domain_type::discrete_element_type const j) {
1256 integrals(j) = 0;
1258 values1.domain()) {
1260 values2.domain()) {
1262 }
1263 }
1264 });
1265 }
1266
1267private:
1283 template <class Layout, class... CoordsDims>
1284 KOKKOS_INLINE_FUNCTION double eval(
1287 spline_coef) const
1288 {
1291 if constexpr (bsplines_type1::is_periodic()) {
1295 -= Kokkos::floor(
1300 }
1301 }
1302 if constexpr (bsplines_type2::is_periodic()) {
1306 -= Kokkos::floor(
1311 }
1312 }
1313 if constexpr (!bsplines_type1::is_periodic()) {
1315 return m_lower_extrap_rule_1(coord_eval, spline_coef);
1316 }
1318 return m_upper_extrap_rule_1(coord_eval, spline_coef);
1319 }
1320 }
1321 if constexpr (!bsplines_type2::is_periodic()) {
1323 return m_lower_extrap_rule_2(coord_eval, spline_coef);
1324 }
1326 return m_upper_extrap_rule_2(coord_eval, spline_coef);
1327 }
1328 }
1329 return eval_no_bc(
1334 spline_coef);
1335 }
1336
1345 template <class... DerivDims, class Layout, class... CoordsDims>
1346 KOKKOS_INLINE_FUNCTION double eval_no_bc(
1350 spline_coef) const
1351 {
1354 using deriv_dims = ddc::detail::TypeSeq<DerivDims...>;
1355
1356 // Check that the tags are valid
1357 static_assert(
1359 "The only valid dimensions for deriv_order are Deriv<Dim1> and Deriv<Dim2>");
1360
1363
1364 std::array<double, bsplines_type1::degree() + 1> vals1_ptr;
1365 Kokkos::mdspan<double, Kokkos::extents<std::size_t, bsplines_type1::degree() + 1>> const
1366 vals1(vals1_ptr.data());
1367 std::array<double, bsplines_type2::degree() + 1> vals2_ptr;
1368 Kokkos::mdspan<double, Kokkos::extents<std::size_t, bsplines_type2::degree() + 1>> const
1369 vals2(vals2_ptr.data());
1372
1373 if constexpr (!in_tags_v<deriv_dim1, deriv_dims>) {
1375 } else {
1376 auto const order1 = deriv_order.template uid<deriv_dim1>();
1377 KOKKOS_ASSERT(order1 > 0 && order1 <= bsplines_type1::degree())
1378
1379 std::array<double, (bsplines_type1::degree() + 1) * (bsplines_type1::degree() + 1)>
1381 Kokkos::mdspan<
1382 double,
1383 Kokkos::extents<
1384 std::size_t,
1385 bsplines_type1::degree() + 1,
1387
1389 .eval_basis_and_n_derivs(derivs1, coord_eval_interest1, order1);
1390
1391 for (std::size_t i = 0; i < bsplines_type1::degree() + 1; ++i) {
1393 }
1394 }
1395
1396 if constexpr (!in_tags_v<deriv_dim2, deriv_dims>) {
1398 } else {
1399 auto const order2 = deriv_order.template uid<deriv_dim2>();
1400 KOKKOS_ASSERT(order2 > 0 && order2 <= bsplines_type2::degree())
1401
1402 std::array<double, (bsplines_type2::degree() + 1) * (bsplines_type2::degree() + 1)>
1404 Kokkos::mdspan<
1405 double,
1406 Kokkos::extents<
1407 std::size_t,
1408 bsplines_type2::degree() + 1,
1410
1412 .eval_basis_and_n_derivs(derivs2, coord_eval_interest2, order2);
1413
1414 for (std::size_t i = 0; i < bsplines_type2::degree() + 1; ++i) {
1416 }
1417 }
1418
1419 double y = 0.0;
1420 for (std::size_t i = 0; i < bsplines_type1::degree() + 1; ++i) {
1421 for (std::size_t j = 0; j < bsplines_type2::degree() + 1; ++j) {
1422 y += spline_coef(
1425 bsplines_type2>(jmin1 + i, jmin2 + j))
1426 * vals1[i] * vals2[j];
1427 }
1428 }
1429 return y;
1430 }
1431};
1432
1433} // namespace ddc
KOKKOS_FUNCTION constexpr span_type span_view() const
A DiscreteElement identifies an element of the discrete dimension.
A class to evaluate, differentiate or integrate a 2D spline function.
void operator()(ddc::ChunkSpan< double, BatchedInterpolationDDom, Layout1, memory_space > const spline_eval, ddc::ChunkSpan< double const, batched_spline_domain_type< BatchedInterpolationDDom >, Layout2, memory_space > const spline_coef) const
Evaluate 2D spline function (described by its spline coefficients) on a mesh.
SplineEvaluator2D(SplineEvaluator2D &&x)=default
Move-constructs.
LowerExtrapolationRule2 lower_extrapolation_rule_2_type
The type of the extrapolation rule at the lower boundary along the second dimension.
lower_extrapolation_rule_1_type lower_extrapolation_rule_dim_1() const
Get the lower extrapolation rule along the first dimension.
typename ddc::detail::convert_type_seq_to_discrete_domain_t< ddc::type_seq_replace_t< ddc::to_type_seq_t< BatchedInterpolationDDom >, ddc::detail::TypeSeq< evaluation_discrete_dimension_type1, evaluation_discrete_dimension_type2 >, ddc::detail::TypeSeq< bsplines_type1, bsplines_type2 > > > batched_spline_domain_type
The type of the whole spline domain (cartesian product of 2D spline domain and batch domain) preservi...
BSplines1 bsplines_type1
The discrete dimension representing the B-splines along first dimension.
MemorySpace memory_space
The type of the Kokkos memory space used by this class.
BSplines2 bsplines_type2
The discrete dimension representing the B-splines along second dimension.
UpperExtrapolationRule1 upper_extrapolation_rule_1_type
The type of the extrapolation rule at the upper boundary along the first dimension.
SplineEvaluator2D & operator=(SplineEvaluator2D const &x)=default
Copy-assigns.
void deriv(DElem const &deriv_order, ddc::ChunkSpan< double, BatchedInterpolationDDom, Layout1, memory_space > const spline_eval, ddc::ChunkSpan< ddc::Coordinate< CoordsDims... > const, BatchedInterpolationDDom, Layout2, memory_space > const coords_eval, ddc::ChunkSpan< double const, batched_spline_domain_type< BatchedInterpolationDDom >, Layout3, memory_space > const spline_coef) const
Differentiate 2D spline function (described by its spline coefficients) on a mesh along the dimension...
SplineEvaluator2D(SplineEvaluator2D const &x)=default
Copy-constructs.
~SplineEvaluator2D()=default
Destructs.
KOKKOS_FUNCTION double deriv(DElem const &deriv_order, ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
Differentiate 2D spline function (described by its spline coefficients) at a given coordinate along t...
typename BSplines2::continuous_dimension_type continuous_dimension_type2
The type of the second evaluation continuous dimension used by this class.
typename ddc::remove_dims_of_t< BatchedInterpolationDDom, evaluation_discrete_dimension_type1, evaluation_discrete_dimension_type2 > batch_domain_type
The type of the batch domain (obtained by removing the dimensions of interest from the whole domain).
LowerExtrapolationRule1 lower_extrapolation_rule_1_type
The type of the extrapolation rule at the lower boundary along the first dimension.
ddc::DiscreteDomain< bsplines_type1, bsplines_type2 > spline_domain_type
The type of the 2D spline domain corresponding to the dimensions of interest.
void deriv(DElem const &deriv_order, ddc::ChunkSpan< double, BatchedInterpolationDDom, Layout1, memory_space > const spline_eval, ddc::ChunkSpan< double const, batched_spline_domain_type< BatchedInterpolationDDom >, Layout2, memory_space > const spline_coef) const
Differentiate 2D spline function (described by its spline coefficients) on a mesh along the dimension...
typename BSplines1::continuous_dimension_type continuous_dimension_type1
The type of the first evaluation continuous dimension used by this class.
EvaluationDDim2 evaluation_discrete_dimension_type2
The type of the second discrete dimension of interest used by this class.
BatchedInterpolationDDom batched_evaluation_domain_type
The type of the whole domain representing evaluation points.
void integrate(ddc::ChunkSpan< double, BatchedDDom, Layout1, memory_space > const integrals, ddc::ChunkSpan< double const, BatchedSplineDDom, Layout2, memory_space > const spline_coef) const
Perform batched 2D integrations of a spline function (described by its spline coefficients) along the...
EvaluationDDim1 evaluation_discrete_dimension_type1
The type of the first discrete dimension of interest used by this class.
upper_extrapolation_rule_2_type upper_extrapolation_rule_dim_2() const
Get the upper extrapolation rule along the second dimension.
upper_extrapolation_rule_1_type upper_extrapolation_rule_dim_1() const
Get the upper extrapolation rule along the first dimension.
lower_extrapolation_rule_2_type lower_extrapolation_rule_dim_2() const
Get the lower extrapolation rule along the second dimension.
SplineEvaluator2D & operator=(SplineEvaluator2D &&x)=default
Move-assigns.
KOKKOS_FUNCTION double operator()(ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
Evaluate 2D spline function (described by its spline coefficients) at a given coordinate.
void operator()(ddc::ChunkSpan< double, BatchedInterpolationDDom, Layout1, memory_space > const spline_eval, ddc::ChunkSpan< ddc::Coordinate< CoordsDims... > const, BatchedInterpolationDDom, Layout2, memory_space > const coords_eval, ddc::ChunkSpan< double const, batched_spline_domain_type< BatchedInterpolationDDom >, Layout3, memory_space > const spline_coef) const
Evaluate 2D spline function (described by its spline coefficients) on a mesh.
ExecSpace exec_space
The type of the Kokkos execution space used by this class.
UpperExtrapolationRule2 upper_extrapolation_rule_2_type
The type of the extrapolation rule at the upper boundary along the second dimension.
SplineEvaluator2D(LowerExtrapolationRule1 const &lower_extrap_rule1, UpperExtrapolationRule1 const &upper_extrap_rule1, LowerExtrapolationRule2 const &lower_extrap_rule2, UpperExtrapolationRule2 const &upper_extrap_rule2)
Build a SplineEvaluator2D acting on batched_spline_domain.
The top-level namespace of DDC.
constexpr bool enable_chunk
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > rmax(DiscreteDomain< DDim > const &d)
ddc::ChunkSpan< double, ddc::DiscreteDomain< DDim >, Layout, MemorySpace > integrals(ExecSpace const &execution_space, ddc::ChunkSpan< double, ddc::DiscreteDomain< DDim >, Layout, MemorySpace > int_vals)
Compute the integrals of the B-splines.
decltype(remove_dims_of< DDims... >(std::declval< DDom >())) remove_dims_of_t
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type... > coordinate(DiscreteElement< DDim... > const &c)
KOKKOS_FUNCTION constexpr DiscreteVector< QueryDDims... > extents(DiscreteDomain< DDims... > const &domain) noexcept
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > rmin(DiscreteDomain< DDim > const &d)
detail::TaggedVector< CoordinateElement, CDims... > Coordinate
A Coordinate represents a coordinate in the continuous space.
KOKKOS_FUNCTION detail::ddim_impl_t< DDim, MemorySpace > const & discrete_space()
void parallel_for_each(std::string const &label, ExecSpace const &execution_space, Support const &domain, Functor &&f) noexcept
iterates over a nD domain using a given Kokkos execution space
A templated struct representing a discrete dimension storing the derivatives of a function along a co...
Definition deriv.hpp:15