68 (((ddc::is_uniform_bsplines_v<BSpline1OnPatch<Patches>>)
69 || (ddc::is_non_uniform_bsplines_v<BSpline1OnPatch<Patches>>))
71 "The BSpline1OnPatch argument does not create 1D BSpline objects.");
73 (((ddc::is_uniform_bsplines_v<BSpline2OnPatch<Patches>>)
74 || (ddc::is_non_uniform_bsplines_v<BSpline2OnPatch<Patches>>))
76 "The BSpline2OnPatch argument does not create 1D BSpline objects.");
78 (((ddc::is_uniform_point_sampling_v<Grid1OnPatch<Patches>>)
79 || (ddc::is_non_uniform_point_sampling_v<Grid1OnPatch<Patches>>))
81 "The Grid1OnPatch argument does not create 1D Grid objects.");
83 (((ddc::is_uniform_point_sampling_v<Grid2OnPatch<Patches>>)
84 || (ddc::is_non_uniform_point_sampling_v<Grid2OnPatch<Patches>>))
86 "The Grid2OnPatch argument does not create 1D Grid objects.");
89 typename BSpline1OnPatch<Patches>::continuous_dimension_type,
90 typename Grid1OnPatch<Patches>::continuous_dimension_type>)&&...),
91 "The BSpline1OnPatch argument does not define bsplines on the dimension where the "
92 "grids defined by Grid1OnPatch are defined.");
95 typename BSpline2OnPatch<Patches>::continuous_dimension_type,
96 typename Grid2OnPatch<Patches>::continuous_dimension_type>)&&...),
97 "The BSpline2OnPatch argument does not define bsplines on the dimension where the "
98 "grids defined by Grid2OnPatch are defined.");
103 template <
class Patch,
class FieldType>
104 struct Build_BuilderType
107 !std::is_same_v<Patch, Patch>,
108 "The values should be saved in a constant field of doubles on the specified memory "
112 template <
class Patch,
class... Grid1D>
113 struct Build_BuilderType<
Patch, DConstField<IdxRange<Grid1D...>, MemorySpace>>
115 using lower_matching_edge1 = equivalent_edge_t<
117 typename Connectivity::interface_collection>;
118 using upper_matching_edge1 = equivalent_edge_t<
120 typename Connectivity::interface_collection>;
121 using lower_matching_edge2 = equivalent_edge_t<
123 typename Connectivity::interface_collection>;
124 using upper_matching_edge2 = equivalent_edge_t<
126 typename Connectivity::interface_collection>;
127 using type = ddc::SplineBuilder2D<
130 BSpline1OnPatch<Patch>,
131 BSpline2OnPatch<Patch>,
134 std::is_same_v<lower_matching_edge1, OutsideEdge> ? BcLower1 : BcTransition,
135 std::is_same_v<upper_matching_edge1, OutsideEdge> ? BcUpper1 : BcTransition,
136 std::is_same_v<lower_matching_edge2, OutsideEdge> ? BcLower2 : BcTransition,
137 std::is_same_v<upper_matching_edge2, OutsideEdge> ? BcUpper2 : BcTransition,
143 template <
class Patch>
144 using BuilderOnPatch =
typename Build_BuilderType<Patch, ValuesOnPatch<Patch>>::type;
147 template <
class Patch>
149 = DField<typename BuilderOnPatch<Patch>::batched_spline_domain_type, MemorySpace>;
152 template <
class Patch>
154 = DConstField<typename BuilderOnPatch<Patch>::batched_derivs_domain_type1, MemorySpace>;
157 template <
class Patch>
159 = DConstField<typename BuilderOnPatch<Patch>::batched_derivs_domain_type2, MemorySpace>;
162 template <
class Patch>
163 using Derivs12OnPatch
164 = DConstField<typename BuilderOnPatch<Patch>::batched_derivs_domain_type, MemorySpace>;
180 using BuilderTuple = std::tuple<BuilderOnPatch<Patches>
const&...>;
183 BuilderTuple
const m_builders;
186 template <
class Patch,
template <
typename P>
typename DerivTypeOnPatch>
187 std::optional<DerivTypeOnPatch<Patch>> get_deriv_value(
190 if (derivs.has_value()) {
191 return derivs->template get<Patch>();
208 : m_builders(std::tie(builders...)) {};
243 std::optional<MultipatchDerivs1> derivs_min1 = std::nullopt,
244 std::optional<MultipatchDerivs1> derivs_max1 = std::nullopt,
245 std::optional<MultipatchDerivs2> derivs_min2 = std::nullopt,
246 std::optional<MultipatchDerivs2> derivs_max2 = std::nullopt,
247 std::optional<MultipatchDerivs12> mixed_derivs_min1_min2 = std::nullopt,
248 std::optional<MultipatchDerivs12> mixed_derivs_max1_min2 = std::nullopt,
249 std::optional<MultipatchDerivs12> mixed_derivs_min1_max2 = std::nullopt,
250 std::optional<MultipatchDerivs12> mixed_derivs_max1_max2 = std::nullopt)
const
252 ((std::get<BuilderOnPatch<Patches>
const&>(m_builders)(
253 splines.template get<Patches>(),
254 get_const_field(values.template get<Patches>()),
255 get_deriv_value<Patches, Derivs1OnPatch>(derivs_min1),
256 get_deriv_value<Patches, Derivs1OnPatch>(derivs_max1),
257 get_deriv_value<Patches, Derivs2OnPatch>(derivs_min2),
258 get_deriv_value<Patches, Derivs2OnPatch>(derivs_max2),
259 get_deriv_value<Patches, Derivs12OnPatch>(mixed_derivs_min1_min2),
260 get_deriv_value<Patches, Derivs12OnPatch>(mixed_derivs_max1_min2),
261 get_deriv_value<Patches, Derivs12OnPatch>(mixed_derivs_min1_max2),
262 get_deriv_value<Patches, Derivs12OnPatch>(mixed_derivs_max1_max2))),
void operator()(MultipatchSplineCoeffs splines, MultipatchValues const &values, std::optional< MultipatchDerivs1 > derivs_min1=std::nullopt, std::optional< MultipatchDerivs1 > derivs_max1=std::nullopt, std::optional< MultipatchDerivs2 > derivs_min2=std::nullopt, std::optional< MultipatchDerivs2 > derivs_max2=std::nullopt, std::optional< MultipatchDerivs12 > mixed_derivs_min1_min2=std::nullopt, std::optional< MultipatchDerivs12 > mixed_derivs_max1_min2=std::nullopt, std::optional< MultipatchDerivs12 > mixed_derivs_min1_max2=std::nullopt, std::optional< MultipatchDerivs12 > mixed_derivs_max1_max2=std::nullopt) const
Build the spline representation of each given function.
Definition multipatch_spline_builder_2d.hpp:240