#include <species.hpp>
|
| 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, bool is_deltaf_in, int ncycles_in) |
|
template<class GridDevice > |
| Species (NLReader::NamelistReader &nlr, const Grid< GridDevice > &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 |
|
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
VecParticles * | ptl () const |
|
KOKKOS_INLINE_FUNCTION VecPhase * | ph0 () const |
|
void | copy_to_phase0 (Species< Device > &species) |
|
void | save_backup_particles () |
|
void | restore_particles_from_backup () |
|
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_f0_eq_gyro_radius (int inode, double smu_n, double bfield) const |
|
KOKKOS_INLINE_FUNCTION double | get_f0_eq_thermal_velocity (int inode) const |
|
|
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...
|
|
bool | is_deltaf |
| Whether this species is deltaf. 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...
|
|
int | n_backup_particles |
|
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 |
|
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, |
|
|
bool |
is_deltaf_in, |
|
|
int |
ncycles_in |
|
) |
| |
Constructor for species class used in collisions kernel
template<class Device >
template<class GridDevice >
Constructor for species class
template<class Device>
void Species< Device >::copy_particles_from_device |
( |
| ) |
|
|
inline |
template<class Device>
void Species< Device >::copy_particles_from_device_if_not_resident |
( |
| ) |
|
|
inline |
template<class Device>
void Species< Device >::copy_particles_from_device_if_resident |
( |
| ) |
|
|
inline |
template<class Device>
void Species< Device >::copy_particles_to_device |
( |
| ) |
|
|
inline |
template<class Device>
void Species< Device >::copy_particles_to_device_if_not_resident |
( |
| ) |
|
|
inline |
template<class Device>
void Species< Device >::copy_particles_to_device_if_resident |
( |
| ) |
|
|
inline |
template<class Device>
template<typename F >
void Species< Device >::for_all_particles |
( |
const std::string |
label, |
|
|
F |
lambda_func |
|
) |
| const |
|
inline |
Loops over particles and calls a parallel_for, with no particle movement
- Parameters
-
[in] | label | is the label of the parallel_for used for debugging |
[in] | lambda_func | is the lambda function. Must be copy [=] not by reference |
template<class Device>
template<typename F >
Loops over particles and calls a parallel_for, with particle being moved where requested
- Parameters
-
[in] | label | is the label of the parallel_for used for debugging |
[in] | lambda_func | is the lambda function. Must be copy [=] not by reference |
[in] | mvmt | specifies whether particles need to be sent to device or host |
[in] | launch_bounds | specifies whether to use default launch bounds or custom |
template<class Device>
KOKKOS_INLINE_FUNCTION double Species< Device >::get_f0_eq_gyro_radius |
( |
int |
inode, |
|
|
double |
smu_n, |
|
|
double |
bfield |
|
) |
| const |
|
inline |
template<class Device>
KOKKOS_INLINE_FUNCTION double Species< Device >::get_f0_eq_thermal_velocity |
( |
int |
inode | ) |
const |
|
inline |
template<class Device>
int Species< Device >::get_max_n_ptl |
( |
| ) |
|
|
inline |
template<class Device>
long long int Species< Device >::get_total_n_ptl |
( |
| ) |
|
|
inline |
template<class Device>
void Species< Device >::resize_device_particles |
( |
| ) |
|
|
inline |
template<class Device>
void Species< Device >::resize_device_particles |
( |
int |
new_n_ptl | ) |
|
|
inline |
template<class Device>
void Species< Device >::resize_host_particles_to_match_device |
( |
| ) |
|
|
inline |
template<class Device>
void Species< Device >::resize_particles |
( |
int |
new_n_ptl | ) |
|
|
inline |
template<class Device>
void Species< Device >::restore_particles_from_backup |
( |
| ) |
|
|
inline |
template<class Device>
void Species< Device >::save_backup_particles |
( |
| ) |
|
|
inline |
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
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
template<class Device>
void Species< Device >::unassign_host_particles |
( |
| ) |
|
|
inline |
Copy of particles to be restored for RK2.
template<class Device>
double Species< Device >::charge_eu |
template<class Device>
int Species< Device >::collision_grid_index |
Which collision grid to use.
Species distribution in velocity space on local mesh nodes.
template<class Device>
bool Species< Device >::is_adiabatic |
Whether this species is adiabatic.
Whether this species is deltaf.
template<class Device>
bool Species< Device >::is_electron |
Whether this species is the electrons.
Whether the species is gyrokinetic or drift kinetic.
template<class Device>
int Species< Device >::minimum_ptl_reservation |
The minimum reservation size for particles.
template<class Device>
int Species< Device >::n_backup_particles |
template<class Device>
int Species< Device >::ncycles_between_sorts |
Number of subcycles between sorts.
template<class Device>
int Species< Device >::nonadiabatic_idx |
Index of species skipping adiabatic species (for compatibility with fortran arrays)
template<class Device>
bool Species< Device >::owns_particles_d |
Whether the species owns the device particle allocation right now.
template<class Device>
bool Species< Device >::particles_are_backed_up |
Whether particles are currently backed up.
template<class Device>
bool Species< Device >::particles_resident_on_device |
Whether the particles can reside on device.
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.
template<class Device>
bool Species< Device >::stream_particles |
Whether to stream particles between host and device if possible.
The documentation for this class was generated from the following files:
- /u/gitlab-xgc/builds/YGMz2TJ8/0/xgc/XGC-Devel/XGC_core/cpp/species.hpp
- /u/gitlab-xgc/builds/YGMz2TJ8/0/xgc/XGC-Devel/XGC_core/cpp/species.tpp