ORB5X 1.0.0
Performance-portable global electromagnetic gyrokinetic PIC code
orb5x::Moments Class Reference

Deposits gyrokinetic and drift-kinetic velocity moments for spectral diagnostics. More...

#include "moments.hpp"

Static Public Member Functions

static int compute_subgroup (int isp, Real vpar, Real vperp, Real T, Real m, Real ftrap)
 Classify a marker into its velocity/trapping diagnostic subgroup.
 
static void computeDriftKineticMoment (int isp, int npart_loc, const Kokkos::View< Real ** > &pic1_loc, const Kokkos::View< Real ** > &pic2_loc, Real dens0, bool diag3D)
 Deposit guiding-centre moments without finite-Larmor-radius averaging.
 
static void computeGyrokineticMoment (int isp, int npart_loc, const Kokkos::View< Real ** > &pic1_loc, const Kokkos::View< Real ** > &pic2_loc, int nsel_gyr_loc, Real dens0, bool diag3D)
 Deposit Larmor-ring-averaged moments for one kinetic species.
 
static void destroyMoments ()
 Release all moment arrays before Kokkos::finalize().
 
static void initMoments ()
 Allocate and zero enabled species/subgroup moment arrays.
 

Static Public Attributes

static Kokkos::View< Complex **** > mom_e {}
 Electron drift-kinetic moments in the same layout.
 
static Kokkos::View< Complex **** > mom_i {}
 Ion gyroaveraged moments by subgroup, moment, radius, and mode.
 
static Kokkos::View< Complex **** > mom_igc {}
 Ion guiding-centre moments in the same layout.
 
static constexpr int NBMOM = 4
 Number of stored one-dimensional velocity moments.
 
static constexpr int NBMOM_2D = 4
 Number of stored two-dimensional moment channels.
 
static int nsign = 1
 Number of parallel-velocity sign partitions.
 

Detailed Description

Deposits gyrokinetic and drift-kinetic velocity moments for spectral diagnostics.

Gyrokinetic ions are sampled around their Larmor rings; drift-kinetic species are sampled at guiding centres. Moments are separated into velocity subgroups and stored as complex B-spline/Fourier coefficients.

Fortran reference diagnostic/moments.F90, module moments.

Member Function Documentation

◆ compute_subgroup()

static int orb5x::Moments::compute_subgroup ( int  isp,
Real  vpar,
Real  vperp,
Real  T,
Real  m,
Real  ftrap 
)
static

Classify a marker into its velocity/trapping diagnostic subgroup.

Parameters
[in]ispZero-based species index.
[in]vparNormalized parallel velocity.
[in]vperpNormalized perpendicular speed.
[in]TLocal normalized temperature.
[in]mSpecies normalized mass.
[in]ftrapLocal trapped-particle fraction.
Returns
Zero-based subgroup index used by moment arrays.

◆ computeDriftKineticMoment()

static void orb5x::Moments::computeDriftKineticMoment ( int  isp,
int  npart_loc,
const Kokkos::View< Real ** > &  pic1_loc,
const Kokkos::View< Real ** > &  pic2_loc,
Real  dens0,
bool  diag3D 
)
static

Deposit guiding-centre moments without finite-Larmor-radius averaging.

Parameters
[in]ispZero-based species index.
[in]npart_locNumber of active local markers.
[in]pic1_locPrimary marker attributes.
[in]pic2_locSecondary/invariant marker attributes.
[in]dens0Density normalization.
[in]diag3DWhether to also accumulate real-space 3-D fluid moments.

◆ computeGyrokineticMoment()

static void orb5x::Moments::computeGyrokineticMoment ( int  isp,
int  npart_loc,
const Kokkos::View< Real ** > &  pic1_loc,
const Kokkos::View< Real ** > &  pic2_loc,
int  nsel_gyr_loc,
Real  dens0,
bool  diag3D 
)
static

Deposit Larmor-ring-averaged moments for one kinetic species.

Parameters
[in]ispZero-based species index.
[in]npart_locNumber of active local markers.
[in]pic1_locPrimary marker attributes.
[in]pic2_locSecondary/invariant marker attributes.
[in]nsel_gyr_locGyroaveraging rule selector.
[in]dens0Density normalization.
[in]diag3DWhether to also accumulate real-space 3-D fluid moments.

◆ destroyMoments()

static void orb5x::Moments::destroyMoments ( )
static

Release all moment arrays before Kokkos::finalize().

◆ initMoments()

static void orb5x::Moments::initMoments ( )
static

Allocate and zero enabled species/subgroup moment arrays.

Member Data Documentation

◆ mom_e

Kokkos::View<Complex****> orb5x::Moments::mom_e {}
inlinestatic

Electron drift-kinetic moments in the same layout.

◆ mom_i

Kokkos::View<Complex****> orb5x::Moments::mom_i {}
inlinestatic

Ion gyroaveraged moments by subgroup, moment, radius, and mode.

◆ mom_igc

Kokkos::View<Complex****> orb5x::Moments::mom_igc {}
inlinestatic

Ion guiding-centre moments in the same layout.

◆ NBMOM

constexpr int orb5x::Moments::NBMOM = 4
staticconstexpr

Number of stored one-dimensional velocity moments.

◆ NBMOM_2D

constexpr int orb5x::Moments::NBMOM_2D = 4
staticconstexpr

Number of stored two-dimensional moment channels.

◆ nsign

int orb5x::Moments::nsign = 1
inlinestatic

Number of parallel-velocity sign partitions.


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