13#include <Kokkos_Core.hpp>
15#include "integrals.hpp"
16#include "periodic_extrapolation_rule.hpp"
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
46 class EvaluationDDim1,
47 class EvaluationDDim2,
48 class EvaluationDDim3,
49 class LowerExtrapolationRule1,
50 class UpperExtrapolationRule1,
51 class LowerExtrapolationRule2,
52 class UpperExtrapolationRule2,
53 class LowerExtrapolationRule3,
54 class UpperExtrapolationRule3>
59
60
66
67
68 struct eval_deriv_type
74 using continuous_dimension_type1 =
typename BSplines1::continuous_dimension_type;
77 using continuous_dimension_type2 =
typename BSplines2::continuous_dimension_type;
80 using continuous_dimension_type3 =
typename BSplines3::continuous_dimension_type;
83 using exec_space = ExecSpace;
86 using memory_space = MemorySpace;
89 using evaluation_discrete_dimension_type1 = EvaluationDDim1;
92 using evaluation_discrete_dimension_type2 = EvaluationDDim2;
95 using evaluation_discrete_dimension_type3 = EvaluationDDim3;
98 using bsplines_type1 = BSplines1;
101 using bsplines_type2 = BSplines2;
104 using bsplines_type3 = BSplines3;
107 using evaluation_domain_type1 =
ddc::
DiscreteDomain<evaluation_discrete_dimension_type1>;
110 using evaluation_domain_type2 =
ddc::
DiscreteDomain<evaluation_discrete_dimension_type2>;
113 using evaluation_domain_type3 =
ddc::
DiscreteDomain<evaluation_discrete_dimension_type3>;
117 evaluation_discrete_dimension_type1,
118 evaluation_discrete_dimension_type2,
119 evaluation_discrete_dimension_type3>;
122
123
124
125
127 class BatchedInterpolationDDom,
128 class = std::enable_if_t<
ddc::is_discrete_domain_v<BatchedInterpolationDDom>>>
129 using batched_evaluation_domain_type = BatchedInterpolationDDom;
141 using spline_domain_type =
ddc::
DiscreteDomain<bsplines_type1, bsplines_type2, bsplines_type3>;
144
145
146
147
148
150 class BatchedInterpolationDDom,
151 class = std::enable_if_t<
ddc::is_discrete_domain_v<BatchedInterpolationDDom>>>
152 using batch_domain_type =
typename ddc::remove_dims_of_t<
153 BatchedInterpolationDDom,
154 evaluation_discrete_dimension_type1,
155 evaluation_discrete_dimension_type2,
156 evaluation_discrete_dimension_type3>;
159
160
161
162
163
165 class BatchedInterpolationDDom,
166 class = std::enable_if_t<
ddc::is_discrete_domain_v<BatchedInterpolationDDom>>>
167 using batched_spline_domain_type =
168 typename ddc::detail::convert_type_seq_to_discrete_domain_t<
ddc::type_seq_replace_t<
169 ddc::to_type_seq_t<BatchedInterpolationDDom>,
170 ddc::detail::TypeSeq<
171 evaluation_discrete_dimension_type1,
172 evaluation_discrete_dimension_type2,
173 evaluation_discrete_dimension_type3>,
174 ddc::detail::TypeSeq<bsplines_type1, bsplines_type2, bsplines_type3>>>;
177 using lower_extrapolation_rule_1_type = LowerExtrapolationRule1;
180 using upper_extrapolation_rule_1_type = UpperExtrapolationRule1;
183 using lower_extrapolation_rule_2_type = LowerExtrapolationRule2;
186 using upper_extrapolation_rule_2_type = UpperExtrapolationRule2;
189 using lower_extrapolation_rule_3_type = LowerExtrapolationRule3;
192 using upper_extrapolation_rule_3_type = UpperExtrapolationRule3;
195 LowerExtrapolationRule1 m_lower_extrap_rule_1;
197 UpperExtrapolationRule1 m_upper_extrap_rule_1;
199 LowerExtrapolationRule2 m_lower_extrap_rule_2;
201 UpperExtrapolationRule2 m_upper_extrap_rule_2;
203 LowerExtrapolationRule3 m_lower_extrap_rule_3;
205 UpperExtrapolationRule3 m_upper_extrap_rule_3;
209 std::is_same_v<LowerExtrapolationRule1,
211 == bsplines_type1::is_periodic()
213 UpperExtrapolationRule1,
215 == bsplines_type1::is_periodic()
217 LowerExtrapolationRule2,
219 == bsplines_type2::is_periodic()
221 UpperExtrapolationRule2,
223 == bsplines_type2::is_periodic()
225 LowerExtrapolationRule3,
227 == bsplines_type3::is_periodic()
229 UpperExtrapolationRule3,
231 == bsplines_type3::is_periodic(),
232 "PeriodicExtrapolationRule has to be used if and only if dimension is periodic");
234 std::is_invocable_r_v<
236 LowerExtrapolationRule1,
237 ddc::Coordinate<continuous_dimension_type1>,
241 Kokkos::layout_right,
243 "LowerExtrapolationRule1::operator() has to be callable "
244 "with usual arguments.");
246 std::is_invocable_r_v<
248 UpperExtrapolationRule1,
249 ddc::Coordinate<continuous_dimension_type1>,
253 Kokkos::layout_right,
255 "UpperExtrapolationRule1::operator() has to be callable "
256 "with usual arguments.");
258 std::is_invocable_r_v<
260 LowerExtrapolationRule2,
261 ddc::Coordinate<continuous_dimension_type2>,
265 Kokkos::layout_right,
267 "LowerExtrapolationRule2::operator() has to be callable "
268 "with usual arguments.");
270 std::is_invocable_r_v<
272 UpperExtrapolationRule2,
273 ddc::Coordinate<continuous_dimension_type2>,
277 Kokkos::layout_right,
279 "UpperExtrapolationRule2::operator() has to be callable "
280 "with usual arguments.");
282 std::is_invocable_r_v<
284 LowerExtrapolationRule3,
285 ddc::Coordinate<continuous_dimension_type3>,
289 Kokkos::layout_right,
291 "LowerExtrapolationRule3::operator() has to be callable "
292 "with usual arguments.");
294 std::is_invocable_r_v<
296 UpperExtrapolationRule3,
297 ddc::Coordinate<continuous_dimension_type3>,
301 Kokkos::layout_right,
303 "UpperExtrapolationRule3::operator() has to be callable "
304 "with usual arguments.");
307
308
309
310
311
312
313
314
315
316
317
319 LowerExtrapolationRule1
const& lower_extrap_rule1,
320 UpperExtrapolationRule1
const& upper_extrap_rule1,
321 LowerExtrapolationRule2
const& lower_extrap_rule2,
322 UpperExtrapolationRule2
const& upper_extrap_rule2,
323 LowerExtrapolationRule3
const& lower_extrap_rule3,
324 UpperExtrapolationRule3
const& upper_extrap_rule3)
325 : m_lower_extrap_rule_1(lower_extrap_rule1)
326 , m_upper_extrap_rule_1(upper_extrap_rule1)
327 , m_lower_extrap_rule_2(lower_extrap_rule2)
328 , m_upper_extrap_rule_2(upper_extrap_rule2)
329 , m_lower_extrap_rule_3(lower_extrap_rule3)
330 , m_upper_extrap_rule_3(upper_extrap_rule3)
335
336
337
338
342
343
344
345
352
353
354
355
356
360
361
362
363
364
368
369
370
371
372
373
374
375
378 return m_lower_extrap_rule_1;
382
383
384
385
386
387
388
389
392 return m_upper_extrap_rule_1;
396
397
398
399
400
401
402
403
406 return m_lower_extrap_rule_2;
410
411
412
413
414
415
416
417
420 return m_upper_extrap_rule_2;
424
425
426
427
428
429
430
431
434 return m_lower_extrap_rule_3;
438
439
440
441
442
443
444
445
448 return m_upper_extrap_rule_3;
452
453
454
455
456
457
458
459
460
461
462
463 template <
class Layout,
class... CoordsDims>
465 ddc::Coordinate<CoordsDims...>
const& coord_eval,
466 ddc::
ChunkSpan<
double const, spline_domain_type, Layout, memory_space>
const
469 return eval(coord_eval, spline_coef);
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
496 class BatchedInterpolationDDom,
499 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
502 ddc::Coordinate<CoordsDims...>
const,
503 BatchedInterpolationDDom,
505 memory_space>
const coords_eval,
508 batched_spline_domain_type<BatchedInterpolationDDom>,
510 memory_space>
const spline_coef)
const
512 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(coords_eval.domain());
513 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
514 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
515 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
516 ddc::parallel_for_each(
517 "ddc_splines_evaluate_3d",
521 typename batch_domain_type<
522 BatchedInterpolationDDom>::discrete_element_type
const j) {
523 auto const spline_eval_3D = spline_eval[j];
524 auto const coords_eval_3D = coords_eval[j];
525 auto const spline_coef_3D = spline_coef[j];
526 for (
auto const i1 : evaluation_domain1) {
527 for (
auto const i2 : evaluation_domain2) {
528 for (
auto const i3 : evaluation_domain3) {
529 spline_eval_3D(i1, i2, i3)
530 = eval(coords_eval_3D(i1, i2, i3), spline_coef_3D);
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552 template <
class Layout1,
class Layout2,
class BatchedInterpolationDDom>
554 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
558 batched_spline_domain_type<BatchedInterpolationDDom>,
560 memory_space>
const spline_coef)
const
562 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(spline_eval.domain());
563 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
564 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
565 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
566 ddc::parallel_for_each(
567 "ddc_splines_evaluate_3d",
571 typename batch_domain_type<
572 BatchedInterpolationDDom>::discrete_element_type
const j) {
573 auto const spline_eval_3D = spline_eval[j];
574 auto const spline_coef_3D = spline_coef[j];
575 for (
auto const i1 : evaluation_domain1) {
576 for (
auto const i2 : evaluation_domain2) {
577 for (
auto const i3 : evaluation_domain3) {
579 continuous_dimension_type1,
580 continuous_dimension_type2,
581 continuous_dimension_type3>
585 ddc::coordinate(i3));
586 spline_eval_3D(i1, i2, i3)
587 = eval(coord_eval_3D(i1, i2, i3), spline_coef_3D);
595
596
597
598
599
600
601
602
603
604
605 template <
class Layout,
class... CoordsDims>
607 ddc::Coordinate<CoordsDims...>
const& coord_eval,
608 ddc::
ChunkSpan<
double const, spline_domain_type, Layout, memory_space>
const
611 return eval_no_bc<eval_deriv_type, eval_type, eval_type>(coord_eval, spline_coef);
615
616
617
618
619
620
621
622
623
624
625 template <
class Layout,
class... CoordsDims>
627 ddc::Coordinate<CoordsDims...>
const& coord_eval,
628 ddc::
ChunkSpan<
double const, spline_domain_type, Layout, memory_space>
const
631 return eval_no_bc<eval_type, eval_deriv_type, eval_type>(coord_eval, spline_coef);
635
636
637
638
639
640
641
642
643
644
645 template <
class Layout,
class... CoordsDims>
647 ddc::Coordinate<CoordsDims...>
const& coord_eval,
648 ddc::
ChunkSpan<
double const, spline_domain_type, Layout, memory_space>
const
651 return eval_no_bc<eval_type, eval_type, eval_deriv_type>(coord_eval, spline_coef);
655
656
657
658
659
660
661
662
663
664
665 template <
class Layout,
class... CoordsDims>
667 ddc::Coordinate<CoordsDims...>
const& coord_eval,
668 ddc::
ChunkSpan<
double const, spline_domain_type, Layout, memory_space>
const
671 return eval_no_bc<eval_deriv_type, eval_deriv_type, eval_type>(coord_eval, spline_coef);
675
676
677
678
679
680
681
682
683
684
685 template <
class Layout,
class... CoordsDims>
687 ddc::Coordinate<CoordsDims...>
const& coord_eval,
688 ddc::
ChunkSpan<
double const, spline_domain_type, Layout, memory_space>
const
691 return eval_no_bc<eval_type, eval_deriv_type, eval_deriv_type>(coord_eval, spline_coef);
695
696
697
698
699
700
701
702
703
704
705 template <
class Layout,
class... CoordsDims>
707 ddc::Coordinate<CoordsDims...>
const& coord_eval,
708 ddc::
ChunkSpan<
double const, spline_domain_type, Layout, memory_space>
const
711 return eval_no_bc<eval_deriv_type, eval_type, eval_deriv_type>(coord_eval, spline_coef);
715
716
717
718
719
720
721
722
723
724
725 template <
class Layout,
class... CoordsDims>
727 ddc::Coordinate<CoordsDims...>
const& coord_eval,
728 ddc::
ChunkSpan<
double const, spline_domain_type, Layout, memory_space>
const
734 eval_deriv_type>(coord_eval, spline_coef);
738
739
740
741
742
743
744
745
746
747
748
749
750 template <
class InterestDim,
class Layout,
class... CoordsDims>
752 ddc::Coordinate<CoordsDims...>
const& coord_eval,
753 ddc::
ChunkSpan<
double const, spline_domain_type, Layout, memory_space>
const
757 std::is_same_v<InterestDim, continuous_dimension_type1>
758 || std::is_same_v<InterestDim, continuous_dimension_type2>
759 || std::is_same_v<InterestDim, continuous_dimension_type3>);
760 if constexpr (std::is_same_v<
762 typename evaluation_discrete_dimension_type1::
763 continuous_dimension_type>) {
764 return deriv_dim_1(coord_eval, spline_coef);
765 }
else if constexpr (std::is_same_v<
767 typename evaluation_discrete_dimension_type2::
768 continuous_dimension_type>) {
769 return deriv_dim_2(coord_eval, spline_coef);
770 }
else if constexpr (std::is_same_v<
772 typename evaluation_discrete_dimension_type3::
773 continuous_dimension_type>) {
774 return deriv_dim_3(coord_eval, spline_coef);
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794 template <
class InterestDim1,
class InterestDim2,
class Layout,
class... CoordsDims>
796 ddc::Coordinate<CoordsDims...>
const& coord_eval,
797 ddc::
ChunkSpan<
double const, spline_domain_type, Layout, memory_space>
const
803 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
804 && std::is_same_v<InterestDim2, continuous_dimension_type2>)
807 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
808 && std::is_same_v<InterestDim1, continuous_dimension_type2>)
811 typename evaluation_discrete_dimension_type2::continuous_dimension_type>
812 && std::is_same_v<InterestDim2, continuous_dimension_type3>)
815 typename evaluation_discrete_dimension_type2::continuous_dimension_type>
816 && std::is_same_v<InterestDim1, continuous_dimension_type3>)
819 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
820 && std::is_same_v<InterestDim2, continuous_dimension_type3>)
823 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
824 && std::is_same_v<InterestDim1, continuous_dimension_type3>));
829 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
830 && std::is_same_v<InterestDim2, continuous_dimension_type2>)
833 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
834 && std::is_same_v<InterestDim1, continuous_dimension_type2>)) {
835 return deriv_1_and_2(coord_eval, spline_coef);
836 }
else if constexpr (
839 typename evaluation_discrete_dimension_type2::continuous_dimension_type>
840 && std::is_same_v<InterestDim2, continuous_dimension_type3>)
843 typename evaluation_discrete_dimension_type2::continuous_dimension_type>
844 && std::is_same_v<InterestDim1, continuous_dimension_type3>)) {
845 return deriv_2_and_3(coord_eval, spline_coef);
846 }
else if constexpr (
849 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
850 && std::is_same_v<InterestDim2, continuous_dimension_type3>)
853 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
854 && std::is_same_v<InterestDim1, continuous_dimension_type3>)) {
855 return deriv_1_and_3(coord_eval, spline_coef);
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
883 ddc::Coordinate<CoordsDims...>
const& coord_eval,
884 ddc::
ChunkSpan<
double const, spline_domain_type, Layout, memory_space>
const
890 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
891 && std::is_same_v<InterestDim2, continuous_dimension_type2>
892 && std::is_same_v<InterestDim3, continuous_dimension_type3>)
895 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
896 && std::is_same_v<InterestDim1, continuous_dimension_type2>
897 && std::is_same_v<InterestDim2, continuous_dimension_type3>)
900 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
901 && std::is_same_v<InterestDim3, continuous_dimension_type2>
902 && std::is_same_v<InterestDim1, continuous_dimension_type3>));
904 return deriv_1_2_3(coord_eval, spline_coef);
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
931 class BatchedInterpolationDDom,
934 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
937 ddc::Coordinate<CoordsDims...>
const,
938 BatchedInterpolationDDom,
940 memory_space>
const coords_eval,
943 batched_spline_domain_type<BatchedInterpolationDDom>,
945 memory_space>
const spline_coef)
const
947 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(coords_eval.domain());
948 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
949 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
950 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
951 ddc::parallel_for_each(
952 "ddc_splines_differentiate_3d_dim_1",
956 typename batch_domain_type<
957 BatchedInterpolationDDom>::discrete_element_type
const j) {
958 auto const spline_eval_3D = spline_eval[j];
959 auto const coords_eval_3D = coords_eval[j];
960 auto const spline_coef_3D = spline_coef[j];
961 for (
auto const i1 : evaluation_domain1) {
962 for (
auto const i2 : evaluation_domain2) {
963 for (
auto const i3 : evaluation_domain3) {
964 spline_eval_3D(i1, i2, i3) = eval_no_bc<
967 eval_type>(coords_eval_3D(i1, i2, i3), spline_coef_3D);
975
976
977
978
979
980
981
982
983
984
985
986
987 template <
class Layout1,
class Layout2,
class BatchedInterpolationDDom>
989 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
993 batched_spline_domain_type<BatchedInterpolationDDom>,
995 memory_space>
const spline_coef)
const
997 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(spline_eval.domain());
998 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
999 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
1000 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
1001 ddc::parallel_for_each(
1002 "ddc_splines_differentiate_3d_dim_1",
1005 KOKKOS_CLASS_LAMBDA(
1006 typename batch_domain_type<
1007 BatchedInterpolationDDom>::discrete_element_type
const j) {
1008 auto const spline_eval_3D = spline_eval[j];
1009 auto const spline_coef_3D = spline_coef[j];
1010 for (
auto const i1 : evaluation_domain1) {
1011 for (
auto const i2 : evaluation_domain2) {
1012 for (
auto const i3 : evaluation_domain3) {
1014 continuous_dimension_type1,
1015 continuous_dimension_type2,
1016 continuous_dimension_type3>
1018 ddc::coordinate(i1),
1019 ddc::coordinate(i2),
1020 ddc::coordinate(i3));
1021 spline_eval_3D(i1, i2, i3) = eval_no_bc<
1024 eval_type>(coord_eval_3D, spline_coef_3D);
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1053 class BatchedInterpolationDDom,
1054 class... CoordsDims>
1056 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
1059 ddc::Coordinate<CoordsDims...>
const,
1060 BatchedInterpolationDDom,
1062 memory_space>
const coords_eval,
1065 batched_spline_domain_type<BatchedInterpolationDDom>,
1067 memory_space>
const spline_coef)
const
1069 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(coords_eval.domain());
1070 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
1071 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
1072 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
1073 ddc::parallel_for_each(
1074 "ddc_splines_differentiate_3d_dim_2",
1077 KOKKOS_CLASS_LAMBDA(
1078 typename batch_domain_type<
1079 BatchedInterpolationDDom>::discrete_element_type
const j) {
1080 auto const spline_eval_3D = spline_eval[j];
1081 auto const coords_eval_3D = coords_eval[j];
1082 auto const spline_coef_3D = spline_coef[j];
1083 for (
auto const i1 : evaluation_domain1) {
1084 for (
auto const i2 : evaluation_domain2) {
1085 for (
auto const i3 : evaluation_domain3) {
1086 spline_eval_3D(i1, i2, i3) = eval_no_bc<
1089 eval_type>(coords_eval_3D(i1, i2, i3), spline_coef_3D);
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109 template <
class Layout1,
class Layout2,
class BatchedInterpolationDDom>
1111 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
1115 batched_spline_domain_type<BatchedInterpolationDDom>,
1117 memory_space>
const spline_coef)
const
1119 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(spline_eval.domain());
1120 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
1121 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
1122 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
1123 ddc::parallel_for_each(
1124 "ddc_splines_differentiate_3d_dim_2",
1127 KOKKOS_CLASS_LAMBDA(
1128 typename batch_domain_type<
1129 BatchedInterpolationDDom>::discrete_element_type
const j) {
1130 auto const spline_eval_3D = spline_eval[j];
1131 auto const spline_coef_3D = spline_coef[j];
1132 for (
auto const i1 : evaluation_domain1) {
1133 for (
auto const i2 : evaluation_domain2) {
1134 for (
auto const i3 : evaluation_domain3) {
1136 continuous_dimension_type1,
1137 continuous_dimension_type2,
1138 continuous_dimension_type3>
1140 ddc::coordinate(i1),
1141 ddc::coordinate(i2),
1142 ddc::coordinate(i3));
1143 spline_eval_3D(i1, i2, i3) = eval_no_bc<
1146 eval_type>(coord_eval_3D, spline_coef_3D);
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1175 class BatchedInterpolationDDom,
1176 class... CoordsDims>
1178 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
1181 ddc::Coordinate<CoordsDims...>
const,
1182 BatchedInterpolationDDom,
1184 memory_space>
const coords_eval,
1187 batched_spline_domain_type<BatchedInterpolationDDom>,
1189 memory_space>
const spline_coef)
const
1191 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(coords_eval.domain());
1192 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
1193 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
1194 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
1195 ddc::parallel_for_each(
1196 "ddc_splines_differentiate_3d_dim_3",
1199 KOKKOS_CLASS_LAMBDA(
1200 typename batch_domain_type<
1201 BatchedInterpolationDDom>::discrete_element_type
const j) {
1202 auto const spline_eval_3D = spline_eval[j];
1203 auto const coords_eval_3D = coords_eval[j];
1204 auto const spline_coef_3D = spline_coef[j];
1205 for (
auto const i1 : evaluation_domain1) {
1206 for (
auto const i2 : evaluation_domain2) {
1207 for (
auto const i3 : evaluation_domain3) {
1208 spline_eval_3D(i1, i2, i3)
1209 = eval_no_bc<eval_type, eval_type, eval_deriv_type>(
1210 coords_eval_3D(i1, i2, i3),
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231 template <
class Layout1,
class Layout2,
class BatchedInterpolationDDom>
1233 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
1237 batched_spline_domain_type<BatchedInterpolationDDom>,
1239 memory_space>
const spline_coef)
const
1241 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(spline_eval.domain());
1242 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
1243 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
1244 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
1245 ddc::parallel_for_each(
1246 "ddc_splines_differentiate_3d_dim_3",
1249 KOKKOS_CLASS_LAMBDA(
1250 typename batch_domain_type<
1251 BatchedInterpolationDDom>::discrete_element_type
const j) {
1252 auto const spline_eval_3D = spline_eval[j];
1253 auto const spline_coef_3D = spline_coef[j];
1254 for (
auto const i1 : evaluation_domain1) {
1255 for (
auto const i2 : evaluation_domain2) {
1256 for (
auto const i3 : evaluation_domain3) {
1258 continuous_dimension_type1,
1259 continuous_dimension_type2,
1260 continuous_dimension_type3>
1262 ddc::coordinate(i1),
1263 ddc::coordinate(i2),
1264 ddc::coordinate(i3));
1265 spline_eval_3D(i1, i2, i3) = eval_no_bc<
1268 eval_deriv_type>(coord_eval_3D, spline_coef_3D);
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1297 class BatchedInterpolationDDom,
1298 class... CoordsDims>
1300 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
1303 ddc::Coordinate<CoordsDims...>
const,
1304 BatchedInterpolationDDom,
1306 memory_space>
const coords_eval,
1309 batched_spline_domain_type<BatchedInterpolationDDom>,
1311 memory_space>
const spline_coef)
const
1313 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(coords_eval.domain());
1314 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
1315 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
1316 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
1317 ddc::parallel_for_each(
1318 "ddc_splines_cross_differentiate_3d_dim1_2",
1321 KOKKOS_CLASS_LAMBDA(
1322 typename batch_domain_type<
1323 BatchedInterpolationDDom>::discrete_element_type
const j) {
1324 auto const spline_eval_3D = spline_eval[j];
1325 auto const coords_eval_3D = coords_eval[j];
1326 auto const spline_coef_3D = spline_coef[j];
1327 for (
auto const i1 : evaluation_domain1) {
1328 for (
auto const i2 : evaluation_domain2) {
1329 for (
auto const i3 : evaluation_domain3) {
1330 spline_eval_3D(i1, i2, i3) = eval_no_bc<
1333 eval_type>(coords_eval_3D(i1, i2, i3), spline_coef_3D);
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353 template <
class Layout1,
class Layout2,
class BatchedInterpolationDDom>
1355 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
1359 batched_spline_domain_type<BatchedInterpolationDDom>,
1361 memory_space>
const spline_coef)
const
1363 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(spline_eval.domain());
1364 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
1365 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
1366 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
1367 ddc::parallel_for_each(
1368 "ddc_splines_cross_differentiate_3d_dim1_2",
1371 KOKKOS_CLASS_LAMBDA(
1372 typename batch_domain_type<
1373 BatchedInterpolationDDom>::discrete_element_type
const j) {
1374 auto const spline_eval_3D = spline_eval[j];
1375 auto const spline_coef_3D = spline_coef[j];
1376 for (
auto const i1 : evaluation_domain1) {
1377 for (
auto const i2 : evaluation_domain2) {
1378 for (
auto const i3 : evaluation_domain3) {
1380 continuous_dimension_type1,
1381 continuous_dimension_type2,
1382 continuous_dimension_type3>
1384 ddc::coordinate(i1),
1385 ddc::coordinate(i2),
1386 ddc::coordinate(i3));
1387 spline_eval_3D(i1, i2, i3) = eval_no_bc<
1390 eval_type>(coord_eval_3D, spline_coef_3D);
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1419 class BatchedInterpolationDDom,
1420 class... CoordsDims>
1422 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
1425 ddc::Coordinate<CoordsDims...>
const,
1426 BatchedInterpolationDDom,
1428 memory_space>
const coords_eval,
1431 batched_spline_domain_type<BatchedInterpolationDDom>,
1433 memory_space>
const spline_coef)
const
1435 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(coords_eval.domain());
1436 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
1437 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
1438 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
1439 ddc::parallel_for_each(
1440 "ddc_splines_cross_differentiate_3d_dim2_3",
1443 KOKKOS_CLASS_LAMBDA(
1444 typename batch_domain_type<
1445 BatchedInterpolationDDom>::discrete_element_type
const j) {
1446 auto const spline_eval_3D = spline_eval[j];
1447 auto const coords_eval_3D = coords_eval[j];
1448 auto const spline_coef_3D = spline_coef[j];
1449 for (
auto const i1 : evaluation_domain1) {
1450 for (
auto const i2 : evaluation_domain2) {
1451 for (
auto const i3 : evaluation_domain3) {
1452 spline_eval_3D(i1, i2, i3)
1453 = eval_no_bc<eval_type, eval_deriv_type, eval_deriv_type>(
1454 coords_eval_3D(i1, i2, i3),
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475 template <
class Layout1,
class Layout2,
class BatchedInterpolationDDom>
1477 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
1481 batched_spline_domain_type<BatchedInterpolationDDom>,
1483 memory_space>
const spline_coef)
const
1485 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(spline_eval.domain());
1486 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
1487 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
1488 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
1489 ddc::parallel_for_each(
1490 "ddc_splines_cross_differentiate_3d_dim2_3",
1493 KOKKOS_CLASS_LAMBDA(
1494 typename batch_domain_type<
1495 BatchedInterpolationDDom>::discrete_element_type
const j) {
1496 auto const spline_eval_3D = spline_eval[j];
1497 auto const spline_coef_3D = spline_coef[j];
1498 for (
auto const i1 : evaluation_domain1) {
1499 for (
auto const i2 : evaluation_domain2) {
1500 for (
auto const i3 : evaluation_domain3) {
1502 continuous_dimension_type1,
1503 continuous_dimension_type2,
1504 continuous_dimension_type3>
1506 ddc::coordinate(i1),
1507 ddc::coordinate(i2),
1508 ddc::coordinate(i3));
1509 spline_eval_3D(i1, i2, i3) = eval_no_bc<
1512 eval_deriv_type>(coord_eval_3D, spline_coef_3D);
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1541 class BatchedInterpolationDDom,
1542 class... CoordsDims>
1544 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
1547 ddc::Coordinate<CoordsDims...>
const,
1548 BatchedInterpolationDDom,
1550 memory_space>
const coords_eval,
1553 batched_spline_domain_type<BatchedInterpolationDDom>,
1555 memory_space>
const spline_coef)
const
1557 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(coords_eval.domain());
1558 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
1559 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
1560 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
1561 ddc::parallel_for_each(
1562 "ddc_splines_cross_differentiate_3d_dim1_3",
1565 KOKKOS_CLASS_LAMBDA(
1566 typename batch_domain_type<
1567 BatchedInterpolationDDom>::discrete_element_type
const j) {
1568 auto const spline_eval_3D = spline_eval[j];
1569 auto const coords_eval_3D = coords_eval[j];
1570 auto const spline_coef_3D = spline_coef[j];
1571 for (
auto const i1 : evaluation_domain1) {
1572 for (
auto const i2 : evaluation_domain2) {
1573 for (
auto const i3 : evaluation_domain3) {
1574 spline_eval_3D(i1, i2, i3)
1575 = eval_no_bc<eval_deriv_type, eval_type, eval_deriv_type>(
1576 coords_eval_3D(i1, i2, i3),
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597 template <
class Layout1,
class Layout2,
class BatchedInterpolationDDom>
1599 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
1603 batched_spline_domain_type<BatchedInterpolationDDom>,
1605 memory_space>
const spline_coef)
const
1607 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(spline_eval.domain());
1608 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
1609 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
1610 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
1611 ddc::parallel_for_each(
1612 "ddc_splines_cross_differentiate_3d_dim1_3",
1615 KOKKOS_CLASS_LAMBDA(
1616 typename batch_domain_type<
1617 BatchedInterpolationDDom>::discrete_element_type
const j) {
1618 auto const spline_eval_3D = spline_eval[j];
1619 auto const spline_coef_3D = spline_coef[j];
1620 for (
auto const i1 : evaluation_domain1) {
1621 for (
auto const i2 : evaluation_domain2) {
1622 for (
auto const i3 : evaluation_domain3) {
1624 continuous_dimension_type1,
1625 continuous_dimension_type2,
1626 continuous_dimension_type3>
1628 ddc::coordinate(i1),
1629 ddc::coordinate(i2),
1630 ddc::coordinate(i3));
1631 spline_eval_3D(i1, i2, i3) = eval_no_bc<
1634 eval_deriv_type>(coord_eval_3D, spline_coef_3D);
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1663 class BatchedInterpolationDDom,
1664 class... CoordsDims>
1666 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
1669 ddc::Coordinate<CoordsDims...>
const,
1670 BatchedInterpolationDDom,
1672 memory_space>
const coords_eval,
1675 batched_spline_domain_type<BatchedInterpolationDDom>,
1677 memory_space>
const spline_coef)
const
1679 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(coords_eval.domain());
1680 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
1681 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
1682 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
1683 ddc::parallel_for_each(
1684 "ddc_splines_cross_differentiate_3d_dim1_2_3",
1687 KOKKOS_CLASS_LAMBDA(
1688 typename batch_domain_type<
1689 BatchedInterpolationDDom>::discrete_element_type
const j) {
1690 auto const spline_eval_3D = spline_eval[j];
1691 auto const coords_eval_3D = coords_eval[j];
1692 auto const spline_coef_3D = spline_coef[j];
1693 for (
auto const i1 : evaluation_domain1) {
1694 for (
auto const i2 : evaluation_domain2) {
1695 for (
auto const i3 : evaluation_domain3) {
1696 spline_eval_3D(i1, i2, i3) = eval_no_bc<
1700 coords_eval_3D(i1, i2, i3),
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721 template <
class Layout1,
class Layout2,
class BatchedInterpolationDDom>
1723 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
1727 batched_spline_domain_type<BatchedInterpolationDDom>,
1729 memory_space>
const spline_coef)
const
1731 batch_domain_type<BatchedInterpolationDDom>
const batch_domain(spline_eval.domain());
1732 evaluation_domain_type1
const evaluation_domain1(spline_eval.domain());
1733 evaluation_domain_type2
const evaluation_domain2(spline_eval.domain());
1734 evaluation_domain_type3
const evaluation_domain3(spline_eval.domain());
1735 ddc::parallel_for_each(
1736 "ddc_splines_cross_differentiate_3d_dim1_2_3",
1739 KOKKOS_CLASS_LAMBDA(
1740 typename batch_domain_type<
1741 BatchedInterpolationDDom>::discrete_element_type
const j) {
1742 auto const spline_eval_3D = spline_eval[j];
1743 auto const spline_coef_3D = spline_coef[j];
1744 for (
auto const i1 : evaluation_domain1) {
1745 for (
auto const i2 : evaluation_domain2) {
1746 for (
auto const i3 : evaluation_domain3) {
1748 continuous_dimension_type1,
1749 continuous_dimension_type2,
1750 continuous_dimension_type3>
1752 ddc::coordinate(i1),
1753 ddc::coordinate(i2),
1754 ddc::coordinate(i3));
1755 spline_eval_3D(i1, i2, i3) = eval_no_bc<
1758 eval_deriv_type>(coord_eval_3D, spline_coef_3D);
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1789 class BatchedInterpolationDDom,
1790 class... CoordsDims>
1792 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
1795 ddc::Coordinate<CoordsDims...>
const,
1796 BatchedInterpolationDDom,
1798 memory_space>
const coords_eval,
1801 batched_spline_domain_type<BatchedInterpolationDDom>,
1803 memory_space>
const spline_coef)
const
1808 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
1809 || std::is_same_v<InterestDim, continuous_dimension_type2>
1810 || std::is_same_v<InterestDim, continuous_dimension_type3>);
1811 if constexpr (std::is_same_v<
1813 typename evaluation_discrete_dimension_type1::
1814 continuous_dimension_type>) {
1815 return deriv_dim_1(spline_eval, coords_eval, spline_coef);
1816 }
else if constexpr (std::is_same_v<
1818 typename evaluation_discrete_dimension_type2::
1819 continuous_dimension_type>) {
1820 return deriv_dim_2(spline_eval, coords_eval, spline_coef);
1821 }
else if constexpr (std::is_same_v<
1823 typename evaluation_discrete_dimension_type3::
1824 continuous_dimension_type>) {
1825 return deriv_dim_3(spline_eval, coords_eval, spline_coef);
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843 template <
class InterestDim,
class Layout1,
class Layout2,
class BatchedInterpolationDDom>
1845 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
1849 batched_spline_domain_type<BatchedInterpolationDDom>,
1851 memory_space>
const spline_coef)
const
1856 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
1857 || std::is_same_v<InterestDim, continuous_dimension_type2>
1858 || std::is_same_v<InterestDim, continuous_dimension_type3>);
1859 if constexpr (std::is_same_v<
1861 typename evaluation_discrete_dimension_type1::
1862 continuous_dimension_type>) {
1863 return deriv_dim_1(spline_eval, spline_coef);
1864 }
else if constexpr (std::is_same_v<
1866 typename evaluation_discrete_dimension_type2::
1867 continuous_dimension_type>) {
1868 return deriv_dim_2(spline_eval, spline_coef);
1869 }
else if constexpr (std::is_same_v<
1871 typename evaluation_discrete_dimension_type3::
1872 continuous_dimension_type>) {
1873 return deriv_dim_3(spline_eval, spline_coef);
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1906 class BatchedInterpolationDDom,
1907 class... CoordsDims>
1909 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
1912 ddc::Coordinate<CoordsDims...>
const,
1913 BatchedInterpolationDDom,
1915 memory_space>
const coords_eval,
1918 batched_spline_domain_type<BatchedInterpolationDDom>,
1920 memory_space>
const spline_coef)
const
1925 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
1926 && std::is_same_v<InterestDim2, continuous_dimension_type2>)
1929 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
1930 && std::is_same_v<InterestDim1, continuous_dimension_type2>)
1933 typename evaluation_discrete_dimension_type2::continuous_dimension_type>
1934 && std::is_same_v<InterestDim2, continuous_dimension_type3>)
1937 typename evaluation_discrete_dimension_type2::continuous_dimension_type>
1938 && std::is_same_v<InterestDim1, continuous_dimension_type3>)
1941 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
1942 && std::is_same_v<InterestDim2, continuous_dimension_type3>)
1945 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
1946 && std::is_same_v<InterestDim1, continuous_dimension_type3>));
1951 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
1952 && std::is_same_v<InterestDim2, continuous_dimension_type2>)
1955 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
1956 && std::is_same_v<InterestDim1, continuous_dimension_type2>)) {
1957 return deriv_1_and_2(spline_eval, coords_eval, spline_coef);
1958 }
else if constexpr (
1961 typename evaluation_discrete_dimension_type2::continuous_dimension_type>
1962 && std::is_same_v<InterestDim2, continuous_dimension_type3>)
1965 typename evaluation_discrete_dimension_type2::continuous_dimension_type>
1966 && std::is_same_v<InterestDim1, continuous_dimension_type3>)) {
1967 return deriv_2_and_3(spline_eval, coords_eval, spline_coef);
1968 }
else if constexpr (
1971 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
1972 && std::is_same_v<InterestDim2, continuous_dimension_type3>)
1975 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
1976 && std::is_same_v<InterestDim1, continuous_dimension_type3>)) {
1977 return deriv_1_and_3(spline_eval, coords_eval, spline_coef);
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
2004 class BatchedInterpolationDDom>
2006 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
2010 batched_spline_domain_type<BatchedInterpolationDDom>,
2012 memory_space>
const spline_coef)
const
2017 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
2018 && std::is_same_v<InterestDim2, continuous_dimension_type2>)
2021 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
2022 && std::is_same_v<InterestDim1, continuous_dimension_type2>)
2025 typename evaluation_discrete_dimension_type2::continuous_dimension_type>
2026 && std::is_same_v<InterestDim2, continuous_dimension_type3>)
2029 typename evaluation_discrete_dimension_type2::continuous_dimension_type>
2030 && std::is_same_v<InterestDim1, continuous_dimension_type3>)
2033 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
2034 && std::is_same_v<InterestDim2, continuous_dimension_type3>)
2037 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
2038 && std::is_same_v<InterestDim1, continuous_dimension_type3>));
2043 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
2044 && std::is_same_v<InterestDim2, continuous_dimension_type2>)
2047 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
2048 && std::is_same_v<InterestDim1, continuous_dimension_type2>)) {
2049 return deriv_1_and_2(spline_eval, spline_coef);
2050 }
else if constexpr (
2053 typename evaluation_discrete_dimension_type2::continuous_dimension_type>
2054 && std::is_same_v<InterestDim2, continuous_dimension_type3>)
2057 typename evaluation_discrete_dimension_type2::continuous_dimension_type>
2058 && std::is_same_v<InterestDim1, continuous_dimension_type3>)) {
2059 return deriv_2_and_3(spline_eval, spline_coef);
2060 }
else if constexpr (
2063 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
2064 && std::is_same_v<InterestDim2, continuous_dimension_type3>)
2067 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
2068 && std::is_same_v<InterestDim1, continuous_dimension_type3>)) {
2069 return deriv_1_and_3(spline_eval, spline_coef);
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2104 class BatchedInterpolationDDom,
2105 class... CoordsDims>
2107 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
2110 ddc::Coordinate<CoordsDims...>
const,
2111 BatchedInterpolationDDom,
2113 memory_space>
const coords_eval,
2116 batched_spline_domain_type<BatchedInterpolationDDom>,
2118 memory_space>
const spline_coef)
const
2123 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
2124 && std::is_same_v<InterestDim2, continuous_dimension_type2>
2125 && std::is_same_v<InterestDim3, continuous_dimension_type3>)
2128 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
2129 && std::is_same_v<InterestDim1, continuous_dimension_type2>
2130 && std::is_same_v<InterestDim2, continuous_dimension_type3>)
2133 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
2134 && std::is_same_v<InterestDim3, continuous_dimension_type2>
2135 && std::is_same_v<InterestDim1, continuous_dimension_type3>));
2137 return deriv_1_2_3(spline_eval, coords_eval, spline_coef);
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2165 class BatchedInterpolationDDom>
2167 ddc::
ChunkSpan<
double, BatchedInterpolationDDom, Layout1, memory_space>
const
2171 batched_spline_domain_type<BatchedInterpolationDDom>,
2173 memory_space>
const spline_coef)
const
2178 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
2179 && std::is_same_v<InterestDim2, continuous_dimension_type2>
2180 && std::is_same_v<InterestDim3, continuous_dimension_type3>)
2183 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
2184 && std::is_same_v<InterestDim1, continuous_dimension_type2>
2185 && std::is_same_v<InterestDim2, continuous_dimension_type3>)
2188 typename evaluation_discrete_dimension_type1::continuous_dimension_type>
2189 && std::is_same_v<InterestDim3, continuous_dimension_type2>
2190 && std::is_same_v<InterestDim1, continuous_dimension_type3>));
2192 return deriv_1_2_3(spline_eval, spline_coef);
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208 template <
class Layout1,
class Layout2,
class BatchedDDom,
class BatchedSplineDDom>
2210 ddc::
ChunkSpan<
double, BatchedDDom, Layout1, memory_space>
const integrals,
2211 ddc::
ChunkSpan<
double const, BatchedSplineDDom, Layout2, memory_space>
const
2215 ddc::type_seq_contains_v<
2216 ddc::detail::TypeSeq<bsplines_type1, bsplines_type2, bsplines_type3>,
2217 to_type_seq_t<BatchedSplineDDom>>,
2218 "The spline coefficients domain must contain the bsplines dimensions");
2219 using batch_domain_type =
ddc::
2220 remove_dims_of_t<BatchedSplineDDom, bsplines_type1, bsplines_type2, bsplines_type3>;
2222 std::is_same_v<batch_domain_type, BatchedDDom>,
2223 "The integrals domain must only contain the batch dimensions");
2225 batch_domain_type batch_domain(integrals.domain());
2230 ddc::integrals(exec_space(), values1);
2235 ddc::integrals(exec_space(), values2);
2240 ddc::integrals(exec_space(), values3);
2242 ddc::parallel_for_each(
2243 "ddc_splines_integrate_bsplines",
2246 KOKKOS_LAMBDA(
typename batch_domain_type::discrete_element_type
const j) {
2248 for (
typename spline_domain_type1::discrete_element_type
const i1 :
2250 for (
typename spline_domain_type2::discrete_element_type
const i2 :
2252 for (
typename spline_domain_type3::discrete_element_type
const i3 :
2254 integrals(j) += spline_coef(i1, i2, i3, j) * values1(i1)
2255 * values2(i2) * values3(i3);
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278 template <
class Layout,
class... CoordsDims>
2279 KOKKOS_INLINE_FUNCTION
double eval(
2280 ddc::Coordinate<CoordsDims...> coord_eval,
2281 ddc::
ChunkSpan<
double const, spline_domain_type, Layout, memory_space>
const
2284 using Dim1 = continuous_dimension_type1;
2285 using Dim2 = continuous_dimension_type2;
2286 using Dim3 = continuous_dimension_type3;
2287 if constexpr (bsplines_type1::is_periodic()) {
2288 if (
ddc::get<Dim1>(coord_eval) <
ddc::discrete_space<bsplines_type1>().rmin()
2289 ||
ddc::get<Dim1>(coord_eval) >
ddc::discrete_space<bsplines_type1>().rmax()) {
2290 ddc::get<Dim1>(coord_eval)
2292 (
ddc::get<Dim1>(coord_eval)
2293 -
ddc::discrete_space<bsplines_type1>().rmin())
2294 /
ddc::discrete_space<bsplines_type1>().length())
2295 *
ddc::discrete_space<bsplines_type1>().length();
2298 if constexpr (bsplines_type2::is_periodic()) {
2299 if (
ddc::get<Dim2>(coord_eval) <
ddc::discrete_space<bsplines_type2>().rmin()
2300 ||
ddc::get<Dim2>(coord_eval) >
ddc::discrete_space<bsplines_type2>().rmax()) {
2301 ddc::get<Dim2>(coord_eval)
2303 (
ddc::get<Dim2>(coord_eval)
2304 -
ddc::discrete_space<bsplines_type2>().rmin())
2305 /
ddc::discrete_space<bsplines_type2>().length())
2306 *
ddc::discrete_space<bsplines_type2>().length();
2309 if constexpr (bsplines_type3::is_periodic()) {
2310 if (
ddc::get<Dim3>(coord_eval) <
ddc::discrete_space<bsplines_type3>().rmin()
2311 ||
ddc::get<Dim3>(coord_eval) >
ddc::discrete_space<bsplines_type3>().rmax()) {
2312 ddc::get<Dim3>(coord_eval)
2314 (
ddc::get<Dim3>(coord_eval)
2315 -
ddc::discrete_space<bsplines_type3>().rmin())
2316 /
ddc::discrete_space<bsplines_type3>().length())
2317 *
ddc::discrete_space<bsplines_type3>().length();
2320 if constexpr (!bsplines_type1::is_periodic()) {
2321 if (
ddc::get<Dim1>(coord_eval) <
ddc::discrete_space<bsplines_type1>().rmin()) {
2322 return m_lower_extrap_rule_1(coord_eval, spline_coef);
2324 if (
ddc::get<Dim1>(coord_eval) >
ddc::discrete_space<bsplines_type1>().rmax()) {
2325 return m_upper_extrap_rule_1(coord_eval, spline_coef);
2328 if constexpr (!bsplines_type2::is_periodic()) {
2329 if (
ddc::get<Dim2>(coord_eval) <
ddc::discrete_space<bsplines_type2>().rmin()) {
2330 return m_lower_extrap_rule_2(coord_eval, spline_coef);
2332 if (
ddc::get<Dim2>(coord_eval) >
ddc::discrete_space<bsplines_type2>().rmax()) {
2333 return m_upper_extrap_rule_2(coord_eval, spline_coef);
2336 if constexpr (!bsplines_type3::is_periodic()) {
2337 if (
ddc::get<Dim3>(coord_eval) <
ddc::discrete_space<bsplines_type3>().rmin()) {
2338 return m_lower_extrap_rule_3(coord_eval, spline_coef);
2340 if (
ddc::get<Dim3>(coord_eval) >
ddc::discrete_space<bsplines_type3>().rmax()) {
2341 return m_upper_extrap_rule_3(coord_eval, spline_coef);
2344 return eval_no_bc<eval_type, eval_type, eval_type>(
2346 continuous_dimension_type1,
2347 continuous_dimension_type2,
2348 continuous_dimension_type3>(
2349 ddc::get<Dim1>(coord_eval),
2350 ddc::get<Dim2>(coord_eval),
2351 ddc::get<Dim3>(coord_eval)),
2356
2357
2358
2359
2360
2361
2362
2363 template <
class EvalType1,
class EvalType2,
class EvalType3,
class Layout,
class... CoordsDims>
2364 KOKKOS_INLINE_FUNCTION
double eval_no_bc(
2365 ddc::Coordinate<CoordsDims...>
const& coord_eval,
2366 ddc::
ChunkSpan<
double const, spline_domain_type, Layout, memory_space>
const
2370 std::is_same_v<EvalType1, eval_type> || std::is_same_v<EvalType1, eval_deriv_type>);
2372 std::is_same_v<EvalType2, eval_type> || std::is_same_v<EvalType2, eval_deriv_type>);
2374 std::is_same_v<EvalType3, eval_type> || std::is_same_v<EvalType3, eval_deriv_type>);
2375 ddc::DiscreteElement<bsplines_type1> jmin1;
2376 ddc::DiscreteElement<bsplines_type2> jmin2;
2377 ddc::DiscreteElement<bsplines_type3> jmin3;
2379 std::array<
double, bsplines_type1::degree() + 1> vals1_ptr;
2380 Kokkos::mdspan<
double, Kokkos::extents<std::size_t, bsplines_type1::degree() + 1>>
const
2381 vals1(vals1_ptr.data());
2382 std::array<
double, bsplines_type2::degree() + 1> vals2_ptr;
2383 Kokkos::mdspan<
double, Kokkos::extents<std::size_t, bsplines_type2::degree() + 1>>
const
2384 vals2(vals2_ptr.data());
2385 std::array<
double, bsplines_type3::degree() + 1> vals3_ptr;
2386 Kokkos::mdspan<
double, Kokkos::extents<std::size_t, bsplines_type3::degree() + 1>>
const
2387 vals3(vals3_ptr.data());
2388 ddc::Coordinate<continuous_dimension_type1>
const coord_eval_interest1(coord_eval);
2389 ddc::Coordinate<continuous_dimension_type2>
const coord_eval_interest2(coord_eval);
2390 ddc::Coordinate<continuous_dimension_type3>
const coord_eval_interest3(coord_eval);
2392 if constexpr (std::is_same_v<EvalType1, eval_type>) {
2393 jmin1 =
ddc::discrete_space<bsplines_type1>().eval_basis(vals1, coord_eval_interest1);
2394 }
else if constexpr (std::is_same_v<EvalType1, eval_deriv_type>) {
2395 jmin1 =
ddc::discrete_space<bsplines_type1>().eval_deriv(vals1, coord_eval_interest1);
2397 if constexpr (std::is_same_v<EvalType2, eval_type>) {
2398 jmin2 =
ddc::discrete_space<bsplines_type2>().eval_basis(vals2, coord_eval_interest2);
2399 }
else if constexpr (std::is_same_v<EvalType2, eval_deriv_type>) {
2400 jmin2 =
ddc::discrete_space<bsplines_type2>().eval_deriv(vals2, coord_eval_interest2);
2402 if constexpr (std::is_same_v<EvalType3, eval_type>) {
2403 jmin3 =
ddc::discrete_space<bsplines_type3>().eval_basis(vals3, coord_eval_interest3);
2404 }
else if constexpr (std::is_same_v<EvalType3, eval_deriv_type>) {
2405 jmin3 =
ddc::discrete_space<bsplines_type3>().eval_deriv(vals3, coord_eval_interest3);
2409 for (std::size_t i = 0; i < bsplines_type1::degree() + 1; ++i) {
2410 for (std::size_t j = 0; j < bsplines_type2::degree() + 1; ++j) {
2411 for (std::size_t k = 0; k < bsplines_type3::degree() + 1; ++k) {
2413 ddc::DiscreteElement<
2416 bsplines_type3>(jmin1 + i, jmin2 + j, jmin3 + k))
2417 * vals1[i] * vals2[j] * vals3[k];
friend class DiscreteDomain
A class to evaluate, differentiate or integrate a 3D spline function.
upper_extrapolation_rule_1_type upper_extrapolation_rule_dim_1() const
Get the upper extrapolation rule along the first dimension.
KOKKOS_FUNCTION double deriv_dim_2(ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
Differentiate 3D spline function (described by its spline coefficients) at a given coordinate along s...
void deriv(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 spline function (described by its spline coefficients) on a mesh along a specified dime...
void deriv_dim_2(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 3D spline function (described by its spline coefficients) on a mesh along second dimens...
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 3D spline function (described by its spline coefficients) on a mesh.
SplineEvaluator3D & operator=(SplineEvaluator3D &&x)=default
Move-assigns.
void deriv_2_and_3(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
Cross-differentiate 3D spline function (described by its spline coefficients) on a mesh along the sec...
void deriv_dim_1(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 3D spline function (described by its spline coefficients) on a mesh along first dimensi...
upper_extrapolation_rule_3_type upper_extrapolation_rule_dim_3() const
Get the upper extrapolation rule along the third dimension.
void deriv_1_2_3(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
Cross-differentiate 3D spline function (described by its spline coefficients) on a mesh along the dim...
SplineEvaluator3D(LowerExtrapolationRule1 const &lower_extrap_rule1, UpperExtrapolationRule1 const &upper_extrap_rule1, LowerExtrapolationRule2 const &lower_extrap_rule2, UpperExtrapolationRule2 const &upper_extrap_rule2, LowerExtrapolationRule3 const &lower_extrap_rule3, UpperExtrapolationRule3 const &upper_extrap_rule3)
Build a SplineEvaluator3D acting on batched_spline_domain.
void deriv_dim_2(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 3D spline function (described by its spline coefficients) on a mesh along second dimens...
KOKKOS_FUNCTION double deriv_dim_1(ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
Differentiate 3D spline function (described by its spline coefficients) at a given coordinate along f...
void deriv(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 spline function (described by its spline coefficients) on a mesh along a specified dime...
KOKKOS_FUNCTION double deriv_1_and_3(ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
Cross-differentiate 3D spline function (described by its spline coefficients) at a given coordinate a...
~SplineEvaluator3D()=default
Destructs.
lower_extrapolation_rule_1_type lower_extrapolation_rule_dim_1() const
Get the lower extrapolation rule along the first dimension.
upper_extrapolation_rule_2_type upper_extrapolation_rule_dim_2() const
Get the upper extrapolation rule along the second dimension.
KOKKOS_FUNCTION double deriv(ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
Differentiate 3D spline function (described by its spline coefficients) at a given coordinate along a...
KOKKOS_FUNCTION double deriv_dim_3(ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
Differentiate 3D spline function (described by its spline coefficients) at a given coordinate along t...
KOKKOS_FUNCTION double deriv2(ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
Double-differentiate 3D spline function (described by its spline coefficients) at a given coordinate ...
SplineEvaluator3D(SplineEvaluator3D const &x)=default
Copy-constructs.
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 3D spline function (described by its spline coefficients) at a given coordinate.
lower_extrapolation_rule_3_type lower_extrapolation_rule_dim_3() const
Get the lower extrapolation rule along the third dimension.
void deriv2(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
Double-differentiate 3D spline function (described by its spline coefficients) on a mesh along specif...
KOKKOS_FUNCTION double deriv_1_2_3(ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
Cross-differentiate 3D spline function (described by its spline coefficients) at a given coordinate a...
void deriv_dim_3(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 3D spline function (described by its spline coefficients) on a mesh along third dimensi...
void deriv_dim_1(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 3D spline function (described by its spline coefficients) on a mesh along first dimensi...
KOKKOS_FUNCTION double deriv_1_and_2(ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
Cross-differentiate 3D spline function (described by its spline coefficients) at a given coordinate a...
SplineEvaluator3D(SplineEvaluator3D &&x)=default
Move-constructs.
void deriv3(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 spline function (described by its spline coefficients) on a mesh along a specified dime...
void deriv_dim_3(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 3D spline function (described by its spline coefficients) on a mesh along third dimensi...
void deriv_2_and_3(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
Cross-differentiate 3D spline function (described by its spline coefficients) on a mesh along the sec...
void deriv_1_2_3(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
Cross-differentiate 3D spline function (described by its spline coefficients) on a mesh along the dim...
void deriv2(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
Double-differentiate 3D spline function (described by its spline coefficients) on a mesh along specif...
void deriv3(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 spline function (described by its spline coefficients) on a mesh along specified dimens...
void deriv_1_and_2(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
Cross-differentiate 3D spline function (described by its spline coefficients) on a mesh along the fir...
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 3D integrations of a spline function (described by its spline coefficients) along the...
void deriv_1_and_2(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
Cross-differentiate 3D spline function (described by its spline coefficients) on a mesh along the fir...
void deriv_1_and_3(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
Cross-differentiate 3D spline function (described by its spline coefficients) on a mesh along the fir...
lower_extrapolation_rule_2_type lower_extrapolation_rule_dim_2() const
Get the lower extrapolation rule along the second dimension.
SplineEvaluator3D & operator=(SplineEvaluator3D const &x)=default
Copy-assigns.
void deriv_1_and_3(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
Cross-differentiate 3D spline function (described by its spline coefficients) on a mesh along the fir...
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 3D spline function (described by its spline coefficients) on a mesh.
KOKKOS_FUNCTION double deriv3(ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
Triple-differentiate 3D spline function (described by its spline coefficients) at a given coordinate ...
KOKKOS_FUNCTION double deriv_2_and_3(ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
Cross-differentiate 3D spline function (described by its spline coefficients) at a given coordinate a...
The top-level namespace of DDC.