XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
unfused_push_algorithm.hpp
Go to the documentation of this file.
1 #ifndef UNFUSED_PUSH_ALGORITHM_HPP
2 #define UNFUSED_PUSH_ALGORITHM_HPP
3 #include "globals.hpp"
4 #include "magnetic_field.hpp"
5 #include "grid.hpp"
6 #include "particles.hpp"
7 #include "species.hpp"
8 #include "perturbed_B_field.hpp"
9 
10 /* This struct contains views that store intermediate values of the electron push so that the kernel can be split into
11  * smaller pieces
12  */
13 template<class Device>
15  // Storage views used to split the electron push kernel
16  Cabana::AoSoA<PhaseDataTypes,Device,VEC_LEN> phase0;
17  Cabana::AoSoA<PhaseDataTypes,Device,VEC_LEN> dy;
18  Cabana::AoSoA<PhaseDataTypes,Device,VEC_LEN> dy_sum;
19  View<int*,CLayout,Device> current_tr;
20 
22 
24  : phase0("phase0", n),
25  dy("dy", n),
26  dy_sum("dy_sum", n),
27  current_tr(NoInit("current_tr"), n) {}
28 
29  void resize(int n){
30  phase0.resize(n);
31  dy.resize(n);
32  dy_sum.resize(n);
33  Kokkos::resize(current_tr, n);
34 
35  // Set current_tr to -1 - this might not be necessary
36  Kokkos::deep_copy(current_tr, -1);
37  }
38 };
39 
40 void unfused_electron_push_kernel(Species<DeviceType> &species, const PushControls &push_controls, const DomainDecomposition<DeviceType>& pol_decomp,
42  const GridFieldPack<DeviceType,PIT_GLOBAL> &gfpack_near,
43  const PerturbedBField<DeviceType> &perturbed_B_field, SortViews<DeviceType>& sort_views,
44  const Sheath<DeviceType> &sheath, const Neutrals<DeviceType> &neutrals,
45  const HeatDiagnostics<DeviceType> &heat_diag, UnfusedPushTmpViews<DeviceType>& tmp, int ncycles_per_launch, double dt);
46 
47 void local_shift(const PushControls &push_controls, Species<DeviceType> &species, SortViews<DeviceType>& sort_views, const Grid<DeviceType> &grid, const MagneticField<DeviceType> &magnetic_field, const DomainDecomposition<DeviceType> &pol_decomp, UnfusedPushTmpViews<DeviceType>& unfused_push_tmp_views, bool send_phase0, bool use_near_field);
48 
49 #endif
View< int *, CLayout, Device > current_tr
Definition: unfused_push_algorithm.hpp:19
Definition: perturbed_B_field.hpp:12
Definition: unfused_push_algorithm.hpp:14
void local_shift(const PushControls &push_controls, Species< DeviceType > &species, SortViews< DeviceType > &sort_views, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, UnfusedPushTmpViews< DeviceType > &unfused_push_tmp_views, bool send_intermediate_values, bool use_near_field)
Definition: unfused_push_algorithm.cpp:333
Definition: push_controls.hpp:9
Definition: magnetic_field.hpp:12
Cabana::AoSoA< PhaseDataTypes, Device, VEC_LEN > dy
Definition: unfused_push_algorithm.hpp:17
Cabana::AoSoA< PhaseDataTypes, Device, VEC_LEN > dy_sum
Definition: unfused_push_algorithm.hpp:18
Definition: grid_field_pack.hpp:21
Cabana::AoSoA< PhaseDataTypes, Device, VEC_LEN > phase0
Definition: unfused_push_algorithm.hpp:16
UnfusedPushTmpViews(int n)
Definition: unfused_push_algorithm.hpp:23
void resize(int n)
Definition: unfused_push_algorithm.hpp:29
Definition: neutrals.hpp:9
Definition: sort.hpp:9
UnfusedPushTmpViews()
Definition: unfused_push_algorithm.hpp:21
Definition: magnetic_field.F90:1
Definition: sheath.hpp:49
Definition: species.hpp:75
Kokkos::ViewAllocateWithoutInitializing NoInit
Definition: space_settings.hpp:68
void unfused_electron_push_kernel(Species< DeviceType > &species, const PushControls &push_controls, const DomainDecomposition< DeviceType > &pol_decomp, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const GridFieldPack< DeviceType, PIT_GLOBAL > &gfpack, const GridFieldPack< DeviceType, PIT_GLOBAL > &gfpack_near, const PerturbedBField< DeviceType > &perturbed_B_field, SortViews< DeviceType > &sort_views, const Sheath< DeviceType > &sheath, const Neutrals< DeviceType > &neutrals, const HeatDiagnostics< DeviceType > &heat_diag, UnfusedPushTmpViews< DeviceType > &tmp, int ncycles_per_launch, double dt)
Definition: unfused_push_algorithm.cpp:433