XGC1
|
#include "globals.hpp"
#include "push_controls.hpp"
#include "magnetic_field.hpp"
#include "grid.hpp"
#include "particles.hpp"
#include "species.hpp"
#include "perturbed_B_field.hpp"
Functions | |
KOKKOS_INLINE_FUNCTION void | get_ExB_drift (double D, double drift_on, const SimdVector &bfield, const SimdVector &E, int i_simd, double over_B2, double inv_r, double(&yp_exb)[3]) |
KOKKOS_INLINE_FUNCTION double | get_denergy_dt_es (double charge, int i_simd, const SimdVector &bfield, const SimdVector &tdb, const SimdVector &E, double rho, double vp, double mu, double B, double c_m, double over_B, double over_B2, double dbdr, double dbdz, double dbdphi, const double(&curl_B)[3], const double drift_on, double D) |
KOKKOS_INLINE_FUNCTION double | get_denergy_dt_em (double mass, int i_simd, const Simd< double > &f0flow, const Simd< double > &Epar_em, const double(&Bs)[3], const double(&Bsa)[3], const double(&dXdt)[3], double fr_pert, double fz_pert, double fp_pert, double fr_mag, double fz_mag, double fp_mag, double vp, double mu, double B, double c_m, double over_B, double dbdr, double dbdz, double dbdphi, double D) |
template<MarkerType MT> | |
KOKKOS_INLINE_FUNCTION double | get_dfdp (double mass, double vp, double mu, double B, double inv_temp, const LocalEquilProfiles< MT > &local_equil_profiles, int i_simd) |
KOKKOS_INLINE_FUNCTION double | get_dweight (double dfdp, const SimdVector2D &gradpsi, int i_simd, const double(&yp)[3], double dEdtT) |
template<MarkerType MT> | |
KOKKOS_INLINE_FUNCTION double | get_dw1 (double mass, double charge, bool is_electron, const PushControls &push_controls, int i_simd, double w2, double r, const SimdVector &bfield, const SimdVector2D &gradpsi, const SimdVector &tdb, const LocalFields &fld, const LocalEquilProfiles< MT > &local_equil_profiles, const double(&Bs)[3], const double(&Bsa)[3], double fr_pert, double fz_pert, double fp_pert, double fr2, double fz2, double fp2, double inv_r, double rho, double vp, double mu, double B, double c_m, double over_B, double over_B2, double dbdr, double dbdz, double dbdphi, const double(&curl_B)[3], const double drift_on, double D, double yp_r, double yp_z, double yp_p) |
KOKKOS_INLINE_FUNCTION void | get_yp_pert (double D, const double(&Bs)[3], const double(&Bsa)[3], const SimdVector &bfield, double vp, double c_m, const Simd< double > &Ah, double fr_pert, double fz_pert, double fp_pert, double over_B, double over_B2, double inv_r, int i_simd, double(&yp_pert)[3]) |
KOKKOS_INLINE_FUNCTION double | get_adiabatic_response (const SimdVector &E, const SimdVector &E00, const Simd< double > &ddpotdt, double yp_r, double yp_z, double yp_p, double r, double inv_temp, int i_simd) |
template<> | |
KOKKOS_INLINE_FUNCTION double | get_dw1< MarkerType::ReducedDeltaF > (double mass, double charge, bool is_electron, const PushControls &push_controls, int i_simd, double w2, double r, const SimdVector &bfield, const SimdVector2D &gradpsi, const SimdVector &tdb, const LocalFields &fld, const LocalEquilProfiles< MarkerType::ReducedDeltaF > &local_equil_profiles, const double(&Bs)[3], const double(&Bsa)[3], double fr_pert, double fz_pert, double fp_pert, double fr2, double fz2, double fp2, double inv_r, double rho, double vp, double mu, double B, double c_m, double over_B, double over_B2, double dbdr, double dbdz, double dbdphi, const double(&curl_B)[3], const double drift_on, double D, double yp_r, double yp_z, double yp_p) |
KOKKOS_INLINE_FUNCTION double | get_nb_curl_nb (double over_B2, const SimdVector &bfield, const SimdVector(&jacb)[3], double inv_r, int i_simd) |
template<class Device , PushDiagToggle PDT> | |
KOKKOS_INLINE_FUNCTION void | derivs_elec (const PushControls &push_controls, const Species< Device > &species, const SimdParticles &part, const Simd< double > &inv_r_vec, const SimdVector &bfield, const Simd< double > &B_mag, const SimdVector(&jacb)[3], const Simd< double > &psi, const SimdVector2D &gradpsi, const SimdVector &tdb, const LocalFields &fld, const LocalEquilProfiles< MT_GLOBAL > &local_equil_profiles, SimdPhase &yprime, VFDiag< PDT > &vf_diag) |
KOKKOS_INLINE_FUNCTION void derivs_elec | ( | const PushControls & | push_controls, |
const Species< Device > & | species, | ||
const SimdParticles & | part, | ||
const Simd< double > & | inv_r_vec, | ||
const SimdVector & | bfield, | ||
const Simd< double > & | B_mag, | ||
const SimdVector(&) | jacb[3], | ||
const Simd< double > & | psi, | ||
const SimdVector2D & | gradpsi, | ||
const SimdVector & | tdb, | ||
const LocalFields & | fld, | ||
const LocalEquilProfiles< MT_GLOBAL > & | local_equil_profiles, | ||
SimdPhase & | yprime, | ||
VFDiag< PDT > & | vf_diag | ||
) |
Get the phase derivatives of a vector of particles
[in] | part | Vector of particles |
[in] | inv_r_vec | Vector of 1/r (1/r_axis in cylindrical limit) |
[in] | bfield | Vector of magnetic fields |
[in] | B_mag | Vector of bfield magnitudes |
[in] | jacb | Vector of jacobians |
[in] | psi | Vector of psi coordinates |
[in] | gradpsi | Vector of psi gradients (r,z) |
[in] | tdb | Vector of perturbed magnetic field |
[in] | efield | Vector of electric fields |
[in] | efield00 | Vector of 00 electric fields for DELTAF_CONV |
[in] | ddpotdt | Vector of dPotential/dt for DELTAF_CONV |
[in] | f0den | Vector of f0 density for DELTAF_CONV |
[in] | f0dden | Vector of d[f0 density]/dpsi for DELTAF_CONV |
[in] | f0tev | Vector of f0 temperature in eV for DELTAF_CONV |
[in] | f0dtev | Vector of d[f0 tempearture]/dpsi for DELTAF_CONV |
[in] | dAh,Ah,dAs,As | : Vector of vector potentials for EXPLICIT_EM. Minus sign included in dAh and dAs |
[out] | yprime | Vector of derivatives of the particle phases |
[out] | vf_diag | Optional vector of quantities for diagnostic |
KOKKOS_INLINE_FUNCTION double get_adiabatic_response | ( | const SimdVector & | E, |
const SimdVector & | E00, | ||
const Simd< double > & | ddpotdt, | ||
double | yp_r, | ||
double | yp_z, | ||
double | yp_p, | ||
double | r, | ||
double | inv_temp, | ||
int | i_simd | ||
) |
KOKKOS_INLINE_FUNCTION double get_denergy_dt_em | ( | double | mass, |
int | i_simd, | ||
const Simd< double > & | f0flow, | ||
const Simd< double > & | Epar_em, | ||
const double(&) | Bs[3], | ||
const double(&) | Bsa[3], | ||
const double(&) | dXdt[3], | ||
double | fr_pert, | ||
double | fz_pert, | ||
double | fp_pert, | ||
double | fr_mag, | ||
double | fz_mag, | ||
double | fp_mag, | ||
double | vp, | ||
double | mu, | ||
double | B, | ||
double | c_m, | ||
double | over_B, | ||
double | dbdr, | ||
double | dbdz, | ||
double | dbdphi, | ||
double | D | ||
) |
KOKKOS_INLINE_FUNCTION double get_denergy_dt_es | ( | double | charge, |
int | i_simd, | ||
const SimdVector & | bfield, | ||
const SimdVector & | tdb, | ||
const SimdVector & | E, | ||
double | rho, | ||
double | vp, | ||
double | mu, | ||
double | B, | ||
double | c_m, | ||
double | over_B, | ||
double | over_B2, | ||
double | dbdr, | ||
double | dbdz, | ||
double | dbdphi, | ||
const double(&) | curl_B[3], | ||
const double | drift_on, | ||
double | D | ||
) |
KOKKOS_INLINE_FUNCTION double get_dfdp | ( | double | mass, |
double | vp, | ||
double | mu, | ||
double | B, | ||
double | inv_temp, | ||
const LocalEquilProfiles< MT > & | local_equil_profiles, | ||
int | i_simd | ||
) |
KOKKOS_INLINE_FUNCTION double get_dw1 | ( | double | mass, |
double | charge, | ||
bool | is_electron, | ||
const PushControls & | push_controls, | ||
int | i_simd, | ||
double | w2, | ||
double | r, | ||
const SimdVector & | bfield, | ||
const SimdVector2D & | gradpsi, | ||
const SimdVector & | tdb, | ||
const LocalFields & | fld, | ||
const LocalEquilProfiles< MT > & | local_equil_profiles, | ||
const double(&) | Bs[3], | ||
const double(&) | Bsa[3], | ||
double | fr_pert, | ||
double | fz_pert, | ||
double | fp_pert, | ||
double | fr2, | ||
double | fz2, | ||
double | fp2, | ||
double | inv_r, | ||
double | rho, | ||
double | vp, | ||
double | mu, | ||
double | B, | ||
double | c_m, | ||
double | over_B, | ||
double | over_B2, | ||
double | dbdr, | ||
double | dbdz, | ||
double | dbdphi, | ||
const double(&) | curl_B[3], | ||
const double | drift_on, | ||
double | D, | ||
double | yp_r, | ||
double | yp_z, | ||
double | yp_p | ||
) |
KOKKOS_INLINE_FUNCTION double get_dw1< MarkerType::ReducedDeltaF > | ( | double | mass, |
double | charge, | ||
bool | is_electron, | ||
const PushControls & | push_controls, | ||
int | i_simd, | ||
double | w2, | ||
double | r, | ||
const SimdVector & | bfield, | ||
const SimdVector2D & | gradpsi, | ||
const SimdVector & | tdb, | ||
const LocalFields & | fld, | ||
const LocalEquilProfiles< MarkerType::ReducedDeltaF > & | local_equil_profiles, | ||
const double(&) | Bs[3], | ||
const double(&) | Bsa[3], | ||
double | fr_pert, | ||
double | fz_pert, | ||
double | fp_pert, | ||
double | fr2, | ||
double | fz2, | ||
double | fp2, | ||
double | inv_r, | ||
double | rho, | ||
double | vp, | ||
double | mu, | ||
double | B, | ||
double | c_m, | ||
double | over_B, | ||
double | over_B2, | ||
double | dbdr, | ||
double | dbdz, | ||
double | dbdphi, | ||
const double(&) | curl_B[3], | ||
const double | drift_on, | ||
double | D, | ||
double | yp_r, | ||
double | yp_z, | ||
double | yp_p | ||
) |
KOKKOS_INLINE_FUNCTION double get_dweight | ( | double | dfdp, |
const SimdVector2D & | gradpsi, | ||
int | i_simd, | ||
const double(&) | yp[3], | ||
double | dEdtT | ||
) |
KOKKOS_INLINE_FUNCTION void get_ExB_drift | ( | double | D, |
double | drift_on, | ||
const SimdVector & | bfield, | ||
const SimdVector & | E, | ||
int | i_simd, | ||
double | over_B2, | ||
double | inv_r, | ||
double(&) | yp_exb[3] | ||
) |
KOKKOS_INLINE_FUNCTION double get_nb_curl_nb | ( | double | over_B2, |
const SimdVector & | bfield, | ||
const SimdVector(&) | jacb[3], | ||
double | inv_r, | ||
int | i_simd | ||
) |
KOKKOS_INLINE_FUNCTION void get_yp_pert | ( | double | D, |
const double(&) | Bs[3], | ||
const double(&) | Bsa[3], | ||
const SimdVector & | bfield, | ||
double | vp, | ||
double | c_m, | ||
const Simd< double > & | Ah, | ||
double | fr_pert, | ||
double | fz_pert, | ||
double | fp_pert, | ||
double | over_B, | ||
double | over_B2, | ||
double | inv_r, | ||
int | i_simd, | ||
double(&) | yp_pert[3] | ||
) |