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);
13 template<
class Device, KinType KT>
25 View<double**,CLayout,HostType>
jpar_h;
43 : is_electrons(is_electrons),
44 use_current(use_current),
50 jpar_h(
"jpar_h", nphi, use_current ? nnode : 0),
51 jpar0_h(
"jpar0_h", use_current ? nnode : 0),
57 jpar_rho_ff_h(
"jpar_rho_ff_h", nrho+1, nphi, use_current ? nnode : 0),
60 jpar(
"jpar", 1, nrho, use_current ? nnode : 0),
61 density(
"density", 1, nrho, nnode)
63 #ifndef NO_FORTRAN_MODULES
64 int phi_ind0 = 2 - nphi;
88 int nphi = (sml.
is_XGCa ? 1 : 2);
92 #ifndef NO_FORTRAN_MODULES
View< double ***, CLayout, HostType > jpar_rho_ff_h
Definition: charge.hpp:32
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:81
void set_cden00_1d_fort(int npsi00, double *cden00_1d_h)
View< double **, CLayout, HostType > jpar_h
Definition: charge.hpp:25
bool use_current
Whether the class will handle current in addition to charge density.
Definition: charge.hpp:18
static constexpr bool is_XGCa
Equivalent to the preprocessor flag for now.
Definition: sml.hpp:17
Charge(bool use_current, int nnode, int nphi, int nrho, int npsi00, bool is_electrons)
Definition: charge.hpp:42
static constexpr bool explicit_electromagnetic
Equivalent to the preprocessor flag for now.
Definition: sml.hpp:37
void set_ion_charge_pointers_em(int nnode, double *jpar_h, double *jpar0_h)
View< double *, CLayout, HostType > cden00_1d_h
Definition: charge.hpp:85
Charge< DeviceType, KinType::DriftKin > electron
Definition: charge.hpp:82
void reset_to_zero()
Definition: charge.hpp:75
bool is_electrons
Definition: charge.hpp:17
View< double *, CLayout, HostType > den00_1d_h
Definition: charge.hpp:23
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:35
void set_electron_charge_pointers_em(int nnode, double *jpar_h, double *jpar0_h)
View< double **, CLayout, HostType > den_f0_h
Definition: charge.hpp:28
View< double ***, CLayout, HostType > den_rho_ff_h
Definition: charge.hpp:31
UniformRange psi00
Definition: grid.hpp:200
Charge< DeviceType, KinType::GyroKin > ion
Definition: charge.hpp:83
View< double *, CLayout, HostType > jpar0_h
Definition: charge.hpp:26
View< double **, CLayout, HostType > density_h
Definition: charge.hpp:21
Definition: charge.hpp:14
GridField< Device, VarType::Scalar, PIT_GLOBAL, TorType::OnePlane, KT, SCATTER_TYPE_GLOBAL > jpar
Current density distribution.
Definition: charge.hpp:36
int nnode
Number of grid nodes.
Definition: grid.hpp:190
Charges(const Grid< DeviceType > &grid, const Simulation< DeviceType > &sml, int nrho)
Definition: charge.hpp:87
View< double *, CLayout, HostType > density0_h
Definition: charge.hpp:22
Charge()
Definition: charge.hpp:39