XGCa
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Species< Device > Class Template Reference

#include <species.hpp>

Collaboration diagram for Species< Device >:
Collaboration graph
[legend]

Public Types

enum class  LaunchBounds { Default , Custom }
 

Public Member Functions

 Species (int idx_in, int nonadiabatic_idx_in, bool is_electron_in, bool is_adiabatic_in, KinType kintype_in, double mass_in, double charge_in, double charge_eu_in, int ncycles_in)
 
 Species (NLReader::NamelistReader &nlr, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, int idx_in, int nonadiabatic_idx_in)
 
 Species (SpeciesType sp_type, int n_ptl)
 
 Species (int n_ptl_in)
 
void resize_particles (int new_n_ptl)
 
void resize_host_particles_to_match_device ()
 
void unassign_host_particles ()
 
void resize_device_particles ()
 
void resize_device_particles (int new_n_ptl)
 
void copy_particles_to_device ()
 
void copy_particles_from_device ()
 
void copy_particles_to_device_if_resident ()
 
void copy_particles_from_device_if_resident ()
 
void copy_particles_to_device_if_not_resident ()
 
void copy_particles_from_device_if_not_resident ()
 
void set_buffer_particles_d ()
 
void set_buffer_phase0_d ()
 
template<typename F >
void for_all_particles (const std::string label, F lambda_func) const
 
void back_up_SoA (Cabana::AoSoA< ParticleDataTypes, Device, VEC_LEN > &backup_SoA, int offset, int n) const
 
void restore_backup_SoA (Cabana::AoSoA< ParticleDataTypes, Device, VEC_LEN > &backup_SoA, int offset, int n) const
 
template<typename F >
void for_particle_range (int begin_idx, int end_idx, const std::string label, F lambda_func) const
 
template<typename F >
void for_all_particles (const std::string label, F lambda_func, const PtlMvmt mvmt, LaunchBounds launch_bounds=LaunchBounds::Default)
 
KOKKOS_INLINE_FUNCTION VecParticlesptl () const
 
KOKKOS_INLINE_FUNCTION VecPhaseph0 () const
 
void copy_to_phase0 (Species< Device > &species)
 
bool phase0_is_stored () const
 
void copy_phase0_to_device_if_not_resident ()
 
void save_backup_particles ()
 
void restore_particles_from_backup ()
 
void move_phase0_from_device_if_not_resident ()
 
void clear_backup_phase ()
 
KOKKOS_INLINE_FUNCTION void restore_phase_from_phase0 (const AoSoAIndices< Device > &inds, SimdParticles &part_one) const
 
long long int get_total_n_ptl ()
 
int get_max_n_ptl ()
 
KOKKOS_INLINE_FUNCTION double get_fg_gyro_radius (int inode, double smu_n, double bfield) const
 
KOKKOS_INLINE_FUNCTION double get_f0_eq_thermal_velocity (int inode) const
 
KOKKOS_INLINE_FUNCTION double get_f0_eq_thermal_velocity_lnode (int inode) const
 
KOKKOS_INLINE_FUNCTION double get_f0_eq_thermal_velocity_lnode_h (int inode) const
 
KOKKOS_INLINE_FUNCTION double get_f0_fg_unit_velocity_lnode_h (int inode) const
 
KOKKOS_INLINE_FUNCTION void get_particle_velocity_and_nearest_node (const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, SimdParticles &part, Simd< double > &smu, Simd< double > &vp, Simd< int > &nearest_node, Simd< bool > &not_in_triangle, Simd< bool > &not_in_poloidal_domain) const
 
KOKKOS_INLINE_FUNCTION double eq_flow_ms (const MagneticField< DeviceType > &magnetic_field, double psi_in, double r, double z, double bphi_over_b) const
 
KOKKOS_INLINE_FUNCTION void get_tr_save (int i_item, Simd< int > &itr) const
 
void update_decomposed_f0_calculations (const DomainDecomposition< DeviceType > &pol_decomp, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const VelocityGrid &vgrid)
 
void initialize_global_f0_arrays (const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field)
 
void write_ptl_checkpoint_files (const DomainDecomposition< DeviceType > &pol_decomp, const XGC_IO_Stream &stream, std::string sp_name)
 
void write_f0_checkpoint_files (const DomainDecomposition< DeviceType > &pol_decomp, const XGC_IO_Stream &stream, std::string sp_name)
 
void read_f0_checkpoint_files (const DomainDecomposition< DeviceType > &pol_decomp, const XGC_IO_Stream &stream, std::string sp_name)
 
void read_ptl_checkpoint_files (const DomainDecomposition< DeviceType > &pol_decomp, const XGC_IO_Stream &stream, std::string sp_name, bool n_ranks_is_same, int version)
 
void read_initial_distribution (NLReader::NamelistReader &nlr, const DomainDecomposition< DeviceType > &pol_decomp)
 
long long int get_max_gid () const
 
void get_ptl_write_total_and_offsets (const DomainDecomposition< DeviceType > &pol_decomp, long long int &inum_total, long long int &ioff) const
 

Static Public Member Functions

static std::vector< MemoryPredictionestimate_memory_usage (NLReader::NamelistReader &nlr, const Grid< DeviceType > &grid, const DomainDecomposition< DeviceType > &pol_decomp, int species_idx)
 
static int get_initial_n_ptl (NLReader::NamelistReader &nlr, const Grid< DeviceType > &grid, const DomainDecomposition< DeviceType > &pol_decomp, int species_idx, bool verbose)
 

Public Attributes

int idx
 Index in all_species. More...
 
bool is_electron
 Whether this species is the electrons. More...
 
bool is_adiabatic
 Whether this species is adiabatic. More...
 
int nonadiabatic_idx
 Index of species skipping adiabatic species (for compatibility with fortran arrays) More...
 
KinType kintype
 Whether the species is gyrokinetic or drift kinetic. More...
 
double mass
 Particle mass. More...
 
double charge
 Particle charge. More...
 
double charge_eu
 Particle charge in eu. More...
 
double c_m
 c/m More...
 
double c2_2m
 c2/2m More...
 
MarkerType marker_type
 Marker type: reduced delta-f, total-f, full-f, or none (placeholder for adiabatic species) More...
 
FAnalyticShape f_analytic_shape
 f_analytic_shape shape: Maxwellian, SlowingDown or None More...
 
WeightEvoEq weight_evo_eq
 
bool dynamic_f0
 Whether f0 can evolve in time. More...
 
bool maxwellian_init
 whether initial distribution is maxwellian More...
 
int ncycles
 Number of subcycles. More...
 
int ncycles_between_sorts
 Number of subcycles between sorts. More...
 
int minimum_ptl_reservation
 The minimum reservation size for particles. More...
 
int n_ptl
 Number of particles. More...
 
Cabana::AoSoA< ParticleDataTypes, HostType, VEC_LEN > particles
 Particles. More...
 
Cabana::AoSoA< ParticleDataTypes, Device, VEC_LEN > particles_d
 Particles on device. More...
 
bool owns_particles_d
 Whether the species owns the device particle allocation right now. More...
 
bool particles_resident_on_device
 Whether the particles can reside on device. More...
 
bool stream_particles
 Whether to stream particles between host and device if possible. More...
 
RKRestorationMethod RK_restoration_method
 Currently, electrons must use first method and ions must use second. More...
 
bool particles_are_backed_up
 Whether particles are currently backed up. More...
 
Cabana::AoSoA< PhaseDataTypes, HostType, VEC_LEN > phase0
 
Cabana::AoSoA< PhaseDataTypes, Device, VEC_LEN > phase0_d
 
Cabana::AoSoA< ParticleDataTypes, HostType, VEC_LEN > backup_particles
 Copy of particles to be restored for RK2. More...
 
Cabana::AoSoA< ParticleDataTypes, DeviceType, VEC_LEN > backup_particles_d
 Copy of particles to be restored for RK2. More...
 
int n_backup_particles
 
bool backup_particles_on_device
 
View< int *, CLayout, Device > tr_save
 
Distribution< Device > f0
 Species distribution in velocity space on local mesh nodes. More...
 
int collision_grid_index
 Which collision grid to use. More...
 
Eq::Profile< Device > eq_temp
 
Eq::Profile< Device > eq_den
 
Eq::Profile< Device > eq_flow
 
int eq_flow_type
 
Eq::Profile< Device > eq_fg_temp
 
Eq::Profile< Device > eq_fg_flow
 
int eq_fg_flow_type
 
Eq::Profile< Device > eq_mk_temp
 
Eq::Profile< Device > eq_mk_den
 
Eq::Profile< Device > eq_mk_flow
 
int eq_mk_flow_type
 
GyroAverageMatrices< Device > gyro_avg_matrices
 

Member Enumeration Documentation

◆ LaunchBounds

template<class Device >
enum Species::LaunchBounds
strong
Enumerator
Default 
Custom 

Constructor & Destructor Documentation

◆ Species() [1/4]

template<class Device >
Species< Device >::Species ( int  idx_in,
int  nonadiabatic_idx_in,
bool  is_electron_in,
bool  is_adiabatic_in,
KinType  kintype_in,
double  mass_in,
double  charge_in,
double  charge_eu_in,
int  ncycles_in 
)

Constructor for species class used in collisions kernel

◆ Species() [2/4]

template<class Device >
Species< Device >::Species ( NLReader::NamelistReader nlr,
const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field,
const DomainDecomposition< DeviceType > &  pol_decomp,
int  idx_in,
int  nonadiabatic_idx_in 
)

Constructor for species class

< Specifies the weight evolution equation method: Direct, PDE, or None.

< - Direct integration: Is used in the Total-F method, where the source term and particle contributions are evaluated separately. Refer to Section II C of Hager et al., Phys. Plasmas 29, 112308 (2022) for more details.

  • PDE: The PDE (Partial Differential Equation) method, where the source term and particle contributions are evaluated together (delta-f).
  • None: No weight evolution is applied.
Here is the call graph for this function:

◆ Species() [3/4]

template<class Device >
Species< Device >::Species ( SpeciesType  sp_type,
int  n_ptl 
)
inline

◆ Species() [4/4]

template<class Device >
Species< Device >::Species ( int  n_ptl_in)
inline
Here is the call graph for this function:

Member Function Documentation

◆ back_up_SoA()

template<class Device >
void Species< Device >::back_up_SoA ( Cabana::AoSoA< ParticleDataTypes, Device, VEC_LEN > &  backup_SoA,
int  offset,
int  n 
) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear_backup_phase()

template<class Device >
void Species< Device >::clear_backup_phase ( )
inline
Here is the caller graph for this function:

◆ copy_particles_from_device()

template<class Device >
void Species< Device >::copy_particles_from_device ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_particles_from_device_if_not_resident()

template<class Device >
void Species< Device >::copy_particles_from_device_if_not_resident ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_particles_from_device_if_resident()

template<class Device >
void Species< Device >::copy_particles_from_device_if_resident ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_particles_to_device()

template<class Device >
void Species< Device >::copy_particles_to_device ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_particles_to_device_if_not_resident()

template<class Device >
void Species< Device >::copy_particles_to_device_if_not_resident ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_particles_to_device_if_resident()

template<class Device >
void Species< Device >::copy_particles_to_device_if_resident ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_phase0_to_device_if_not_resident()

template<class Device >
void Species< Device >::copy_phase0_to_device_if_not_resident ( )
inline
Here is the caller graph for this function:

◆ copy_to_phase0()

template<class Device >
void Species< Device >::copy_to_phase0 ( Species< Device > &  species)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ eq_flow_ms()

template<class Device >
KOKKOS_INLINE_FUNCTION double Species< Device >::eq_flow_ms ( const MagneticField< DeviceType > &  magnetic_field,
double  psi_in,
double  r,
double  z,
double  bphi_over_b 
) const
inline
Here is the caller graph for this function:

◆ estimate_memory_usage()

template<class Device >
std::vector< MemoryPrediction > Species< Device >::estimate_memory_usage ( NLReader::NamelistReader nlr,
const Grid< DeviceType > &  grid,
const DomainDecomposition< DeviceType > &  pol_decomp,
int  species_idx 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ for_all_particles() [1/2]

template<class Device >
template<typename F >
void Species< Device >::for_all_particles ( const std::string  label,
lambda_func 
) const
inline

Loops over particles and calls a parallel_for, with no particle movement

Parameters
[in]labelis the label of the parallel_for used for debugging
[in]lambda_funcis the lambda function. Must be copy [=] not by reference
Here is the call graph for this function:
Here is the caller graph for this function:

◆ for_all_particles() [2/2]

template<class Device >
template<typename F >
void Species< Device >::for_all_particles ( const std::string  label,
lambda_func,
const PtlMvmt  mvmt,
LaunchBounds  launch_bounds = LaunchBounds::Default 
)
inline

Loops over particles and calls a parallel_for, with particle being moved where requested

Parameters
[in]labelis the label of the parallel_for used for debugging
[in]lambda_funcis the lambda function. Must be copy [=] not by reference
[in]mvmtspecifies whether particles need to be sent to device or host
[in]launch_boundsspecifies whether to use default launch bounds or custom
Here is the call graph for this function:

◆ for_particle_range()

template<class Device >
template<typename F >
void Species< Device >::for_particle_range ( int  begin_idx,
int  end_idx,
const std::string  label,
lambda_func 
) const
inline

Loops over a subset of particles and calls a parallel_for, with no particle movement

Parameters
[in]labelis the label of the parallel_for used for debugging
[in]lambda_funcis the lambda function. Must be copy [=] not by reference
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_f0_eq_thermal_velocity()

template<class Device >
KOKKOS_INLINE_FUNCTION double Species< Device >::get_f0_eq_thermal_velocity ( int  inode) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_f0_eq_thermal_velocity_lnode()

template<class Device >
KOKKOS_INLINE_FUNCTION double Species< Device >::get_f0_eq_thermal_velocity_lnode ( int  inode) const
inline
Here is the call graph for this function:

◆ get_f0_eq_thermal_velocity_lnode_h()

template<class Device >
KOKKOS_INLINE_FUNCTION double Species< Device >::get_f0_eq_thermal_velocity_lnode_h ( int  inode) const
inline
Here is the call graph for this function:

◆ get_f0_fg_unit_velocity_lnode_h()

template<class Device >
KOKKOS_INLINE_FUNCTION double Species< Device >::get_f0_fg_unit_velocity_lnode_h ( int  inode) const
inline
Here is the call graph for this function:

◆ get_fg_gyro_radius()

template<class Device >
KOKKOS_INLINE_FUNCTION double Species< Device >::get_fg_gyro_radius ( int  inode,
double  smu_n,
double  bfield 
) const
inline

◆ get_initial_n_ptl()

template<class Device >
int Species< Device >::get_initial_n_ptl ( NLReader::NamelistReader nlr,
const Grid< DeviceType > &  grid,
const DomainDecomposition< DeviceType > &  pol_decomp,
int  species_idx,
bool  verbose 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_max_gid()

template<class Device >
long long int Species< Device >::get_max_gid
Here is the caller graph for this function:

◆ get_max_n_ptl()

template<class Device >
int Species< Device >::get_max_n_ptl ( )
inline
Here is the caller graph for this function:

◆ get_particle_velocity_and_nearest_node()

template<class Device >
KOKKOS_INLINE_FUNCTION void Species< Device >::get_particle_velocity_and_nearest_node ( const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field,
const DomainDecomposition< DeviceType > &  pol_decomp,
SimdParticles part,
Simd< double > &  smu,
Simd< double > &  vp,
Simd< int > &  nearest_node,
Simd< bool > &  not_in_triangle,
Simd< bool > &  not_in_poloidal_domain 
) const
inline
Here is the call graph for this function:

◆ get_ptl_write_total_and_offsets()

template<class Device >
void Species< Device >::get_ptl_write_total_and_offsets ( const DomainDecomposition< DeviceType > &  pol_decomp,
long long int &  inum_total,
long long int &  ioff 
) const
Here is the call graph for this function:

◆ get_total_n_ptl()

template<class Device >
long long int Species< Device >::get_total_n_ptl ( )
inline
Here is the caller graph for this function:

◆ get_tr_save()

template<class Device >
KOKKOS_INLINE_FUNCTION void Species< Device >::get_tr_save ( int  i_item,
Simd< int > &  itr 
) const
inline
Here is the caller graph for this function:

◆ initialize_global_f0_arrays()

template<class Device >
void Species< Device >::initialize_global_f0_arrays ( const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ move_phase0_from_device_if_not_resident()

template<class Device >
void Species< Device >::move_phase0_from_device_if_not_resident ( )
inline
Here is the caller graph for this function:

◆ ph0()

template<class Device >
KOKKOS_INLINE_FUNCTION VecPhase* Species< Device >::ph0 ( ) const
inline
Here is the caller graph for this function:

◆ phase0_is_stored()

template<class Device >
bool Species< Device >::phase0_is_stored ( ) const
inline
Here is the caller graph for this function:

◆ ptl()

template<class Device >
KOKKOS_INLINE_FUNCTION VecParticles* Species< Device >::ptl ( ) const
inline
Here is the caller graph for this function:

◆ read_f0_checkpoint_files()

template<class Device >
void Species< Device >::read_f0_checkpoint_files ( const DomainDecomposition< DeviceType > &  pol_decomp,
const XGC_IO_Stream stream,
std::string  sp_name 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_initial_distribution()

template<class Device >
void Species< Device >::read_initial_distribution ( NLReader::NamelistReader nlr,
const DomainDecomposition< DeviceType > &  pol_decomp 
)
Here is the call graph for this function:

◆ read_ptl_checkpoint_files()

template<class Device >
void Species< Device >::read_ptl_checkpoint_files ( const DomainDecomposition< DeviceType > &  pol_decomp,
const XGC_IO_Stream stream,
std::string  sp_name,
bool  n_ranks_is_same,
int  version 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resize_device_particles() [1/2]

template<class Device >
void Species< Device >::resize_device_particles ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resize_device_particles() [2/2]

template<class Device >
void Species< Device >::resize_device_particles ( int  new_n_ptl)
inline
Here is the call graph for this function:

◆ resize_host_particles_to_match_device()

template<class Device >
void Species< Device >::resize_host_particles_to_match_device ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resize_particles()

template<class Device >
void Species< Device >::resize_particles ( int  new_n_ptl)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ restore_backup_SoA()

template<class Device >
void Species< Device >::restore_backup_SoA ( Cabana::AoSoA< ParticleDataTypes, Device, VEC_LEN > &  backup_SoA,
int  offset,
int  n 
) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ restore_particles_from_backup()

template<class Device >
void Species< Device >::restore_particles_from_backup ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ restore_phase_from_phase0()

template<class Device >
KOKKOS_INLINE_FUNCTION void Species< Device >::restore_phase_from_phase0 ( const AoSoAIndices< Device > &  inds,
SimdParticles part_one 
) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_backup_particles()

template<class Device >
void Species< Device >::save_backup_particles ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_buffer_particles_d()

template<class Device >
void Species< Device >::set_buffer_particles_d ( )
inline

Fills the remainder of the last AoSoA vector with realistic-looking particles (clones of the final particle). Since gid is set to -1, they will basically act as tracers in the kernel. Ideally garbage data in this buffer doesn't affect anything, but better to be safe here

Returns
void
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_buffer_phase0_d()

template<class Device >
void Species< Device >::set_buffer_phase0_d ( )
inline

Fills the remainder of the last AoSoA phase0 vector with realistic-looking particles (clones of the final particle). Since gid is set to -1, they will basically act as tracers in the kernel. Ideally garbage data in this buffer doesn't affect anything, but better to be safe here

Returns
void
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unassign_host_particles()

template<class Device >
void Species< Device >::unassign_host_particles ( )
inline
Here is the caller graph for this function:

◆ update_decomposed_f0_calculations()

template<class Device >
void Species< Device >::update_decomposed_f0_calculations ( const DomainDecomposition< DeviceType > &  pol_decomp,
const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field,
const VelocityGrid vgrid 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_f0_checkpoint_files()

template<class Device >
void Species< Device >::write_f0_checkpoint_files ( const DomainDecomposition< DeviceType > &  pol_decomp,
const XGC_IO_Stream stream,
std::string  sp_name 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_ptl_checkpoint_files()

template<class Device >
void Species< Device >::write_ptl_checkpoint_files ( const DomainDecomposition< DeviceType > &  pol_decomp,
const XGC_IO_Stream stream,
std::string  sp_name 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ backup_particles

template<class Device >
Cabana::AoSoA<ParticleDataTypes,HostType,VEC_LEN> Species< Device >::backup_particles

Copy of particles to be restored for RK2.

◆ backup_particles_d

template<class Device >
Cabana::AoSoA<ParticleDataTypes,DeviceType,VEC_LEN> Species< Device >::backup_particles_d

Copy of particles to be restored for RK2.

◆ backup_particles_on_device

template<class Device >
bool Species< Device >::backup_particles_on_device

◆ c2_2m

template<class Device >
double Species< Device >::c2_2m

c2/2m

◆ c_m

template<class Device >
double Species< Device >::c_m

c/m

◆ charge

template<class Device >
double Species< Device >::charge

Particle charge.

◆ charge_eu

template<class Device >
double Species< Device >::charge_eu

Particle charge in eu.

◆ collision_grid_index

template<class Device >
int Species< Device >::collision_grid_index

Which collision grid to use.

◆ dynamic_f0

template<class Device >
bool Species< Device >::dynamic_f0

Whether f0 can evolve in time.

◆ eq_den

template<class Device >
Eq::Profile<Device> Species< Device >::eq_den

◆ eq_fg_flow

template<class Device >
Eq::Profile<Device> Species< Device >::eq_fg_flow

◆ eq_fg_flow_type

template<class Device >
int Species< Device >::eq_fg_flow_type

◆ eq_fg_temp

template<class Device >
Eq::Profile<Device> Species< Device >::eq_fg_temp

◆ eq_flow

template<class Device >
Eq::Profile<Device> Species< Device >::eq_flow

◆ eq_flow_type

template<class Device >
int Species< Device >::eq_flow_type

◆ eq_mk_den

template<class Device >
Eq::Profile<Device> Species< Device >::eq_mk_den

◆ eq_mk_flow

template<class Device >
Eq::Profile<Device> Species< Device >::eq_mk_flow

◆ eq_mk_flow_type

template<class Device >
int Species< Device >::eq_mk_flow_type

◆ eq_mk_temp

template<class Device >
Eq::Profile<Device> Species< Device >::eq_mk_temp

◆ eq_temp

template<class Device >
Eq::Profile<Device> Species< Device >::eq_temp

◆ f0

template<class Device >
Distribution<Device> Species< Device >::f0

Species distribution in velocity space on local mesh nodes.

◆ f_analytic_shape

template<class Device >
FAnalyticShape Species< Device >::f_analytic_shape

f_analytic_shape shape: Maxwellian, SlowingDown or None

◆ gyro_avg_matrices

template<class Device >
GyroAverageMatrices<Device> Species< Device >::gyro_avg_matrices

◆ idx

template<class Device >
int Species< Device >::idx

Index in all_species.

◆ is_adiabatic

template<class Device >
bool Species< Device >::is_adiabatic

Whether this species is adiabatic.

◆ is_electron

template<class Device >
bool Species< Device >::is_electron

Whether this species is the electrons.

◆ kintype

template<class Device >
KinType Species< Device >::kintype

Whether the species is gyrokinetic or drift kinetic.

◆ marker_type

template<class Device >
MarkerType Species< Device >::marker_type

Marker type: reduced delta-f, total-f, full-f, or none (placeholder for adiabatic species)

◆ mass

template<class Device >
double Species< Device >::mass

Particle mass.

◆ maxwellian_init

template<class Device >
bool Species< Device >::maxwellian_init

whether initial distribution is maxwellian

◆ minimum_ptl_reservation

template<class Device >
int Species< Device >::minimum_ptl_reservation

The minimum reservation size for particles.

◆ n_backup_particles

template<class Device >
int Species< Device >::n_backup_particles

◆ n_ptl

template<class Device >
int Species< Device >::n_ptl

Number of particles.

◆ ncycles

template<class Device >
int Species< Device >::ncycles

Number of subcycles.

◆ ncycles_between_sorts

template<class Device >
int Species< Device >::ncycles_between_sorts

Number of subcycles between sorts.

◆ nonadiabatic_idx

template<class Device >
int Species< Device >::nonadiabatic_idx

Index of species skipping adiabatic species (for compatibility with fortran arrays)

◆ owns_particles_d

template<class Device >
bool Species< Device >::owns_particles_d

Whether the species owns the device particle allocation right now.

◆ particles

template<class Device >
Cabana::AoSoA<ParticleDataTypes,HostType,VEC_LEN> Species< Device >::particles

Particles.

◆ particles_are_backed_up

template<class Device >
bool Species< Device >::particles_are_backed_up

Whether particles are currently backed up.

◆ particles_d

template<class Device >
Cabana::AoSoA<ParticleDataTypes,Device,VEC_LEN> Species< Device >::particles_d

Particles on device.

◆ particles_resident_on_device

template<class Device >
bool Species< Device >::particles_resident_on_device

Whether the particles can reside on device.

◆ phase0

template<class Device >
Cabana::AoSoA<PhaseDataTypes,HostType,VEC_LEN> Species< Device >::phase0

◆ phase0_d

template<class Device >
Cabana::AoSoA<PhaseDataTypes,Device,VEC_LEN> Species< Device >::phase0_d

◆ RK_restoration_method

template<class Device >
RKRestorationMethod Species< Device >::RK_restoration_method

Currently, electrons must use first method and ions must use second.

Whether to restore particles on original rank, or to carry phase0 to new rank and restore there.

◆ stream_particles

template<class Device >
bool Species< Device >::stream_particles

Whether to stream particles between host and device if possible.

◆ tr_save

template<class Device >
View<int*,CLayout,Device> Species< Device >::tr_save

◆ weight_evo_eq

template<class Device >
WeightEvoEq Species< Device >::weight_evo_eq

Specifies the weight evolution equation method: Direct, PDE, or None.

  • Direct integration: Is used in the Total-F method, where the source term and particle contributions are evaluated separately. Refer to Section II C of Hager et al., Phys. Plasmas 29, 112308 (2022) for more details.
  • PDE: The PDE (Partial Differential Equation) method, where the source term and particle contributions are evaluated together (delta-f).
  • None: No weight evolution is applied.

The documentation for this class was generated from the following files: