5#include <ddc/kernels/splines.hpp>
7#include "ddc_alias_inline_functions.hpp"
8#include "ddc_aliases.hpp"
9#include "ddc_helper.hpp"
10#include "species_info.hpp"
20 static bool constexpr PERIODIC =
true;
31 static bool constexpr PERIODIC =
true;
42 static bool constexpr PERIODIC =
false;
53 static bool constexpr PERIODIC =
false;
56using CoordX = Coord<X>;
57using CoordY = Coord<Y>;
58using CoordXY = Coord<X, Y>;
60using CoordVx = Coord<Vx>;
61using CoordVy = Coord<Vy>;
63int constexpr BSDegreeX = 3;
64int constexpr BSDegreeY = 3;
66int constexpr BSDegreeVx = 3;
67int constexpr BSDegreeVy = 3;
69bool constexpr BsplineOnUniformCellsX =
true;
70bool constexpr BsplineOnUniformCellsY =
true;
72bool constexpr BsplineOnUniformCellsVx =
true;
73bool constexpr BsplineOnUniformCellsVy =
true;
77 BsplineOnUniformCellsX,
78 ddc::UniformBSplines<X, BSDegreeX>,
79 ddc::NonUniformBSplines<X, BSDegreeX>>
84 BsplineOnUniformCellsY,
85 ddc::UniformBSplines<Y, BSDegreeY>,
86 ddc::NonUniformBSplines<Y, BSDegreeY>>
92 BsplineOnUniformCellsVx,
93 ddc::UniformBSplines<Vx, BSDegreeVx>,
94 ddc::NonUniformBSplines<Vx, BSDegreeVx>>
99 BsplineOnUniformCellsVy,
100 ddc::UniformBSplines<Vy, BSDegreeVy>,
101 ddc::NonUniformBSplines<Vy, BSDegreeVy>>
105ddc::BoundCond
constexpr SplineXBoundary = ddc::BoundCond::PERIODIC;
106ddc::BoundCond
constexpr SplineYBoundary = ddc::BoundCond::PERIODIC;
107ddc::BoundCond
constexpr SplineVxBoundary = ddc::BoundCond::HERMITE;
108ddc::BoundCond
constexpr SplineVyBoundary = ddc::BoundCond::HERMITE;
111using SplineInterpPointsX
112 = ddc::GrevilleInterpolationPoints<BSplinesX, SplineXBoundary, SplineXBoundary>;
113using SplineInterpPointsY
114 = ddc::GrevilleInterpolationPoints<BSplinesY, SplineYBoundary, SplineYBoundary>;
115using SplineInterpPointsVx
116 = ddc::GrevilleInterpolationPoints<BSplinesVx, SplineVxBoundary, SplineVxBoundary>;
117using SplineInterpPointsVy
118 = ddc::GrevilleInterpolationPoints<BSplinesVy, SplineVyBoundary, SplineVyBoundary>;
121struct GridX : SplineInterpPointsX::interpolation_discrete_dimension_type
124struct GridY : SplineInterpPointsY::interpolation_discrete_dimension_type
127struct GridVx : SplineInterpPointsVx::interpolation_discrete_dimension_type
130struct GridVy : SplineInterpPointsVy::interpolation_discrete_dimension_type
135using SplineXBuilder = ddc::SplineBuilder<
136 Kokkos::DefaultExecutionSpace,
137 Kokkos::DefaultExecutionSpace::memory_space,
142 ddc::SplineSolver::LAPACK,
147using SplineXEvaluator = ddc::SplineEvaluator<
148 Kokkos::DefaultExecutionSpace,
149 Kokkos::DefaultExecutionSpace::memory_space,
152 ddc::PeriodicExtrapolationRule<X>,
153 ddc::PeriodicExtrapolationRule<X>,
158using SplineYBuilder = ddc::SplineBuilder<
159 Kokkos::DefaultExecutionSpace,
160 Kokkos::DefaultExecutionSpace::memory_space,
165 ddc::SplineSolver::LAPACK,
170using SplineYEvaluator = ddc::SplineEvaluator<
171 Kokkos::DefaultExecutionSpace,
172 Kokkos::DefaultExecutionSpace::memory_space,
175 ddc::PeriodicExtrapolationRule<Y>,
176 ddc::PeriodicExtrapolationRule<Y>,
181using SplineVxBuilder = ddc::SplineBuilder<
182 Kokkos::DefaultExecutionSpace,
183 Kokkos::DefaultExecutionSpace::memory_space,
188 ddc::SplineSolver::LAPACK,
193using SplineVxEvaluator = ddc::SplineEvaluator<
194 Kokkos::DefaultExecutionSpace,
195 Kokkos::DefaultExecutionSpace::memory_space,
198 ddc::ConstantExtrapolationRule<Vx>,
199 ddc::ConstantExtrapolationRule<Vx>,
204using SplineVyBuilder = ddc::SplineBuilder<
205 Kokkos::DefaultExecutionSpace,
206 Kokkos::DefaultExecutionSpace::memory_space,
211 ddc::SplineSolver::LAPACK,
216using SplineVyEvaluator = ddc::SplineEvaluator<
217 Kokkos::DefaultExecutionSpace,
218 Kokkos::DefaultExecutionSpace::memory_space,
221 ddc::ConstantExtrapolationRule<Vy>,
222 ddc::ConstantExtrapolationRule<Vy>,
228using IdxRangeBSX = IdxRange<BSplinesX>;
229using IdxRangeBSY = IdxRange<BSplinesY>;
230using IdxRangeBSXY = IdxRange<BSplinesX, BSplinesY>;
231using IdxRangeBSVx = IdxRange<BSplinesVx>;
232using IdxRangeBSVy = IdxRange<BSplinesVy>;
233using IdxRangeBSVxVy = IdxRange<BSplinesVx, BSplinesVy>;
235template <
class ElementType>
236using BSConstFieldXY = Field<ElementType const, IdxRangeBSXY>;
237using DBSConstFieldXY = BSConstFieldXY<double>;
240using IdxX = Idx<GridX>;
241using IdxY = Idx<GridY>;
242using IdxXY = Idx<GridX, GridY>;
243using IdxVx = Idx<GridVx>;
244using IdxVy = Idx<GridVy>;
245using IdxVxVy = Idx<GridVx, GridVy>;
246using IdxXYVxVy = Idx<GridX, GridY, GridVx, GridVy>;
247using IdxSpXYVxVy = Idx<Species, GridX, GridY, GridVx, GridVy>;
250using IdxStepX = IdxStep<GridX>;
251using IdxStepY = IdxStep<GridY>;
252using IdxStepVx = IdxStep<GridVx>;
253using IdxStepVy = IdxStep<GridVy>;
256using IdxRangeX = IdxRange<GridX>;
257using IdxRangeY = IdxRange<GridY>;
258using IdxRangeXY = IdxRange<GridX, GridY>;
259using IdxRangeVx = IdxRange<GridVx>;
260using IdxRangeVy = IdxRange<GridVy>;
261using IdxRangeXYVxVy = IdxRange<GridX, GridY, GridVx, GridVy>;
262using IdxRangeVxVy = IdxRange<GridVx, GridVy>;
263using IdxRangeSpVxVy = IdxRange<Species, GridVx, GridVy>;
264using IdxRangeSpXYVxVy = IdxRange<Species, GridX, GridY, GridVx, GridVy>;
266template <
class ElementType>
267using FieldMemX = FieldMem<ElementType, IdxRangeX>;
268using DFieldMemX = FieldMemX<double>;
270template <
class ElementType>
271using FieldMemY = FieldMem<ElementType, IdxRangeY>;
272using DFieldMemY = FieldMemY<double>;
274template <
class ElementType>
275using FieldMemXY = FieldMem<ElementType, IdxRangeXY>;
276using DFieldMemXY = FieldMemXY<double>;
278template <
class ElementType>
279using FieldMemVx = FieldMem<ElementType, IdxRangeVx>;
281template <
class ElementType>
282using FieldMemVy = FieldMem<ElementType, IdxRangeVy>;
284template <
class ElementType>
285using FieldMemVxVy = FieldMem<ElementType, IdxRangeVxVy>;
286using DFieldMemVxVy = FieldMemVxVy<double>;
288template <
class ElementType>
289using FieldMemXYVxVy = FieldMem<ElementType, IdxRangeXYVxVy>;
290using DFieldMemXYVxVy = FieldMemXYVxVy<double>;
292template <
class ElementType>
293using FieldMemSpVxVy = FieldMem<ElementType, IdxRangeSpVxVy>;
294using DFieldMemSpVxVy = FieldMemSpVxVy<double>;
296template <
class ElementType>
297using FieldMemSpXYVxVy = FieldMem<ElementType, IdxRangeSpXYVxVy>;
298using DFieldMemSpXYVxVy = FieldMemSpXYVxVy<double>;
301template <
class ElementType>
302using FieldX = Field<ElementType, IdxRangeX>;
303using DFieldX = FieldX<double>;
305template <
class ElementType>
306using FieldY = Field<ElementType, IdxRangeY>;
307using DFieldY = FieldY<double>;
309template <
class ElementType>
310using FieldXY = Field<ElementType, IdxRangeXY>;
311using DFieldXY = FieldXY<double>;
313template <
class ElementType>
314using FieldVx = Field<ElementType, IdxRangeVx>;
315using DFieldVx = FieldVx<double>;
317template <
class ElementType>
318using FieldVy = Field<ElementType, IdxRangeVy>;
319using DFieldVy = FieldVy<double>;
321template <
class ElementType>
322using FieldVxVy = Field<ElementType, IdxRangeVxVy>;
323using DFieldVxVy = FieldVxVy<double>;
325template <
class ElementType>
326using FieldSpVxVy = Field<ElementType, IdxRangeSpVxVy>;
327using DFieldSpVxVy = FieldSpVxVy<double>;
329template <
class ElementType>
330using FieldSpXYVxVy = Field<ElementType, IdxRangeSpXYVxVy>;
331using DFieldSpXYVxVy = FieldSpXYVxVy<double>;
334template <
class ElementType>
335using ConstFieldX = Field<ElementType const, IdxRangeX>;
337template <
class ElementType>
338using ConstFieldY = Field<ElementType const, IdxRangeY>;
340template <
class ElementType>
341using ConstFieldXY = Field<ElementType const, IdxRangeXY>;
342using DConstFieldXY = ConstFieldXY<double>;
344template <
class ElementType>
345using ConstFieldVx = Field<ElementType const, IdxRangeVx>;
347template <
class ElementType>
348using ConstFieldVy = Field<ElementType const, IdxRangeVy>;
350template <
class ElementType>
351using ConstFieldVxVy = Field<ElementType const, IdxRangeVxVy>;
352using DConstFieldVxVy = ConstFieldVxVy<double>;
354template <
class ElementType>
355using ConstFieldSpVxVy = Field<ElementType const, IdxRangeSpVxVy>;
356using DConstFieldSpVxVy = ConstFieldSpVxVy<double>;
358template <
class ElementType>
359using ConstFieldSpXYVxVy = Field<ElementType const, IdxRangeSpXYVxVy>;
360using DConstFieldSpXYVxVy = ConstFieldSpXYVxVy<double>;
374 std::is_same_v<T, GridX>,
376 std::conditional_t<std::is_same_v<T, GridY>,
GridVy,
void>>;
A class providing aliases for useful subindex ranges of the geometry.
Definition geometry.hpp:367
IdxRangeXY IdxRangeSpatial
A templated type giving the spatial discretised dimension type associated to a velocity discretised d...
Definition geometry.hpp:387
std::conditional_t< std::is_same_v< T, GridX >, GridVx, std::conditional_t< std::is_same_v< T, GridY >, GridVy, void > > velocity_dim_for
A templated type giving the velocity discretised dimension type associated to a spatial discretised d...
Definition geometry.hpp:376
IdxRangeVxVy IdxRangeVelocity
An alias for the velocity discrete index range type.
Definition geometry.hpp:392
IdxRangeSpXYVxVy IdxRangeFdistribu
An alias for the whole distribution function discrete index range type.
Definition geometry.hpp:397
Definition geometry.hpp:82
Definition geometry.hpp:102
Definition geometry.hpp:75
Definition geometry.hpp:61
Definition geometry.hpp:97
Definition geometry.hpp:131
Definition geometry.hpp:94
Definition geometry.hpp:78
Define non periodic real X velocity dimension.
Definition geometry.hpp:301
static bool constexpr PERIODIC
Define periodicity of the dimension.
Definition geometry.hpp:306
Define non periodic real Y velocity dimension.
Definition geometry.hpp:312
static bool constexpr PERIODIC
Define periodicity of the dimension.
Definition geometry.hpp:317
Define non periodic real X dimension.
Definition geometry.hpp:278
static bool constexpr PERIODIC
Define periodicity of the dimension.
Definition geometry.hpp:283
Define non periodic real Y dimension.
Definition geometry.hpp:289
static bool constexpr PERIODIC
Define periodicity of the dimension.
Definition geometry.hpp:294