5#include <ddc/kernels/splines.hpp>
7#include "ddc_alias_inline_functions.hpp"
8#include "ddc_aliases.hpp"
9#include "ddc_helper.hpp"
11#include "non_uniform_interpolation_points.hpp"
12#include "species_info.hpp"
23 static bool constexpr PERIODIC =
true;
25 static bool constexpr PERIODIC =
false;
37 static bool constexpr PERIODIC =
false;
52using CoordT = Coord<T>;
53using CoordX = Coord<X>;
55using CoordVx = Coord<Vx>;
57using CoordXVx = Coord<X, Vx>;
59int constexpr BSDegreeX = 3;
60int constexpr BSDegreeVx = 3;
63bool constexpr BsplineOnUniformCellsX =
false;
64bool constexpr BsplineOnUniformCellsVx =
false;
66bool constexpr BsplineOnUniformCellsX =
true;
67bool constexpr BsplineOnUniformCellsVx =
true;
72 BsplineOnUniformCellsX,
73 ddc::UniformBSplines<X, BSDegreeX>,
74 ddc::NonUniformBSplines<X, BSDegreeX>>
79 BsplineOnUniformCellsVx,
80 ddc::UniformBSplines<Vx, BSDegreeVx>,
81 ddc::NonUniformBSplines<Vx, BSDegreeVx>>
85auto constexpr SplineXBoundary =
X::PERIODIC ? ddc::BoundCond::PERIODIC : ddc::BoundCond::GREVILLE;
86auto constexpr SplineVxBoundary = ddc::BoundCond::HERMITE;
88using SplineInterpPointsX
89 = ddc::GrevilleInterpolationPoints<BSplinesX, SplineXBoundary, SplineXBoundary>;
90using SplineInterpPointsVx
91 = ddc::GrevilleInterpolationPoints<BSplinesVx, SplineVxBoundary, SplineVxBoundary>;
93struct GridX : SplineInterpPointsX::interpolation_discrete_dimension_type
96struct GridVx : SplineInterpPointsVx::interpolation_discrete_dimension_type
100using SplineXBuilder = ddc::SplineBuilder<
101 Kokkos::DefaultExecutionSpace,
102 Kokkos::DefaultExecutionSpace::memory_space,
107 ddc::SplineSolver::LAPACK,
110using SplineXEvaluator = ddc::SplineEvaluator<
111 Kokkos::DefaultExecutionSpace,
112 Kokkos::DefaultExecutionSpace::memory_space,
116 ddc::PeriodicExtrapolationRule<X>,
117 ddc::PeriodicExtrapolationRule<X>,
119 ddc::ConstantExtrapolationRule<X>,
120 ddc::ConstantExtrapolationRule<X>,
124using SplineVxBuilder = ddc::SplineBuilder<
125 Kokkos::DefaultExecutionSpace,
126 Kokkos::DefaultExecutionSpace::memory_space,
131 ddc::SplineSolver::LAPACK,
134using SplineVxEvaluator = ddc::SplineEvaluator<
135 Kokkos::DefaultExecutionSpace,
136 Kokkos::DefaultExecutionSpace::memory_space,
139 ddc::ConstantExtrapolationRule<Vx>,
140 ddc::ConstantExtrapolationRule<Vx>,
143using SplineXBuilder_1d = ddc::SplineBuilder<
144 Kokkos::DefaultExecutionSpace,
145 Kokkos::DefaultExecutionSpace::memory_space,
150 ddc::SplineSolver::LAPACK,
152using SplineXEvaluator_1d = ddc::SplineEvaluator<
153 Kokkos::DefaultExecutionSpace,
154 Kokkos::DefaultExecutionSpace::memory_space,
158 ddc::PeriodicExtrapolationRule<X>,
159 ddc::PeriodicExtrapolationRule<X>,
161 ddc::ConstantExtrapolationRule<X>,
162 ddc::ConstantExtrapolationRule<X>,
165using SplineVxBuilder_1d = ddc::SplineBuilder<
166 Kokkos::DefaultHostExecutionSpace,
172 ddc::SplineSolver::LAPACK,
174using SplineVxEvaluator_1d = ddc::SplineEvaluator<
175 Kokkos::DefaultHostExecutionSpace,
179 ddc::ConstantExtrapolationRule<Vx>,
180 ddc::ConstantExtrapolationRule<Vx>,
187using IdxMom = Idx<GridMom>;
189using IdxVx = Idx<GridVx>;
191using IdxX = Idx<GridX>;
194using IdxSpMom = Idx<Species, GridMom>;
196using IdxSpMomX = Idx<Species, GridMom, GridX>;
198using IdxSpX = Idx<Species, GridX>;
200using IdxSpVx = Idx<Species, GridVx>;
202using IdxSpXVx = Idx<Species, GridX, GridVx>;
204using IdxXVx = Idx<GridX, GridVx>;
208using IdxStepMom = IdxStep<GridMom>;
210using IdxStepVx = IdxStep<GridVx>;
212using IdxStepX = IdxStep<GridX>;
215using IdxStepSpMom = IdxStep<Species, GridMom>;
217using IdxStepSpMomX = IdxStep<Species, GridMom, GridX>;
219using IdxStepSpVx = IdxStep<Species, GridVx>;
221using IdxStepSpX = IdxStep<Species, GridX>;
223using IdxStepSpXVx = IdxStep<Species, GridX, GridVx>;
225using IdxStepXVx = IdxStep<GridX, GridVx>;
229using IdxRangeBSX = IdxRange<BSplinesX>;
231using IdxRangeBSVx = IdxRange<BSplinesVx>;
235using IdxRangeMom = IdxRange<GridMom>;
237using IdxRangeVx = IdxRange<GridVx>;
239using IdxRangeX = IdxRange<GridX>;
241using IdxRangeSpMom = IdxRange<Species, GridMom>;
243using IdxRangeSpMomX = IdxRange<Species, GridMom, GridX>;
245using IdxRangeSpVx = IdxRange<Species, GridVx>;
247using IdxRangeSpX = IdxRange<Species, GridX>;
249using IdxRangeSpXVx = IdxRange<Species, GridX, GridVx>;
251using IdxRangeXVx = IdxRange<GridX, GridVx>;
254template <
class ElementType>
255using FieldMemVx = FieldMem<ElementType, IdxRangeVx>;
257template <
class ElementType>
258using FieldMemX = FieldMem<ElementType, IdxRangeX>;
260template <
class ElementType>
261using BSFieldMemX = FieldMem<ElementType, IdxRangeBSX>;
264template <
class ElementType>
265using FieldMemSpMom = FieldMem<ElementType, IdxRangeSpMom>;
267template <
class ElementType>
268using FieldMemSpMomX = FieldMem<ElementType, IdxRangeSpMomX>;
270template <
class ElementType>
271using FieldMemSpVx = FieldMem<ElementType, IdxRangeSpVx>;
273template <
class ElementType>
274using FieldMemSpX = FieldMem<ElementType, IdxRangeSpX>;
276template <
class ElementType>
277using FieldMemSpXVx = FieldMem<ElementType, IdxRangeSpXVx>;
281using DFieldMemVx = FieldMemVx<double>;
283using DFieldMemX = FieldMemX<double>;
285using DBSFieldMemX = BSFieldMemX<double>;
288using DFieldMemSpMom = FieldMemSpMom<double>;
290using DFieldMemSpMomX = FieldMemSpMomX<double>;
292using DFieldMemSpVx = FieldMemSpVx<double>;
294using DFieldMemSpX = FieldMemSpX<double>;
296using DFieldMemSpXVx = FieldMemSpXVx<double>;
300template <
class ElementType>
301using BSFieldX = Field<ElementType, IdxRangeBSX>;
303template <
class ElementType>
304using FieldX = Field<ElementType, IdxRangeX>;
306template <
class ElementType>
307using FieldVx = Field<ElementType, IdxRangeVx>;
309template <
class ElementType>
310using FieldSpMomX = Field<ElementType, IdxRangeSpMomX>;
312template <
class ElementType>
313using FieldSpMom = Field<ElementType, IdxRangeSpMom>;
315template <
class ElementType>
316using FieldSpVx = Field<ElementType, IdxRangeSpVx>;
318template <
class ElementType>
319using FieldSpX = Field<ElementType, IdxRangeSpX>;
321template <
class ElementType>
322using FieldSpXVx = Field<ElementType, IdxRangeSpXVx>;
325using DBSFieldX = BSFieldX<double>;
327using DFieldVx = FieldVx<double>;
329using DFieldX = FieldX<double>;
331using DFieldSpMomX = FieldSpMomX<double>;
333using DFieldSpMom = FieldSpMom<double>;
335using DFieldSpVx = FieldSpVx<double>;
337using DFieldSpX = FieldSpX<double>;
339using DFieldSpXVx = FieldSpXVx<double>;
342template <
class ElementType>
343using ConstFieldVx = Field<ElementType const, IdxRangeVx>;
345template <
class ElementType>
346using ConstFieldX = Field<ElementType const, IdxRangeX>;
349template <
class ElementType>
350using BSConstFieldX = ConstField<ElementType, IdxRangeBSX>;
352template <
class ElementType>
353using ConstFieldSpMom = ConstField<ElementType, IdxRangeSpMom>;
355template <
class ElementType>
356using ConstFieldSpMomX = ConstField<ElementType, IdxRangeSpMomX>;
358template <
class ElementType>
359using ConstFieldSpMom = ConstField<ElementType, IdxRangeSpMom>;
361template <
class ElementType>
362using ConstFieldSpVx = ConstField<ElementType, IdxRangeSpVx>;
364template <
class ElementType>
365using ConstFieldSpX = ConstField<ElementType, IdxRangeSpX>;
367template <
class ElementType>
368using ConstFieldSpXVx = ConstField<ElementType, IdxRangeSpXVx>;
372using DConstFieldVx = ConstFieldVx<double>;
374using DConstFieldX = ConstFieldX<double>;
377using DBSConstFieldX = BSConstFieldX<double>;
379using DConstFieldSpMom = ConstFieldSpMom<double>;
381using DConstFieldSpMomX = ConstFieldSpMomX<double>;
383using DConstFieldSpMom = ConstFieldSpMom<double>;
385using DConstFieldSpX = ConstFieldSpX<double>;
387using DConstFieldSpVx = ConstFieldSpVx<double>;
389using DConstFieldSpXVx = ConstFieldSpXVx<double>;
A class providing aliases for useful subindex ranges of the geometry.
Definition geometry.hpp:396
IdxRangeX IdxRangeSpatial
An alias for the spatial discrete index range type.
Definition geometry.hpp:413
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:402
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:408
IdxRangeVx IdxRangeVelocity
An alias for the velocity discrete index range type.
Definition geometry.hpp:418
IdxRangeSpXVx IdxRangeFdistribu
An alias for the whole distribution function discrete index range type.
Definition geometry.hpp:425
Moments discrete dimension to access constant attributes related to fluid moments.
Definition moments.hpp:7
Definition geometry.hpp:82
Definition geometry.hpp:75
Definition geometry.hpp:184
Definition geometry.hpp:97
Definition geometry.hpp:94
A class which describes the real space in the temporal direction.
Definition geometry.hpp:44
static bool constexpr PERIODIC
A boolean indicating if the dimension is periodic.
Definition geometry.hpp:48
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 X dimension.
Definition geometry.hpp:278
static bool constexpr PERIODIC
Define periodicity of the dimension.
Definition geometry.hpp:283