6 extern "C" void set_electron_charge_pointers(
int nnode,
int npsi00,
int phi_ind0,
double* density_h,
double* density0_h,
double* den00_1d_h);
8 extern "C" void set_ion_charge_pointers(
int nnode,
int npsi00,
int phi_ind0,
double* density_h,
double* density0_h,
double* den00_1d_h);
12 template<
class Device, KinType KT>
24 View<double**,CLayout,HostType>
jpar_h;
42 : is_electrons(is_electrons),
43 use_current(use_current),
49 jpar_h(
"jpar_h", nphi, use_current ? nnode : 0),
50 jpar0_h(
"jpar0_h", use_current ? nnode : 0),
56 jpar_rho_ff_h(
"jpar_rho_ff_h", nrho+1, nphi, use_current ? nnode : 0),
59 jpar(
"jpar", 1, nrho, use_current ? nnode : 0),
60 density(
"density", 1, nrho, nnode)
62 #ifndef NO_FORTRAN_MODULES
63 int phi_ind0 = 2 - nphi;
85 int nphi = (sml.
is_XGCa ? 1 : 2);
92 int nphi = (sml.
is_XGCa ? 1 : 2);
View< double ***, CLayout, HostType > jpar_rho_ff_h
Definition: charge.hpp:31
void set_ion_charge_pointers(int nnode, int npsi00, int phi_ind0, double *density_h, double *density0_h, double *den00_1d_h)
Definition: charge.hpp:80
View< double **, CLayout, HostType > jpar_h
Definition: charge.hpp:24
bool use_current
Whether the class will handle current in addition to charge density.
Definition: charge.hpp:17
static constexpr bool is_XGCa
Equivalent to the preprocessor flag for now.
Definition: sml.hpp:15
Charge(bool use_current, int nnode, int nphi, int nrho, int npsi00, bool is_electrons)
Definition: charge.hpp:41
static constexpr bool explicit_electromagnetic
Equivalent to the preprocessor flag for now.
Definition: sml.hpp:35
void set_ion_charge_pointers_em(int nnode, double *jpar_h, double *jpar0_h)
Charge< DeviceType, KinType::DriftKin > electron
Definition: charge.hpp:81
Charges(const Simulation< DeviceType > &sml, int nnode, int npsi00, int nrho)
Definition: charge.hpp:91
void reset_to_zero()
Definition: charge.hpp:74
bool is_electrons
Definition: charge.hpp:16
View< double *, CLayout, HostType > den00_1d_h
Definition: charge.hpp:22
void set_electron_charge_pointers(int nnode, int npsi00, int phi_ind0, double *density_h, double *density0_h, double *den00_1d_h)
GridField< Device, VarType::Scalar, PIT_GLOBAL, TorType::OnePlane, KT, SCATTER_TYPE_GLOBAL > density
Charge density distribution.
Definition: charge.hpp:34
void set_electron_charge_pointers_em(int nnode, double *jpar_h, double *jpar0_h)
View< double **, CLayout, HostType > den_f0_h
Definition: charge.hpp:27
View< double ***, CLayout, HostType > den_rho_ff_h
Definition: charge.hpp:30
UniformRange psi00
Definition: grid.hpp:266
Charge< DeviceType, KinType::GyroKin > ion
Definition: charge.hpp:82
View< double *, CLayout, HostType > jpar0_h
Definition: charge.hpp:25
View< double **, CLayout, HostType > density_h
Definition: charge.hpp:20
Definition: charge.hpp:13
GridField< Device, VarType::Scalar, PIT_GLOBAL, TorType::OnePlane, KT, SCATTER_TYPE_GLOBAL > jpar
Current density distribution.
Definition: charge.hpp:35
int nnode
Number of grid nodes.
Definition: grid.hpp:246
Charges(const Grid< DeviceType > &grid, const Simulation< DeviceType > &sml, int nrho)
Definition: charge.hpp:84
View< double *, CLayout, HostType > density0_h
Definition: charge.hpp:21
Charge()
Definition: charge.hpp:38