5 #include <ddc/kernels/fft.hpp>
6 #include <ddc/kernels/splines.hpp>
8 #include "ddc_alias_inline_functions.hpp"
9 #include "ddc_aliases.hpp"
10 #include "ddc_helper.hpp"
11 #include "moments.hpp"
12 #include "non_uniform_interpolation_points.hpp"
13 #include "species_info.hpp"
24 static bool constexpr
PERIODIC =
true;
26 static bool constexpr
PERIODIC =
false;
38 static bool constexpr
PERIODIC =
false;
53 using CoordT = Coord<T>;
54 using CoordX = Coord<X>;
56 using CoordVx = Coord<Vx>;
58 using CoordXVx = Coord<X, Vx>;
60 int constexpr BSDegreeX = 3;
61 int constexpr BSDegreeVx = 3;
64 bool constexpr BsplineOnUniformCellsX =
false;
65 bool constexpr BsplineOnUniformCellsVx =
false;
67 bool constexpr BsplineOnUniformCellsX =
true;
68 bool constexpr BsplineOnUniformCellsVx =
true;
73 BsplineOnUniformCellsX,
74 ddc::UniformBSplines<X, BSDegreeX>,
75 ddc::NonUniformBSplines<X, BSDegreeX>>
80 BsplineOnUniformCellsVx,
81 ddc::UniformBSplines<Vx, BSDegreeVx>,
82 ddc::NonUniformBSplines<Vx, BSDegreeVx>>
86 auto constexpr SplineXBoundary =
X::PERIODIC ? ddc::BoundCond::PERIODIC : ddc::BoundCond::GREVILLE;
87 auto constexpr SplineVxBoundary = ddc::BoundCond::HERMITE;
90 using SplineInterpPointsX
92 using SplineInterpPointsVx
95 using SplineInterpPointsX
96 = ddc::GrevilleInterpolationPoints<BSplinesX, SplineXBoundary, SplineXBoundary>;
97 using SplineInterpPointsVx
98 = ddc::GrevilleInterpolationPoints<BSplinesVx, SplineVxBoundary, SplineVxBoundary>;
101 struct GridX : SplineInterpPointsX::interpolation_discrete_dimension_type
104 struct GridVx : SplineInterpPointsVx::interpolation_discrete_dimension_type
108 using SplineXBuilder = ddc::SplineBuilder<
109 Kokkos::DefaultExecutionSpace,
110 Kokkos::DefaultExecutionSpace::memory_space,
115 ddc::SplineSolver::LAPACK,
118 using SplineXEvaluator = ddc::SplineEvaluator<
119 Kokkos::DefaultExecutionSpace,
120 Kokkos::DefaultExecutionSpace::memory_space,
123 #ifdef PERIODIC_RDIMX
124 ddc::PeriodicExtrapolationRule<X>,
125 ddc::PeriodicExtrapolationRule<X>,
127 ddc::ConstantExtrapolationRule<X>,
128 ddc::ConstantExtrapolationRule<X>,
132 using SplineVxBuilder = ddc::SplineBuilder<
133 Kokkos::DefaultExecutionSpace,
134 Kokkos::DefaultExecutionSpace::memory_space,
139 ddc::SplineSolver::LAPACK,
142 using SplineVxEvaluator = ddc::SplineEvaluator<
143 Kokkos::DefaultExecutionSpace,
144 Kokkos::DefaultExecutionSpace::memory_space,
147 ddc::ConstantExtrapolationRule<Vx>,
148 ddc::ConstantExtrapolationRule<Vx>,
151 using SplineXBuilder_1d = ddc::SplineBuilder<
152 Kokkos::DefaultExecutionSpace,
153 Kokkos::DefaultExecutionSpace::memory_space,
158 ddc::SplineSolver::LAPACK,
160 using SplineXEvaluator_1d = ddc::SplineEvaluator<
161 Kokkos::DefaultExecutionSpace,
162 Kokkos::DefaultExecutionSpace::memory_space,
165 #ifdef PERIODIC_RDIMX
166 ddc::PeriodicExtrapolationRule<X>,
167 ddc::PeriodicExtrapolationRule<X>,
169 ddc::ConstantExtrapolationRule<X>,
170 ddc::ConstantExtrapolationRule<X>,
173 using SplineVxBuilder_1d = ddc::SplineBuilder<
174 Kokkos::DefaultHostExecutionSpace,
180 ddc::SplineSolver::LAPACK,
182 using SplineVxEvaluator_1d = ddc::SplineEvaluator<
183 Kokkos::DefaultHostExecutionSpace,
187 ddc::ConstantExtrapolationRule<Vx>,
188 ddc::ConstantExtrapolationRule<Vx>,
195 using IdxMom = Idx<GridMom>;
197 using IdxVx = Idx<GridVx>;
199 using IdxX = Idx<GridX>;
202 using IdxSpMom = Idx<Species, GridMom>;
204 using IdxSpMomX = Idx<Species, GridMom, GridX>;
206 using IdxSpX = Idx<Species, GridX>;
208 using IdxSpVx = Idx<Species, GridVx>;
210 using IdxSpXVx = Idx<Species, GridX, GridVx>;
212 using IdxXVx = Idx<GridX, GridVx>;
216 using IdxStepMom = IdxStep<GridMom>;
218 using IdxStepVx = IdxStep<GridVx>;
220 using IdxStepX = IdxStep<GridX>;
223 using IdxStepSpMom = IdxStep<Species, GridMom>;
225 using IdxStepSpMomX = IdxStep<Species, GridMom, GridX>;
227 using IdxStepSpVx = IdxStep<Species, GridVx>;
229 using IdxStepSpX = IdxStep<Species, GridX>;
231 using IdxStepSpXVx = IdxStep<Species, GridX, GridVx>;
233 using IdxStepXVx = IdxStep<GridX, GridVx>;
237 using IdxRangeBSX = IdxRange<BSplinesX>;
239 using IdxRangeBSVx = IdxRange<BSplinesVx>;
243 using IdxRangeMom = IdxRange<GridMom>;
245 using IdxRangeVx = IdxRange<GridVx>;
247 using IdxRangeX = IdxRange<GridX>;
249 using IdxRangeSpMom = IdxRange<Species, GridMom>;
251 using IdxRangeSpMomX = IdxRange<Species, GridMom, GridX>;
253 using IdxRangeSpVx = IdxRange<Species, GridVx>;
255 using IdxRangeSpX = IdxRange<Species, GridX>;
257 using IdxRangeSpXVx = IdxRange<Species, GridX, GridVx>;
259 using IdxRangeXVx = IdxRange<GridX, GridVx>;
262 template <
class ElementType>
263 using FieldMemVx = FieldMem<ElementType, IdxRangeVx>;
265 template <
class ElementType>
266 using FieldMemX = FieldMem<ElementType, IdxRangeX>;
268 template <
class ElementType>
269 using BSFieldMemX = FieldMem<ElementType, IdxRangeBSX>;
272 template <
class ElementType>
273 using FieldMemSpMom = FieldMem<ElementType, IdxRangeSpMom>;
275 template <
class ElementType>
276 using FieldMemSpMomX = FieldMem<ElementType, IdxRangeSpMomX>;
278 template <
class ElementType>
279 using FieldMemSpVx = FieldMem<ElementType, IdxRangeSpVx>;
281 template <
class ElementType>
282 using FieldMemSpX = FieldMem<ElementType, IdxRangeSpX>;
284 template <
class ElementType>
285 using FieldMemSpXVx = FieldMem<ElementType, IdxRangeSpXVx>;
289 using DFieldMemVx = FieldMemVx<double>;
291 using DFieldMemX = FieldMemX<double>;
293 using DBSFieldMemX = BSFieldMemX<double>;
296 using DFieldMemSpMom = FieldMemSpMom<double>;
298 using DFieldMemSpMomX = FieldMemSpMomX<double>;
300 using DFieldMemSpVx = FieldMemSpVx<double>;
302 using DFieldMemSpX = FieldMemSpX<double>;
304 using DFieldMemSpXVx = FieldMemSpXVx<double>;
308 template <
class ElementType>
309 using BSFieldX = Field<ElementType, IdxRangeBSX>;
311 template <
class ElementType>
312 using FieldX = Field<ElementType, IdxRangeX>;
314 template <
class ElementType>
315 using FieldVx = Field<ElementType, IdxRangeVx>;
317 template <
class ElementType>
318 using FieldSpMomX = Field<ElementType, IdxRangeSpMomX>;
320 template <
class ElementType>
321 using FieldSpMom = Field<ElementType, IdxRangeSpMom>;
323 template <
class ElementType>
324 using FieldSpVx = Field<ElementType, IdxRangeSpVx>;
326 template <
class ElementType>
327 using FieldSpX = Field<ElementType, IdxRangeSpX>;
329 template <
class ElementType>
330 using FieldSpXVx = Field<ElementType, IdxRangeSpXVx>;
333 using DBSFieldX = BSFieldX<double>;
335 using DFieldVx = FieldVx<double>;
337 using DFieldX = FieldX<double>;
339 using DFieldSpMomX = FieldSpMomX<double>;
341 using DFieldSpMom = FieldSpMom<double>;
343 using DFieldSpVx = FieldSpVx<double>;
345 using DFieldSpX = FieldSpX<double>;
347 using DFieldSpXVx = FieldSpXVx<double>;
350 template <
class ElementType>
351 using ConstFieldVx = Field<ElementType const, IdxRangeVx>;
353 template <
class ElementType>
354 using ConstFieldX = Field<ElementType const, IdxRangeX>;
357 template <
class ElementType>
358 using BSConstFieldX = ConstField<ElementType, IdxRangeBSX>;
360 template <
class ElementType>
361 using ConstFieldSpMom = ConstField<ElementType, IdxRangeSpMom>;
363 template <
class ElementType>
364 using ConstFieldSpMomX = ConstField<ElementType, IdxRangeSpMomX>;
366 template <
class ElementType>
367 using ConstFieldSpMom = ConstField<ElementType, IdxRangeSpMom>;
369 template <
class ElementType>
370 using ConstFieldSpVx = ConstField<ElementType, IdxRangeSpVx>;
372 template <
class ElementType>
373 using ConstFieldSpX = ConstField<ElementType, IdxRangeSpX>;
375 template <
class ElementType>
376 using ConstFieldSpXVx = ConstField<ElementType, IdxRangeSpXVx>;
380 using DConstFieldVx = ConstFieldVx<double>;
382 using DConstFieldX = ConstFieldX<double>;
385 using DBSConstFieldX = BSConstFieldX<double>;
387 using DConstFieldSpMom = ConstFieldSpMom<double>;
389 using DConstFieldSpMomX = ConstFieldSpMomX<double>;
391 using DConstFieldSpMom = ConstFieldSpMom<double>;
393 using DConstFieldSpX = ConstFieldSpX<double>;
395 using DConstFieldSpVx = ConstFieldSpVx<double>;
397 using DConstFieldSpXVx = ConstFieldSpXVx<double>;
A class providing aliases for useful subindex ranges of the geometry.
Definition: geometry.hpp:404
IdxRangeX IdxRangeSpatial
An alias for the spatial discrete index range type.
Definition: geometry.hpp:421
std::conditional_t< std::is_same_v< T, GridX >, GridVx, void > velocity_dim_for
A templated type giving the velocity discretised dimension type associated to a spatial discretised d...
Definition: geometry.hpp:410
std::conditional_t< std::is_same_v< T, GridVx >, GridX, void > spatial_dim_for
A templated type giving the spatial discretised dimension type associated to a velocity discretised d...
Definition: geometry.hpp:416
IdxRangeVx IdxRangeVelocity
An alias for the velocity discrete index range type.
Definition: geometry.hpp:426
IdxRangeSpXVx IdxRangeFdistribu
An alias for the whole distribution function discrete index range type.
Definition: geometry.hpp:433
Moments discrete dimension to access constant attributes related to fluid moments.
Definition: moments.hpp:7
Definition: geometry.hpp:83
Definition: geometry.hpp:76
Definition: geometry.hpp:192
Definition: geometry.hpp:105
Definition: geometry.hpp:102
A class which describes the real space in the temporal direction.
Definition: geometry.hpp:45
static constexpr bool PERIODIC
A boolean indicating if the dimension is periodic.
Definition: geometry.hpp:49
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 X dimension.
Definition: geometry.hpp:278
static constexpr bool PERIODIC
Define periodicity of the dimension.
Definition: geometry.hpp:283