1 #ifndef PUSH_DIAGNOSTIC_HPP
2 #define PUSH_DIAGNOSTIC_HPP
16 template<PushDiagToggle PDT>
36 KOKKOS_INLINE_FUNCTION
const Simd<double>& operator [](
int i)
const {
return vd[i];}
37 KOKKOS_INLINE_FUNCTION
Simd<double>& operator [](
int i) {
return vd[i];}
40 vd[
PSI][i_simd] = psi[i_simd];
42 vd[BPHI][i_simd] = bfield.
phi[i_simd];
43 vd[V_ExB_GRADPSI][i_simd] = yp_exb[
PIR]*gradpsi.
r[i_simd] + yp_exb[
PIZ]*gradpsi.
z[i_simd];
44 vd[V_d_GRADPSI][i_simd] = yprime.
r[i_simd]*gradpsi.
r[i_simd] + yprime.
z[i_simd]*gradpsi.
z[i_simd];
45 vd[GRADPSI2][i_simd] = gradpsi.
r[i_simd]*gradpsi.
r[i_simd] + gradpsi.
z[i_simd]*gradpsi.
z[i_simd];
47 vd[V_d_B_POL][i_simd] = (yprime.
r[i_simd]*bfield.
r[i_simd] + yprime.
z[i_simd]*bfield.
z[i_simd])/Bp;
48 vd[V_ExB_B_POL][i_simd] = (yp_exb[
PIR]*bfield.
r[i_simd] + yp_exb[
PIZ]*bfield.
z[i_simd])/Bp;
49 vd[TDB_GRADPSI][i_simd] = fac * (tdb.
r[i_simd]*gradpsi.
r[i_simd] + tdb.
z[i_simd]*gradpsi.
z[i_simd]);
56 template<
class Device>
65 Kokkos::View<double****,Kokkos::LayoutRight,Device>
d1d_f_pv1;
66 Kokkos::View<double****,Kokkos::LayoutRight,Device>
d1d_df_pv1;
77 KOKKOS_INLINE_FUNCTION
void scatter_single_diag(
bool is_deltaf,
int ithread,
int isp,
int ip,
double w,
double dw,
double wp,
int i_v,
double v)
const;
84 template<
class Device>
Simd< double > r
Definition: simd.hpp:150
VF_DIAG
Definition: push_diagnostic.hpp:21
Definition: perturbed_B_field.hpp:12
Definition: push_diagnostic.hpp:26
KOKKOS_INLINE_FUNCTION void d1d_port1(const Grid< Device > &grid, const Species< Device > &species, const MagneticField< Device > &magnetic_field, const SimdParticles &part, const SimdPhase &derivs, int isp, const VFDiag< PushDiagToggle::On > &vf) const
Definition: push_diagnostic.tpp:73
Definition: push_diagnostic.hpp:20
Definition: push_diagnostic.hpp:17
Definition: push_controls.hpp:9
Definition: NamelistReader.hpp:193
Definition: magnetic_field.hpp:13
Definition: electric_field.hpp:40
Definition: push_diagnostic.hpp:29
int d1d_period
steps between diag recording
Definition: push_diagnostic.hpp:62
KOKKOS_INLINE_FUNCTION void set(int i_simd, double fac, const Simd< double > &psi, double B, const SimdVector &bfield, const SimdVector2D &gradpsi, const SimdVector &tdb, const double(&yp_exb)[3], const SimdPhase &yprime)
Definition: push_diagnostic.hpp:39
subroutine derivs(x, phi, dx)
Definition: field_following.F90:97
Definition: push_diagnostic.hpp:27
D1D_PV1
Definition: push_diagnostic.hpp:11
Definition: push_diagnostic.hpp:28
KOKKOS_INLINE_FUNCTION double poloidal_magnitude(const int i_simd) const
Definition: simd.hpp:181
Kokkos::View< double ****, Kokkos::LayoutRight, Device > d1d_df_pv1
Array of delta f diagnostic quantities (optional)
Definition: push_diagnostic.hpp:66
r coordinate
Definition: globals.hpp:186
KOKKOS_INLINE_FUNCTION void push_diagnostics_c(const Grid< Device > &grid, const MagneticField< Device > &magnetic_field, const ElectricField< Device > &electric_field, const PushDiagnostic< Device > &diag, const PushControls &push_controls, const Species< Device > &species, const PerturbedBField< Device > &perturbed_B_field, int)
Simd< double > r
Definition: particles.hpp:18
Definition: push_diagnostic.hpp:24
Simd< double > z
Definition: simd.hpp:141
KOKKOS_INLINE_FUNCTION void scatter_single_diag(bool is_deltaf, int ithread, int isp, int ip, double w, double dw, double wp, int i_v, double v) const
Definition: push_diagnostic.tpp:58
PushDiagnostic()
Definition: push_diagnostic.hpp:72
Simd< double > phi
Definition: simd.hpp:152
Definition: particles.hpp:58
Simd< double > z
Definition: simd.hpp:151
Definition: push_diagnostic.hpp:25
Simd< double > z
Definition: particles.hpp:19
Simd< double > r
Definition: simd.hpp:140
Definition: magnetic_field.F90:1
Definition: particles.hpp:17
Definition: push_diagnostic.hpp:57
PushDiagToggle
Definition: push_diagnostic.hpp:8
Definition: push_diagnostic.hpp:12
VFDiag< PushDiagToggle::On > VF
Definition: push_diagnostic.hpp:53
bool determine_diag_on(int istep, int ipc)
Definition: push_diagnostic.tpp:24
Definition: species.hpp:75
Definition: push_diagnostic.hpp:30
z coordinate
Definition: globals.hpp:187
Kokkos::View< double ****, Kokkos::LayoutRight, Device > d1d_f_pv1
Array of diagnostic quantities.
Definition: push_diagnostic.hpp:65
Definition: push_diagnostic.hpp:23
Definition: tracer_diag.cpp:62