XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
charge.hpp
Go to the documentation of this file.
1 #ifndef CHARGE_HPP
2 #define CHARGE_HPP
3 #include "space_settings.hpp"
4 #include "electric_field.hpp"
5 #include "perturbed_B_field.hpp"
6 
7 // Charge class
8 template<class Device>
9 class Charge {
10  public:
11 
12  // Constructor
13  Charge(int nnode,int npsi00,int nrho,int nlarmor, int ntor, int nthreads);
14 
15  // Default constructor
16  Charge(){}
17 
18  // Arrays for particle-to-grid operations
19 #ifdef XGC1
20  Kokkos::View<double***,Kokkos::LayoutRight,Device> edensity;
21 #ifdef EXPLICIT_EM
22  Kokkos::View<double***,Kokkos::LayoutRight,Device> ejpar;
23  Kokkos::View<double****,Kokkos::LayoutRight,Device> ijpar;
24 #endif
25  Kokkos::View<double****,Kokkos::LayoutRight,Device> idensity;
26 #else
27  Kokkos::View<double**,Kokkos::LayoutRight,Device> edensity;
28  Kokkos::View<double***,Kokkos::LayoutRight,Device> ejpar_re;
29  Kokkos::View<double***,Kokkos::LayoutRight,Device> ejpar_im;
30 
31  Kokkos::View<double***,Kokkos::LayoutRight,Device> idensity;
32  Kokkos::View<double***,Kokkos::LayoutRight,Device> ijpar_re;
33  Kokkos::View<double***,Kokkos::LayoutRight,Device> ijpar_im;
34 #endif
35 
36  void reset_charge() const;
37  void reset_ion_charge() const;
38 };
39 
40 #include "charge.tpp"
41 
42 #endif
void reset_charge() const
Definition: charge.tpp:26
Kokkos::View< double ***, Kokkos::LayoutRight, Device > ejpar_re
Definition: charge.hpp:28
Kokkos::View< double ***, Kokkos::LayoutRight, Device > ejpar_im
Definition: charge.hpp:29
Kokkos::View< double ***, Kokkos::LayoutRight, Device > ijpar_im
Definition: charge.hpp:33
Kokkos::View< double ***, Kokkos::LayoutRight, Device > idensity
Ion density distribution.
Definition: charge.hpp:31
Kokkos::View< double ***, Kokkos::LayoutRight, Device > ijpar_re
Definition: charge.hpp:32
void reset_ion_charge() const
Definition: charge.tpp:41
Kokkos::View< double **, Kokkos::LayoutRight, Device > edensity
Electron density distribution.
Definition: charge.hpp:27
Definition: charge.hpp:9
Charge()
Definition: charge.hpp:16