Gyselalib++
 
Loading...
Searching...
No Matches
multipatch_spline_evaluator_2d.hpp
1// SPDX-License-Identifier: MIT
2
3#pragma once
4#include <cassert>
5#include <utility>
6
7#include <ddc/kernels/splines.hpp>
8
9#include <sll/view.hpp>
10
11#include "ddc_aliases.hpp"
12#include "ddc_helper.hpp"
13#include "multipatch_type.hpp"
14#include "types.hpp"
15#include "utils_patch_locators.hpp"
16
17
51template <
52 class ExecSpace,
53 class MemorySpace,
54 template <typename P>
55 typename BSpline1OnPatch,
56 template <typename P>
57 typename BSpline2OnPatch,
58 template <typename P>
59 typename Grid1OnPatch,
60 template <typename P>
61 typename Grid2OnPatch,
62 class ExtrapolationRule,
63 template <typename P>
64 typename ValuesOnPatch,
65 class PatchLocator,
66 class... Patches>
68{
69public:
71 struct eval_type
72 {
73 };
74
77 {
78 };
79
82 template <class Patch>
83 using continuous_dimension_type1 = typename BSpline1OnPatch<Patch>::continuous_dimension_type;
84
87 template <class Patch>
88 using continuous_dimension_type2 = typename BSpline2OnPatch<Patch>::continuous_dimension_type;
89
90
92 using exec_space = ExecSpace;
93
95 using memory_space = MemorySpace;
96
97
100 template <class Patch>
101 using evaluation_discrete_dimension_type1 = Grid1OnPatch<Patch>;
102
105 template <class Patch>
106 using evaluation_discrete_dimension_type2 = Grid2OnPatch<Patch>;
107
110 template <class Patch>
111 using bsplines_type1 = BSpline1OnPatch<Patch>;
112
115 template <class Patch>
116 using bsplines_type2 = BSpline2OnPatch<Patch>;
117
118
121 template <class Patch>
122 using evaluation_idx_range_type1 = IdxRange<evaluation_discrete_dimension_type1<Patch>>;
123
126 template <class Patch>
127 using evaluation_idx_range_type2 = IdxRange<evaluation_discrete_dimension_type2<Patch>>;
128
131 template <class Patch>
135
136
139 template <class Patch>
140 using batched_evaluation_idx_range_type = typename ValuesOnPatch<Patch>::discrete_domain_type;
141
142
145 template <class Patch>
146 using spline_idx_range_type1 = IdxRange<bsplines_type1<Patch>>;
147
150 template <class Patch>
151 using spline_idx_range_type2 = IdxRange<bsplines_type2<Patch>>;
152
155 template <class Patch>
156 using spline_idx_range_type = IdxRange<bsplines_type1<Patch>, bsplines_type2<Patch>>;
157
158
159private:
160 template <class Patch>
161 using CoordOnPatch
162 = Coord<typename Grid1OnPatch<Patch>::continuous_dimension_type,
163 typename Grid2OnPatch<Patch>::continuous_dimension_type>;
164
165 // Fields
166 template <class Patch>
167 using CoordConstFieldOnPatch
168 = ConstField<CoordOnPatch<Patch>, evaluation_idx_range_type<Patch>, MemorySpace>;
169
170public:
176 template <class Patch>
177 using SplineCoeffOnPatch = DConstField<spline_idx_range_type<Patch>, MemorySpace>;
178
179private:
180 // MultipatchTypes
181 using MultipatchValues = MultipatchField<ValuesOnPatch, Patches...>;
182 using MultipatchCoordField = MultipatchField<CoordConstFieldOnPatch, Patches...>;
184
185 // Patches
186 using PatchOrdering = ddc::detail::TypeSeq<Patches...>;
187
188public:
190 static constexpr std::size_t n_patches = ddc::type_seq_size_v<PatchOrdering>;
191
192private:
193 // Asserts -----------------------------------------------------------------------------------
194 template <class Patch>
195 static bool constexpr same_evaluation_idx_range_types = std::
196 is_same_v<evaluation_idx_range_type<Patch>, batched_evaluation_idx_range_type<Patch>>;
197
198 static_assert(
199 (same_evaluation_idx_range_types<Patches> && ...),
200 "Operator not yet implemented for batched domains.");
201
202 static_assert(
203 ((std::is_same_v<typename ValuesOnPatch<Patches>::memory_space, memory_space>)&&...),
204 "Template ValuesOnPatch<Patch> need to be defined on the memory space than the"
205 "MultipatchSplineEvaluator2D class.");
206
207 static_assert(
208 is_onion_patch_locator_v<PatchLocator>,
209 "Operator currently works only on analytical mappings and patches on the same logical "
210 "continous dimension. E.g. OnionPatchLocator.");
211
212
213 // Members -----------------------------------------------------------------------------------
214 PatchLocator const m_patch_locator;
215 ExtrapolationRule const m_extrapolation_rule;
216
217
218public:
220
229 PatchLocator const& patch_locator,
230 ExtrapolationRule const& extrapolation_rule)
231 : m_patch_locator(patch_locator)
232 , m_extrapolation_rule(extrapolation_rule)
233 {
234 }
235
236
237 // Assignment operators ----------------------------------------------------------------------
253 template <class Coord>
254 KOKKOS_FUNCTION double operator()(
255 Coord const coord_eval,
256 MultipatchSplineCoeff const& patches_splines) const
257 {
258 int const patch_idx = get_patch_idx(coord_eval);
259 return recursive_dispatch_patch_function<
260 eval_type,
261 eval_type>(coord_eval, patches_splines, patch_idx);
262 }
263
275 MultipatchValues const& patches_values,
276 MultipatchCoordField const& patches_coords,
277 MultipatchSplineCoeff const& patches_splines) const
278 {
279 (apply_evaluator<eval_type, eval_type, Patches>(
280 patches_values.template get<Patches>(),
281 patches_coords.template get<Patches>(),
282 patches_splines),
283 ...);
284 }
285
286
287 // Derivatives operators ---------------------------------------------------------------------
304 template <class Coord>
305 KOKKOS_FUNCTION double deriv_dim_1(
306 Coord const& coord_eval,
307 MultipatchSplineCoeff const& patches_splines) const
308 {
309 int const patch_idx = get_patch_idx(coord_eval);
310 if (patch_idx < 0) {
311 Kokkos::abort("The evaluation coordinate has to be on a patch."
312 "No extrapolation rule for derivatives. \n");
313 }
314 return recursive_dispatch_patch_function<
316 eval_type>(coord_eval, patches_splines, patch_idx);
317 }
318
334 template <class Coord>
335 KOKKOS_FUNCTION double deriv_dim_2(
336 Coord const& coord_eval,
337 MultipatchSplineCoeff const& patches_splines) const
338 {
339 int const patch_idx = get_patch_idx(coord_eval);
340 if (patch_idx < 0) {
341 Kokkos::abort("The evaluation coordinate has to be on a patch."
342 "No extrapolation rule for derivatives. \n");
343 }
344 return recursive_dispatch_patch_function<
345 eval_type,
346 eval_deriv_type>(coord_eval, patches_splines, patch_idx);
347 }
348
363 template <class Coord>
364 KOKKOS_FUNCTION double deriv_1_and_2(
365 Coord const& coord_eval,
366 MultipatchSplineCoeff const& patches_splines) const
367 {
368 int const patch_idx = get_patch_idx(coord_eval);
369 if (patch_idx < 0) {
370 Kokkos::abort("The evaluation coordinate has to be on a patch."
371 "No extrapolation rule for derivatives. \n");
372 }
373 return recursive_dispatch_patch_function<
375 eval_deriv_type>(coord_eval, patches_splines, patch_idx);
376 ;
377 }
378
379
396 template <class InterestDim, class Dim1, class Dim2>
397 KOKKOS_FUNCTION double deriv(
398 Coord<Dim1, Dim2> const& coord_eval,
399 MultipatchSplineCoeff const& patches_splines) const
400 {
401 static_assert((std::is_same_v<InterestDim, Dim1>) || (std::is_same_v<InterestDim, Dim2>));
402 if constexpr (std::is_same_v<InterestDim, Dim1>) {
403 return deriv_dim_1(coord_eval, patches_splines);
404 } else if constexpr (std::is_same_v<InterestDim, Dim2>) {
405 return deriv_dim_2(coord_eval, patches_splines);
406 }
407 }
408
423 MultipatchValues const& patches_deriv_1,
424 MultipatchCoordField const& patches_coords,
425 MultipatchSplineCoeff const& patches_splines) const
426 {
427 (apply_evaluator<eval_deriv_type, eval_type, Patches>(
428 patches_deriv_1.template get<Patches>(),
429 patches_coords.template get<Patches>(),
430 patches_splines),
431 ...);
432 }
433
448 MultipatchValues const& patches_deriv_2,
449 MultipatchCoordField const& patches_coords,
450 MultipatchSplineCoeff const& patches_splines) const
451 {
452 (apply_evaluator<eval_type, eval_deriv_type, Patches>(
453 patches_deriv_2.template get<Patches>(),
454 patches_coords.template get<Patches>(),
455 patches_splines),
456 ...);
457 }
458
471 MultipatchValues const& patches_deriv_12,
472 MultipatchCoordField const& patches_coords,
473 MultipatchSplineCoeff const& patches_splines) const
474 {
475 (apply_evaluator<eval_deriv_type, eval_deriv_type, Patches>(
476 patches_deriv_12.template get<Patches>(),
477 patches_coords.template get<Patches>(),
478 patches_splines),
479 ...);
480 }
481
482
483 // Integrate operator ------------------------------------------------------------------------
492 DKokkosView_h<n_patches> const& integrals,
493 MultipatchSplineCoeff const& patches_splines) const
494 {
495 (apply_integrate<Patches>(
496 integrals(ddc::type_seq_rank_v<Patches, PatchOrdering>),
497 patches_splines.template get<Patches>()),
498 ...);
499 }
500
501
502public:
503 // Apply functions to manage the values on each patch. ---------------------------------------
504
518 template <class EvalType1, class EvalType2, class StoringPatch>
520 ValuesOnPatch<StoringPatch> const& patch_values,
521 CoordConstFieldOnPatch<StoringPatch> const& patch_coords,
522 MultipatchSplineCoeff const patches_splines) const
523 {
524 assert(get_idx_range(patch_values) == get_idx_range(patch_coords));
525
526 using Index =
528 batched_evaluation_idx_range_type<StoringPatch> idx_range = get_idx_range(patch_values);
529
530 ddc::parallel_for_each(
531 exec_space(),
532 idx_range,
533 KOKKOS_CLASS_LAMBDA(Index const& idx) {
534 CoordOnPatch<StoringPatch> const coord = patch_coords(idx);
535 int const patch_idx = get_patch_idx(coord);
536 if (patch_idx < 0
537 && !((std::is_same_v<EvalType1, eval_type>)&&(
538 std::is_same_v<EvalType2, eval_type>))) {
539 Kokkos::abort("The evaluation coordinate has to be on a patch."
540 "No extrapolation rule for derivatives. \n");
541 }
542 patch_values(idx) = recursive_dispatch_patch_function<
543 EvalType1,
544 EvalType2>(coord, patches_splines, patch_idx);
545 });
546 }
547
553 template <class Patch>
554 void apply_integrate(double& integral, SplineCoeffOnPatch<Patch> const& spline_coef) const
555 {
556 static_assert(
557 std::is_same_v<exec_space, Kokkos::DefaultHostExecutionSpace>,
558 "Can only be called on CPU: .integrals() not defined yet on GPU.");
559 static_assert(
560 Kokkos::SpaceAccessibility<exec_space, memory_space>::accessible,
561 "Execution space and memory space have to be compatible.");
562
563 using bsplines_1 = bsplines_type1<Patch>;
564 using bsplines_2 = bsplines_type2<Patch>;
566
567 DFieldMem<IdxRange<bsplines_1>, memory_space> values1_alloc(
568 get_idx_range<bsplines_1>(spline_coef));
569 DField<IdxRange<bsplines_1>, memory_space> values1 = get_field(values1_alloc);
570 DFieldMem<IdxRange<bsplines_2>, memory_space> values2_alloc(
571 get_idx_range<bsplines_2>(spline_coef));
572 DField<IdxRange<bsplines_2>, memory_space> values2 = get_field(values2_alloc);
573 ddc::integrals(exec_space(), values1);
574 ddc::integrals(exec_space(), values2);
575
576 integral = ddc::parallel_transform_reduce(
577 exec_space(),
578 get_idx_range(spline_coef),
579 0.0,
580 ddc::reducer::sum<double>(),
581 KOKKOS_LAMBDA(IdxBS12 const i12) {
582 return spline_coef(i12) * values1(ddc::select<bsplines_1>(i12))
583 * values2(ddc::select<bsplines_2>(i12));
584 });
585 }
586
587
588
589private:
590 // Recursive method to dispatch the coordinates on the right patch ---------------------------
591
593 template <class EvalType1, class EvalType2, class Dim1, class Dim2, int TestPatchIdx = 0>
594 KOKKOS_INLINE_FUNCTION double recursive_dispatch_patch_function(
595 Coord<Dim1, Dim2> coord,
596 MultipatchSplineCoeff const& patches_splines,
597 int const patch_idx) const
598 {
599 if constexpr (TestPatchIdx == ddc::type_seq_size_v<PatchOrdering>) {
600 if (patch_idx >= 0) {
601 Kokkos::abort("The recursion has reached the end without finding where "
602 "the coordinate is physically located.");
603 }
604 // Coord not on patch. Stop recursing.
605 if constexpr (
606 std::is_same_v<EvalType1, eval_type> && std::is_same_v<EvalType2, eval_type>) {
607 /* The operator currently works only for the case where the continuous
608 dimensions of all the patches are the same. So the equivalent coordinates
609 are the same on any patches.
610 Add a method to determine the patch from continuous dimensions, once
611 we would like to deal with other cases.
612 */
613 using AnyPatch = ddc::type_seq_element_t<0, PatchOrdering>;
614 replace_periodic_coord_inside<AnyPatch>(coord);
615 return m_extrapolation_rule(coord, patches_splines, patch_idx);
616 } else {
617 Kokkos::abort("The spline derivatives cannot be evaluated at coordinates "
618 "outside of the domain.");
619 }
620 } else {
621 if (patch_idx == TestPatchIdx) {
622 using TestPatch = ddc::type_seq_element_t<TestPatchIdx, PatchOrdering>;
623 CoordOnPatch<TestPatch> test_coord = get_equivalent_coord<
624 typename TestPatch::Dim1,
625 typename TestPatch::Dim2,
626 Dim1,
627 Dim2>(coord);
628 replace_periodic_coord_inside<TestPatch>(test_coord);
629
630 SplineCoeffOnPatch<TestPatch> const test_spline
631 = patches_splines.template get<TestPatch>();
632 return eval_no_bc<EvalType1, EvalType2, TestPatch>(test_coord, test_spline);
633 } else {
634 return recursive_dispatch_patch_function<
635 EvalType1,
636 EvalType2,
637 Dim1,
638 Dim2,
639 TestPatchIdx + 1>(coord, patches_splines, patch_idx);
640 }
641 }
642 }
643
644
645 // Useful functions --------------------------------------------------------------------------
646
649 template <class Dim1, class Dim2>
650 KOKKOS_INLINE_FUNCTION int get_patch_idx(Coord<Dim1, Dim2> const coord) const
651 {
652 using Mapping = typename PatchLocator::template get_mapping_on_logical_dim_t<Dim1, Dim2>;
653 Mapping const mapping(m_patch_locator.template get_mapping_on_logical_dim<Dim1, Dim2>());
654 return m_patch_locator(mapping(coord));
655 }
656
659 template <class TargetDim1, class TargetDim2, class CurrentDim1, class CurrentDim2>
660 KOKKOS_INLINE_FUNCTION Coord<TargetDim1, TargetDim2> get_equivalent_coord(
661 Coord<CurrentDim1, CurrentDim2> const& current_coord) const
662 {
663 if constexpr (std::is_same_v<
664 Coord<TargetDim1, TargetDim2>,
665 Coord<CurrentDim1, CurrentDim2>>) {
666 return current_coord;
667 } else {
668 using CurrentMapping = typename PatchLocator::
669 template get_mapping_on_logical_dim_t<CurrentDim1, CurrentDim2>;
670 using TargetMapping = typename PatchLocator::
671 template get_mapping_on_logical_dim_t<TargetDim1, TargetDim2>;
672
673 static_assert(is_curvilinear_2d_mapping_v<CurrentMapping>);
674 static_assert((std::is_same_v<
675 Coord<typename CurrentMapping::curvilinear_tag_r,
676 typename CurrentMapping::curvilinear_tag_theta>,
677 Coord<CurrentDim1, CurrentDim2>>));
678 static_assert(is_curvilinear_2d_mapping_v<TargetMapping>);
679 static_assert((std::is_same_v<
680 Coord<typename TargetMapping::curvilinear_tag_r,
681 typename TargetMapping::curvilinear_tag_theta>,
682 Coord<TargetDim1, TargetDim2>>));
683
684 CurrentMapping const current_mapping(
685 m_patch_locator
686 .template get_mapping_on_logical_dim<CurrentDim1, CurrentDim2>());
687 TargetMapping const target_mapping(
688 m_patch_locator.template get_mapping_on_logical_dim<TargetDim1, TargetDim2>());
689
690 return target_mapping(current_mapping(current_coord));
691 }
692 }
693
695 template <class Patch>
696 KOKKOS_INLINE_FUNCTION void replace_periodic_coord_inside(CoordOnPatch<Patch>& coord) const
697 {
698 using bsplines_1 = bsplines_type1<Patch>;
699 using bsplines_2 = bsplines_type2<Patch>;
700
701 using Dim1 = continuous_dimension_type1<Patch>;
702 using Dim2 = continuous_dimension_type2<Patch>;
703
704 Coord<Dim1> coord_1(coord);
705 Coord<Dim2> coord_2(coord);
706
707 ddcHelper::restrict_to_bspline_domain<bsplines_1>(coord_1);
708 ddcHelper::restrict_to_bspline_domain<bsplines_2>(coord_2);
709
710 coord = CoordOnPatch<Patch>(coord_1, coord_2);
711 }
712
713
714 // Evaluation functions ----------------------------------------------------------------------
715
718 template <class EvalType1, class EvalType2, class Patch, class Layout>
719 KOKKOS_INLINE_FUNCTION double eval_no_bc(
720 CoordOnPatch<Patch> const& coord_eval,
721 DConstField<spline_idx_range_type<Patch>, memory_space, Layout> const& spline_coef)
722 const
723 {
724 static_assert(
725 std::is_same_v<EvalType1, eval_type> || std::is_same_v<EvalType1, eval_deriv_type>);
726 static_assert(
727 std::is_same_v<EvalType2, eval_type> || std::is_same_v<EvalType2, eval_deriv_type>);
728
729 using bsplines_1 = bsplines_type1<Patch>;
730 using bsplines_2 = bsplines_type2<Patch>;
731
732 Idx<bsplines_1> jmin1;
733 Idx<bsplines_2> jmin2;
734
735 std::array<double, bsplines_1::degree() + 1> vals1_ptr;
736 DSpan1D const vals1(vals1_ptr.data(), bsplines_1::degree() + 1);
737 std::array<double, bsplines_2::degree() + 1> vals2_ptr;
738 DSpan1D const vals2(vals2_ptr.data(), bsplines_2::degree() + 1);
739
740 Coord<continuous_dimension_type1<Patch>> coord_eval_interest1
741 = ddc::select<continuous_dimension_type1<Patch>>(coord_eval);
742 Coord<continuous_dimension_type2<Patch>> coord_eval_interest2
743 = ddc::select<continuous_dimension_type2<Patch>>(coord_eval);
744
745 if constexpr (std::is_same_v<EvalType1, eval_type>) {
746 jmin1 = ddc::discrete_space<bsplines_1>().eval_basis(vals1, coord_eval_interest1);
747 } else if constexpr (std::is_same_v<EvalType1, eval_deriv_type>) {
748 jmin1 = ddc::discrete_space<bsplines_1>().eval_deriv(vals1, coord_eval_interest1);
749 }
750
751 if constexpr (std::is_same_v<EvalType2, eval_type>) {
752 jmin2 = ddc::discrete_space<bsplines_2>().eval_basis(vals2, coord_eval_interest2);
753 } else if constexpr (std::is_same_v<EvalType2, eval_deriv_type>) {
754 jmin2 = ddc::discrete_space<bsplines_2>().eval_deriv(vals2, coord_eval_interest2);
755 }
756
757 double y = 0.0;
758 for (std::size_t i = 0; i < bsplines_1::degree() + 1; ++i) {
759 for (std::size_t j = 0; j < bsplines_2::degree() + 1; ++j) {
760 y += spline_coef(jmin1 + i, jmin2 + j) * vals1[i] * vals2[j];
761 }
762 }
763 return y;
764 }
765};
A class to store field objects on patches.
Definition multipatch_field.hpp:30
A class to evaluate all the splines of all the patches at once.
Definition multipatch_spline_evaluator_2d.hpp:68
typename BSpline2OnPatch< Patch >::continuous_dimension_type continuous_dimension_type2
The type of the second evaluation continuous dimension used by this class.
Definition multipatch_spline_evaluator_2d.hpp:88
KOKKOS_FUNCTION double deriv_dim_1(Coord const &coord_eval, MultipatchSplineCoeff const &patches_splines) const
Differentiate 2D splines (described by their spline coefficients) at a given coordinate along first d...
Definition multipatch_spline_evaluator_2d.hpp:305
void apply_integrate(double &integral, SplineCoeffOnPatch< Patch > const &spline_coef) const
Integrate the spline defined on the given patch.
Definition multipatch_spline_evaluator_2d.hpp:554
MultipatchSplineEvaluator2D(PatchLocator const &patch_locator, ExtrapolationRule const &extrapolation_rule)
Instantiate a MultipatchSplineEvaluator2D.
Definition multipatch_spline_evaluator_2d.hpp:228
void deriv_dim_2(MultipatchValues const &patches_deriv_2, MultipatchCoordField const &patches_coords, MultipatchSplineCoeff const &patches_splines) const
Differentiate 2D splines (described by their spline coefficients) on a meshes along second dimension ...
Definition multipatch_spline_evaluator_2d.hpp:447
void deriv_1_and_2(MultipatchValues const &patches_deriv_12, MultipatchCoordField const &patches_coords, MultipatchSplineCoeff const &patches_splines) const
Cross-differentiate 2D splines (described by their spline coefficients) on a meshes.
Definition multipatch_spline_evaluator_2d.hpp:470
IdxRange< bsplines_type1< Patch >, bsplines_type2< Patch > > spline_idx_range_type
The type of the 2D spline domain corresponding to the dimensions of interest.
Definition multipatch_spline_evaluator_2d.hpp:156
KOKKOS_FUNCTION double deriv(Coord< Dim1, Dim2 > const &coord_eval, MultipatchSplineCoeff const &patches_splines) const
Differentiate 2D splines (described by their spline coefficients) at a given coordinate along a speci...
Definition multipatch_spline_evaluator_2d.hpp:397
ExecSpace exec_space
The type of the Kokkos execution space used by this class.
Definition multipatch_spline_evaluator_2d.hpp:92
Grid1OnPatch< Patch > evaluation_discrete_dimension_type1
The type of the first discrete dimension of interest used by this class.
Definition multipatch_spline_evaluator_2d.hpp:101
void apply_evaluator(ValuesOnPatch< StoringPatch > const &patch_values, CoordConstFieldOnPatch< StoringPatch > const &patch_coords, MultipatchSplineCoeff const patches_splines) const
Compute the values or the derivatives of a given patch at the coordinates defined on the given patch.
Definition multipatch_spline_evaluator_2d.hpp:519
void deriv_dim_1(MultipatchValues const &patches_deriv_1, MultipatchCoordField const &patches_coords, MultipatchSplineCoeff const &patches_splines) const
Differentiate 2D splines (described by their spline coefficients) on a meshes along first dimension o...
Definition multipatch_spline_evaluator_2d.hpp:422
KOKKOS_FUNCTION double deriv_1_and_2(Coord const &coord_eval, MultipatchSplineCoeff const &patches_splines) const
Cross-differentiate 2D splines (described by their spline coefficients) at a given coordinate.
Definition multipatch_spline_evaluator_2d.hpp:364
KOKKOS_FUNCTION double deriv_dim_2(Coord const &coord_eval, MultipatchSplineCoeff const &patches_splines) const
Differentiate 2D splines (described by their spline coefficients) at a given coordinate along second ...
Definition multipatch_spline_evaluator_2d.hpp:335
Grid2OnPatch< Patch > evaluation_discrete_dimension_type2
The type of the second discrete dimension of interest used by this class.
Definition multipatch_spline_evaluator_2d.hpp:106
void integrate(DKokkosView_h< n_patches > const &integrals, MultipatchSplineCoeff const &patches_splines) const
Integration of splines (described by their spline coefficients).
Definition multipatch_spline_evaluator_2d.hpp:491
KOKKOS_FUNCTION double operator()(Coord const coord_eval, MultipatchSplineCoeff const &patches_splines) const
Evaluate the 2D splines (described by their spline coefficients) at a given coordinate.
Definition multipatch_spline_evaluator_2d.hpp:254
IdxRange< bsplines_type1< Patch > > spline_idx_range_type1
The type of the 1D spline domain corresponding to the first dimension of interest.
Definition multipatch_spline_evaluator_2d.hpp:146
typename ValuesOnPatch< Patch >::discrete_domain_type batched_evaluation_idx_range_type
The type of the whole domain representing evaluation points.
Definition multipatch_spline_evaluator_2d.hpp:140
IdxRange< evaluation_discrete_dimension_type2< Patch > > evaluation_idx_range_type2
The type of the domain for the 1D evaluation mesh along second dimension used by this class.
Definition multipatch_spline_evaluator_2d.hpp:127
IdxRange< evaluation_discrete_dimension_type1< Patch >, evaluation_discrete_dimension_type2< Patch > > evaluation_idx_range_type
The type of the domain for the 2D evaluation mesh used by this class.
Definition multipatch_spline_evaluator_2d.hpp:134
BSpline2OnPatch< Patch > bsplines_type2
The discrete dimension representing the B-splines along second dimension.
Definition multipatch_spline_evaluator_2d.hpp:116
MemorySpace memory_space
The type of the Kokkos memory space used by this class.
Definition multipatch_spline_evaluator_2d.hpp:95
DConstField< spline_idx_range_type< Patch >, MemorySpace > SplineCoeffOnPatch
Type for MultipatchType: A field of 2D spline coefficients for a non-batched spline defined on both o...
Definition multipatch_spline_evaluator_2d.hpp:177
void operator()(MultipatchValues const &patches_values, MultipatchCoordField const &patches_coords, MultipatchSplineCoeff const &patches_splines) const
Evaluate 2D splines (described by their spline coefficients) on meshes.
Definition multipatch_spline_evaluator_2d.hpp:274
IdxRange< evaluation_discrete_dimension_type1< Patch > > evaluation_idx_range_type1
The type of the domain for the 1D evaluation mesh along first dimension used by this class.
Definition multipatch_spline_evaluator_2d.hpp:122
typename BSpline1OnPatch< Patch >::continuous_dimension_type continuous_dimension_type1
The type of the first evaluation continuous dimension used by this class.
Definition multipatch_spline_evaluator_2d.hpp:83
IdxRange< bsplines_type2< Patch > > spline_idx_range_type2
The type of the 1D spline domain corresponding to the second dimension of interest.
Definition multipatch_spline_evaluator_2d.hpp:151
BSpline1OnPatch< Patch > bsplines_type1
The discrete dimension representing the B-splines along first dimension.
Definition multipatch_spline_evaluator_2d.hpp:111
static constexpr std::size_t n_patches
The number of patches.
Definition multipatch_spline_evaluator_2d.hpp:190
Tag to indicate that derivative of the spline should be evaluated.
Definition multipatch_spline_evaluator_2d.hpp:77
Tag to indicate that the value of the spline should be evaluated.
Definition multipatch_spline_evaluator_2d.hpp:72
Patch locator specialised for "onion" geometry.
Definition onion_patch_locator.hpp:49