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

Writes mode-resolved B-spline fields and kinetic moments to HDF5. More...

#include "diagnostic_bspline.hpp"

Static Public Member Functions

static void diag_increment_counter ()
 Advance field/moment cadence counters and set this-step write flags.
 
static void diag_init ()
 Create per-mode HDF5 files, datasets, and cadence state.
 
static void diag_write_mom_e (const Kokkos::View< Complex *** > &mom, int mode)
 Append electron drift-kinetic moment coefficients.
 
static void diag_write_mom_ePas (const Kokkos::View< Complex ** > &mom, int mode)
 Append passing-electron moment coefficients.
 
static void diag_write_mom_eTrp (const Kokkos::View< Complex ** > &mom, int mode)
 Append trapped-electron moment coefficients.
 
static void diag_write_mom_i (const Kokkos::View< Complex *** > &mom, int mode)
 Append ion gyroaveraged moment coefficients.
 
static void diag_write_mom_igc (const Kokkos::View< Complex *** > &mom, int mode)
 Append ion guiding-centre moment coefficients.
 
static void diag_write_momSN (const Kokkos::View< Complex *** > &mom, const std::string &label)
 Append signal-to-noise moment data to the current run file.
 
static void diag_write_phi (const Kokkos::View< Complex * > &phi, int mode)
 Append electrostatic spline coefficients for one toroidal mode.
 
static void diag_write_rhs (const Kokkos::View< Complex * > &rhs, int mode)
 Append quasineutrality-equation RHS coefficients.
 
static void diag_write_src (const Kokkos::View< Complex * > &rhs, int mode)
 Backsolve an RHS and append its source coefficients.
 
static std::string format_mode_str (int mode)
 Format a signed toroidal mode for paths.
 
static std::string format_run_str ()
 
static int get_counter_mom ()
 
static int get_counter_mom_timestep ()
 
static int get_counter_phi ()
 
static int get_counter_phi_timestep ()
 
static Real get_current_time ()
 
static std::string get_diag_filename (int mode)
 Return the B-spline diagnostic filename for one mode.
 
static bool isDiagnoseMomThisTimeStep ()
 
static bool isDiagnosePhiThisTimeStep ()
 
static bool isNotLocked ()
 
static void reset_state ()
 Reset all cadence counters and write flags for deterministic tests.
 

Detailed Description

Writes mode-resolved B-spline fields and kinetic moments to HDF5.

Independent cadence counters gate field and moment output. Each toroidal Fourier mode is written in the same complex coefficient layout used by the field solver, enabling post-processing without reconstructing real-space fields first.

Fortran reference diagnostic/diagnostic_bspline.F90, module diagnostic_bspline.

Member Function Documentation

◆ diag_increment_counter()

static void orb5x::DiagnosticBSpline::diag_increment_counter ( )
static

Advance field/moment cadence counters and set this-step write flags.

◆ diag_init()

static void orb5x::DiagnosticBSpline::diag_init ( )
static

Create per-mode HDF5 files, datasets, and cadence state.

◆ diag_write_mom_e()

static void orb5x::DiagnosticBSpline::diag_write_mom_e ( const Kokkos::View< Complex *** > &  mom,
int  mode 
)
static

Append electron drift-kinetic moment coefficients.

Parameters
[in]momValues shaped [subgroup][moment][radial coefficient].
[in]modeSigned global toroidal mode number.

◆ diag_write_mom_ePas()

static void orb5x::DiagnosticBSpline::diag_write_mom_ePas ( const Kokkos::View< Complex ** > &  mom,
int  mode 
)
static

Append passing-electron moment coefficients.

Parameters
[in]momValues shaped [moment][radial coefficient].
[in]modeSigned global toroidal mode number.

◆ diag_write_mom_eTrp()

static void orb5x::DiagnosticBSpline::diag_write_mom_eTrp ( const Kokkos::View< Complex ** > &  mom,
int  mode 
)
static

Append trapped-electron moment coefficients.

Parameters
[in]momValues shaped [moment][radial coefficient].
[in]modeSigned global toroidal mode number.

◆ diag_write_mom_i()

static void orb5x::DiagnosticBSpline::diag_write_mom_i ( const Kokkos::View< Complex *** > &  mom,
int  mode 
)
static

Append ion gyroaveraged moment coefficients.

Parameters
[in]momValues shaped [subgroup][moment][radial coefficient].
[in]modeSigned global toroidal mode number.

◆ diag_write_mom_igc()

static void orb5x::DiagnosticBSpline::diag_write_mom_igc ( const Kokkos::View< Complex *** > &  mom,
int  mode 
)
static

Append ion guiding-centre moment coefficients.

Parameters
[in]momValues shaped [subgroup][moment][radial coefficient].
[in]modeSigned global toroidal mode number.

◆ diag_write_momSN()

static void orb5x::DiagnosticBSpline::diag_write_momSN ( const Kokkos::View< Complex *** > &  mom,
const std::string &  label 
)
static

Append signal-to-noise moment data to the current run file.

Parameters
[in]momArray [moment][radial coefficient][toroidal mode].
[in]labelDataset/species label such as ePas or ions.

◆ diag_write_phi()

static void orb5x::DiagnosticBSpline::diag_write_phi ( const Kokkos::View< Complex * > &  phi,
int  mode 
)
static

Append electrostatic spline coefficients for one toroidal mode.

Parameters
[in]phiComplex radial/poloidal coefficient vector.
[in]modeSigned global toroidal mode number.

◆ diag_write_rhs()

static void orb5x::DiagnosticBSpline::diag_write_rhs ( const Kokkos::View< Complex * > &  rhs,
int  mode 
)
static

Append quasineutrality-equation RHS coefficients.

Parameters
[in]rhsComplex RHS coefficient vector.
[in]modeSigned global toroidal mode number.

◆ diag_write_src()

static void orb5x::DiagnosticBSpline::diag_write_src ( const Kokkos::View< Complex * > &  rhs,
int  mode 
)
static

Backsolve an RHS and append its source coefficients.

Parameters
[in]rhsComplex equation RHS; the caller's view is not modified.
[in]modeSigned global toroidal mode number.

◆ format_mode_str()

static std::string orb5x::DiagnosticBSpline::format_mode_str ( int  mode)
static

Format a signed toroidal mode for paths.

Parameters
[in]modeSigned global toroidal mode number.
Returns
Stable zero-padded mode string used by the Fortran-compatible schema.

◆ format_run_str()

static std::string orb5x::DiagnosticBSpline::format_run_str ( )
static
Returns
Formatted current run/restart identifier.

◆ get_counter_mom()

static int orb5x::DiagnosticBSpline::get_counter_mom ( )
inlinestatic
Returns
Number of moment records written.

◆ get_counter_mom_timestep()

static int orb5x::DiagnosticBSpline::get_counter_mom_timestep ( )
inlinestatic
Returns
Elapsed steps in the current moment-output cadence.

◆ get_counter_phi()

static int orb5x::DiagnosticBSpline::get_counter_phi ( )
inlinestatic
Returns
Number of potential records written.

◆ get_counter_phi_timestep()

static int orb5x::DiagnosticBSpline::get_counter_phi_timestep ( )
inlinestatic
Returns
Elapsed steps in the current potential-output cadence.

◆ get_current_time()

static Real orb5x::DiagnosticBSpline::get_current_time ( )
static
Returns
Current normalized simulation time from global step state.

◆ get_diag_filename()

static std::string orb5x::DiagnosticBSpline::get_diag_filename ( int  mode)
static

Return the B-spline diagnostic filename for one mode.

Parameters
[in]modeSigned global toroidal mode number.
Returns
Output filename for the active run and mode.

◆ isDiagnoseMomThisTimeStep()

static bool orb5x::DiagnosticBSpline::isDiagnoseMomThisTimeStep ( )
static
Returns
true when kinetic moments are scheduled on the current step.

◆ isDiagnosePhiThisTimeStep()

static bool orb5x::DiagnosticBSpline::isDiagnosePhiThisTimeStep ( )
static
Returns
true when potential output is scheduled on the current step.

◆ isNotLocked()

static bool orb5x::DiagnosticBSpline::isNotLocked ( )
static
Returns
true when output is initialized and available for writing.

◆ reset_state()

static void orb5x::DiagnosticBSpline::reset_state ( )
inlinestatic

Reset all cadence counters and write flags for deterministic tests.


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