4 #include <ddc/kernels/splines.hpp>
6 #include <sll/polar_bsplines.hpp>
8 #include "ddc_alias_inline_functions.hpp"
9 #include "ddc_aliases.hpp"
10 #include "ddc_helper.hpp"
11 #include "directional_tag.hpp"
12 #include "vector_field.hpp"
13 #include "vector_field_mem.hpp"
74 using CoordR = Coord<R>;
75 using CoordTheta = Coord<Theta>;
76 using CoordRTheta = Coord<R, Theta>;
78 using CoordVr = Coord<Vr>;
79 using CoordVtheta = Coord<Vtheta>;
82 int constexpr BSDegreeR = 3;
83 int constexpr BSDegreeP = 3;
85 bool constexpr BsplineOnUniformCellsR =
false;
86 bool constexpr BsplineOnUniformCellsP =
false;
90 BsplineOnUniformCellsR,
91 ddc::UniformBSplines<R, BSDegreeR>,
92 ddc::NonUniformBSplines<R, BSDegreeR>>
97 BsplineOnUniformCellsP,
98 ddc::UniformBSplines<Theta, BSDegreeP>,
99 ddc::NonUniformBSplines<Theta, BSDegreeP>>
106 ddc::BoundCond constexpr SplineRBoundary = ddc::BoundCond::GREVILLE;
107 ddc::BoundCond constexpr SplinePBoundary = ddc::BoundCond::PERIODIC;
109 using SplineInterpPointsR
110 = ddc::GrevilleInterpolationPoints<BSplinesR, SplineRBoundary, SplineRBoundary>;
111 using SplineInterpPointsTheta
112 = ddc::GrevilleInterpolationPoints<BSplinesTheta, SplinePBoundary, SplinePBoundary>;
115 struct GridR : SplineInterpPointsR::interpolation_discrete_dimension_type
118 struct GridTheta : SplineInterpPointsTheta::interpolation_discrete_dimension_type
123 using SplineRThetaBuilder = ddc::SplineBuilder2D<
124 Kokkos::DefaultHostExecutionSpace,
134 ddc::SplineSolver::LAPACK,
138 using SplineRThetaEvaluatorConstBound = ddc::SplineEvaluator2D<
139 Kokkos::DefaultHostExecutionSpace,
145 ddc::ConstantExtrapolationRule<R, Theta>,
146 ddc::ConstantExtrapolationRule<R, Theta>,
147 ddc::PeriodicExtrapolationRule<Theta>,
148 ddc::PeriodicExtrapolationRule<Theta>,
152 using SplineRThetaEvaluatorNullBound = ddc::SplineEvaluator2D<
153 Kokkos::DefaultHostExecutionSpace,
159 ddc::NullExtrapolationRule,
160 ddc::NullExtrapolationRule,
161 ddc::PeriodicExtrapolationRule<Theta>,
162 ddc::PeriodicExtrapolationRule<Theta>,
168 using IdxR = Idx<GridR>;
169 using IdxTheta = Idx<GridTheta>;
170 using IdxRTheta = Idx<GridR, GridTheta>;
173 using IdxStepR = IdxStep<GridR>;
174 using IdxStepTheta = IdxStep<GridTheta>;
175 using IdxStepRTheta = IdxStep<GridR, GridTheta>;
178 using IdxRangeR = IdxRange<GridR>;
179 using IdxRangeTheta = IdxRange<GridTheta>;
180 using IdxRangeRTheta = IdxRange<GridR, GridTheta>;
182 using IdxRangeBSR = IdxRange<BSplinesR>;
183 using IdxRangeBSTheta = IdxRange<BSplinesTheta>;
184 using IdxRangeBSRTheta = IdxRange<BSplinesR, BSplinesTheta>;
185 using IdxRangeBSPolar = IdxRange<PolarBSplinesRTheta>;
189 template <
class ElementType>
190 using FieldMemR = FieldMem<ElementType, IdxRangeR>;
192 template <
class ElementType>
193 using FieldMemTheta = FieldMem<ElementType, IdxRangeTheta>;
195 template <
class ElementType>
196 using FieldMemRTheta = FieldMem<ElementType, IdxRangeRTheta>;
198 using DFieldMemR = FieldMemR<double>;
199 using DFieldMemTheta = FieldMemTheta<double>;
200 using DFieldMemRTheta = FieldMemRTheta<double>;
203 template <
class ElementType>
204 using FieldR = Field<ElementType, IdxRangeR>;
206 template <
class ElementType>
207 using FieldTheta = Field<ElementType, IdxRangeTheta>;
210 template <
class ElementType>
211 using FieldRTheta = Field<ElementType, IdxRangeRTheta, Kokkos::HostSpace>;
213 using DFieldR = FieldR<double>;
214 using DFieldTheta = FieldTheta<double>;
215 using DFieldRTheta = FieldRTheta<double>;
218 template <
class ElementType>
219 using ConstFieldR = ConstField<ElementType, IdxRangeR>;
221 template <
class ElementType>
222 using ConstFieldTheta = ConstField<ElementType, IdxRangeTheta>;
224 template <
class ElementType>
225 using ConstFieldRTheta = ConstField<ElementType, IdxRangeRTheta>;
227 using DConstFieldR = ConstFieldR<double>;
228 using DConstFieldTheta = ConstFieldTheta<double>;
229 using DConstFieldRTheta = ConstFieldRTheta<double>;
232 using Spline2DMem = DFieldMem<IdxRangeBSRTheta>;
233 using Spline2D = DField<IdxRangeBSRTheta>;
234 using ConstSpline2D = DConstField<IdxRangeBSRTheta>;
246 using IdxPolarBspl = Idx<PolarBSplinesRTheta>;
250 template <
class Dim1,
class Dim2>
253 template <
class Dim1,
class Dim2>
256 template <
class Dim1,
class Dim2>
261 template <
class Dim1,
class Dim2>
264 template <
class Dim1,
class Dim2>
267 template <
class Dim1,
class Dim2>
321 using CoordX = Coord<X>;
322 using CoordY = Coord<Y>;
323 using CoordXY = Coord<X, Y>;
325 using CoordVx = Coord<Vx>;
326 using CoordVy = Coord<Vy>;
A class containing all information describing polar bsplines.
Definition: polar_bsplines.hpp:28
Pre-declaration of VectorFieldMem.
Definition: vector_field_mem.hpp:54
A class which holds multiple (scalar) fields in order to represent a vector field.
Definition: vector_field.hpp:64
Definition: geometry.hpp:93
Definition: geometry.hpp:100
Definition: geometry.hpp:116
Definition: geometry.hpp:119
Definition: geometry.hpp:103
A structure containing the two Chunks necessary to define a spline on a set of polar basis splines.
Definition: polar_spline.hpp:20
Define non periodic real R dimension.
Definition: geometry.hpp:31
static constexpr bool PERIODIC
Define periodicity of the dimension.
Definition: geometry.hpp:36
Define periodic real Theta dimension.
Definition: geometry.hpp:42
static constexpr bool PERIODIC
Define periodicity of the dimension.
Definition: geometry.hpp:47
Define non periodic real R velocity dimension.
Definition: geometry.hpp:54
static constexpr bool PERIODIC
Define periodicity of the dimension.
Definition: geometry.hpp:59
Define periodic real Theta velocity dimension.
Definition: geometry.hpp:65
static constexpr bool PERIODIC
Define periodicity of the dimension.
Definition: geometry.hpp:70
Define non periodic real X velocity dimension.
Definition: geometry.hpp:301
static constexpr bool PERIODIC
Define periodicity of the dimension.
Definition: geometry.hpp:306
Define non periodic real Y velocity dimension.
Definition: geometry.hpp:312
static constexpr bool PERIODIC
Define periodicity of the dimension.
Definition: geometry.hpp:317
Define non periodic real X dimension.
Definition: geometry.hpp:278
static constexpr bool PERIODIC
Define periodicity of the dimension.
Definition: geometry.hpp:283
Define non periodic real Y dimension.
Definition: geometry.hpp:289
static constexpr bool PERIODIC
Define periodicity of the dimension.
Definition: geometry.hpp:294