XGC1
|
#include "rng_seed.hpp"
#include "globals.hpp"
#include "basic_physics.hpp"
#include "linear_1d_interpolation.hpp"
#include "sml.hpp"
#include "magnetic_field.hpp"
#include "grid.hpp"
#include "plasma.hpp"
#include "get_current_triangles.hpp"
#include "grid_field_pack.hpp"
#include "getf0.hpp"
#include "shift.hpp"
Classes | |
struct | ParticleLoadingParams |
struct | LoadingFactor |
struct | InitialWeights |
Functions | |
double * | get_grid_qsafety_loc () |
double * | get_grid_theta_loc () |
int * | get_grid_psi_surf_map_loc () |
template<GeometryType GT> | |
KOKKOS_INLINE_FUNCTION double | r_distribution (double rdim, double roffset, double rand) |
template<> | |
KOKKOS_INLINE_FUNCTION double | r_distribution< GeometryType::CylindricalLimit > (double rdim, double roffset, double rand) |
template<> | |
KOKKOS_INLINE_FUNCTION double | r_distribution< GeometryType::Toroidal > (double rdim, double roffset, double rand) |
void | uniform_spatial_distribution (const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, const ParticleLoadingParams &input_params, const LoadingFactor &loading_factor, double &marker_den, const View< double *, DeviceType > &marker_den_tri, Species< DeviceType > &species) |
KOKKOS_INLINE_FUNCTION void | get_v_and_dist (RandGen &rand_gen, double va, double vc, double w, double &v, double &g) |
KOKKOS_INLINE_FUNCTION void | load_flat_v_single (RandGen &rand_gen, const ParticleLoadingParams &input_params, double t_ev_mk, double up, double b, double mass, double charge, double normalization, double &rho, double &mu, double &v_marker_den) |
KOKKOS_INLINE_FUNCTION void | load_maxwellian_v_single (RandGen &rand_gen, const ParticleLoadingParams &input_params, double t_ev, double t_ev_virtual, double up, double b, double mass, double charge, double &rho, double &mu, double &v_marker_den) |
View< double *, CLayout, DeviceType > | remapped_qsafety (const Grid< DeviceType > &grid) |
void | velocity_distribution (const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const ParticleLoadingParams &input_params, double marker_den, const View< double *, DeviceType > &marker_den_tri, const InitialWeights &initial_weights, Species< DeviceType > &species) |
void | adjust_initial_distribution (const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, Species< DeviceType > &species, const VelocityGrid &vgrid, const DomainDecomposition< DeviceType > &pol_decomp) |
void | load_single_particle (NLReader::NamelistReader &nlr, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, const VelocityGrid &vgrid, Plasma &plasma) |
void | initialize_particles (NLReader::NamelistReader &nlr, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, const VelocityGrid &vgrid, Plasma &plasma) |
Variables | |
constexpr double | LOAD_MAXE = 12.0 |
void adjust_initial_distribution | ( | const Grid< DeviceType > & | grid, |
const MagneticField< DeviceType > & | magnetic_field, | ||
Species< DeviceType > & | species, | ||
const VelocityGrid & | vgrid, | ||
const DomainDecomposition< DeviceType > & | pol_decomp | ||
) |
int* get_grid_psi_surf_map_loc | ( | ) |
double* get_grid_qsafety_loc | ( | ) |
double* get_grid_theta_loc | ( | ) |
KOKKOS_INLINE_FUNCTION void get_v_and_dist | ( | RandGen & | rand_gen, |
double | va, | ||
double | vc, | ||
double | w, | ||
double & | v, | ||
double & | g | ||
) |
void initialize_particles | ( | NLReader::NamelistReader & | nlr, |
const Grid< DeviceType > & | grid, | ||
const MagneticField< DeviceType > & | magnetic_field, | ||
const DomainDecomposition< DeviceType > & | pol_decomp, | ||
const VelocityGrid & | vgrid, | ||
Plasma & | plasma | ||
) |
Load particles
KOKKOS_INLINE_FUNCTION void load_flat_v_single | ( | RandGen & | rand_gen, |
const ParticleLoadingParams & | input_params, | ||
double | t_ev_mk, | ||
double | up, | ||
double | b, | ||
double | mass, | ||
double | charge, | ||
double | normalization, | ||
double & | rho, | ||
double & | mu, | ||
double & | v_marker_den | ||
) |
KOKKOS_INLINE_FUNCTION void load_maxwellian_v_single | ( | RandGen & | rand_gen, |
const ParticleLoadingParams & | input_params, | ||
double | t_ev, | ||
double | t_ev_virtual, | ||
double | up, | ||
double | b, | ||
double | mass, | ||
double | charge, | ||
double & | rho, | ||
double & | mu, | ||
double & | v_marker_den | ||
) |
void load_single_particle | ( | NLReader::NamelistReader & | nlr, |
const Grid< DeviceType > & | grid, | ||
const MagneticField< DeviceType > & | magnetic_field, | ||
const DomainDecomposition< DeviceType > & | pol_decomp, | ||
const VelocityGrid & | vgrid, | ||
Plasma & | plasma | ||
) |
KOKKOS_INLINE_FUNCTION double r_distribution | ( | double | rdim, |
double | roffset, | ||
double | rand | ||
) |
Returns an r coordinate distribution for even distribution in volume. In the cylindrical limit, this means an even r distribution. For toroidal geometry, this means larger r values are sampled more.
[in] | rdim | is the width of the r range |
[in] | roffset | is the minimum r |
[in] | rand | is a random number from 0.0 to 1.0 |
KOKKOS_INLINE_FUNCTION double r_distribution< GeometryType::CylindricalLimit > | ( | double | rdim, |
double | roffset, | ||
double | rand | ||
) |
KOKKOS_INLINE_FUNCTION double r_distribution< GeometryType::Toroidal > | ( | double | rdim, |
double | roffset, | ||
double | rand | ||
) |
View<double*, CLayout,DeviceType> remapped_qsafety | ( | const Grid< DeviceType > & | grid | ) |
void uniform_spatial_distribution | ( | const Grid< DeviceType > & | grid, |
const MagneticField< DeviceType > & | magnetic_field, | ||
const DomainDecomposition< DeviceType > & | pol_decomp, | ||
const ParticleLoadingParams & | input_params, | ||
const LoadingFactor & | loading_factor, | ||
double & | marker_den, | ||
const View< double *, DeviceType > & | marker_den_tri, | ||
Species< DeviceType > & | species | ||
) |
Load particles
void velocity_distribution | ( | const Grid< DeviceType > & | grid, |
const MagneticField< DeviceType > & | magnetic_field, | ||
const ParticleLoadingParams & | input_params, | ||
double | marker_den, | ||
const View< double *, DeviceType > & | marker_den_tri, | ||
const InitialWeights & | initial_weights, | ||
Species< DeviceType > & | species | ||
) |
Load particles with velocity
constexpr double LOAD_MAXE = 12.0 |