8 template<
class Device, KinType KT>
21 View<double**,CLayout,HostType>
jpar_h;
31 View<double***,CLayout,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>>
den_rho_ff;
32 View<double***,CLayout,Device,Kokkos::MemoryTraits<Kokkos::Unmanaged>>
jpar_rho_ff;
39 : is_electrons(is_electrons),
40 use_current(use_current),
44 density00_h(
"density00_h", use_fsa_den ? nnode : 0),
47 jpar_h(
"jpar_h", nphi, use_current ? nnode : 0),
48 jpar0_h(
"jpar0_h", use_current ? nnode : 0),
53 density(
"density", 1, nrho, nnode),
56 jpar(
"jpar", 1, nrho, use_current ? nnode : 0),
57 jpar_rho_ff((double*)(
jpar.data()), nrho+1, nphi, use_current ? nnode : 0)
73 :
electron(sml.explicit_electromagnetic, grid.nnode, (sml.is_XGCa ? 1 : 2), 0, grid.psi00.n, !grid.axisymmetric, true),
74 ion( sml.explicit_electromagnetic, grid.nnode, (sml.is_XGCa ? 1 : 2), nrho, grid.psi00.n, !grid.axisymmetric, false),
80 if(!XGC_IO::is_present<double>(stream,
"edensity0")){
106 xgc_io.
write(stream);
void read_checkpoint_files(const XGC_IO_Stream &stream)
Definition: charge.hpp:78
View< double *, CLayout, HostType > density00_h
3D flux-surface averaged density
Definition: charge.hpp:18
Definition: charge.hpp:66
void write(const XGC_IO_Stream &stream) const
Definition: xgc_io.hpp:211
Definition: xgc_io.hpp:192
View< double **, CLayout, HostType > jpar_h
Definition: charge.hpp:21
bool use_current
Whether the class will handle current in addition to charge density.
Definition: charge.hpp:13
Charge(bool use_current, int nnode, int nphi, int nrho, int npsi00, bool use_fsa_den, bool is_electrons)
Definition: charge.hpp:38
View< double *, CLayout, HostType > cden00_1d_h
Definition: charge.hpp:70
Charge< DeviceType, KinType::DriftKin > electron
Definition: charge.hpp:67
void read(const XGC_IO_Stream &stream)
Definition: xgc_io.hpp:227
View< double ***, CLayout, Device, Kokkos::MemoryTraits< Kokkos::Unmanaged > > den_rho_ff
Definition: charge.hpp:31
void add(const T &new_data)
Definition: xgc_io.hpp:199
View< double ***, CLayout, Device, Kokkos::MemoryTraits< Kokkos::Unmanaged > > jpar_rho_ff
Definition: charge.hpp:32
Definition: xgc_io.hpp:117
void reset_to_zero()
Definition: charge.hpp:60
bool is_electrons
Definition: charge.hpp:12
View< double *, CLayout, HostType > den00_1d_h
Definition: charge.hpp:19
GridField< Device, VarType::Scalar, PIT_GLOBAL, TorType::OnePlane, KT, SCATTER_TYPE_GLOBAL > density
Charge density distribution.
Definition: charge.hpp:27
Definition: xgc_io.hpp:24
View< double **, CLayout, HostType > den_f0_h
Definition: charge.hpp:24
Charge< DeviceType, KinType::GyroKin > ion
Definition: charge.hpp:68
View< double *, CLayout, HostType > jpar0_h
Definition: charge.hpp:22
View< double **, CLayout, HostType > density_h
Definition: charge.hpp:16
GridField< Device, VarType::Scalar, PIT_GLOBAL, TorType::OnePlane, KT, SCATTER_TYPE_GLOBAL > jpar
Current density distribution.
Definition: charge.hpp:28
Charges(const Grid< DeviceType > &grid, const Simulation< DeviceType > &sml, int nrho)
Definition: charge.hpp:72
void write_checkpoint_files(const XGC_IO_Stream &stream) const
Definition: charge.hpp:96
View< double *, CLayout, HostType > density0_h
Definition: charge.hpp:17
Charge()
Definition: charge.hpp:35