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

Coordinates charge/current deposition, spectral filtering, field solves, and interpolation. More...

#include "fields.hpp"

+ Collaboration diagram for orb5x::FieldsModule:

Public Member Functions

void add_field_attributes (FieldType &field, int &natts, int isp)
 Reserve particle-attribute slots required by a field for one species.
 
void apply_filter ()
 Apply the primary spectral mode filter to the active RHS.
 
void apply_filter2 ()
 Apply the secondary spectral mode filter.
 
void backsolve (int nsel_backsolve)
 Backsolve the selected Fourier finite-element system.
 
void backsolve_generic (int matnum, Kokkos::View< Complex ** > &rhs_f)
 Backsolve a selected matrix against a Fourier right-hand side.
 
void bspl2fft ()
 Transform the active B-spline right-hand side to Fourier representation.
 
void bspl2fft_pptransp_serial (const Kokkos::View< Real *** > &rho_bspl_loc, Kokkos::View< Complex ** > &rhs_f_loc, bool trace_mass_forward=false)
 Serial B-spline-to-Fourier transform for transpose-based paths.
 
void clear_fdiag_energy_host_cache ()
 Invalidate host mirrors used by field-energy diagnostics.
 
void compute_density_1d_fluxest (int isp)
 Compute the flux-estimator radial density.
 
void compute_density_1d_marker (int isp)
 Compute the direct marker-estimator radial density.
 
void compute_rhospecmn (int isp, int mdim, int ndim, std::vector< Real > &spec, std::vector< Real > &spec_loc) const
 Compute local and globally reduced (m,n) charge spectra.
 
void copy_fields ()
 Advance/copy stored field time levels required by the integration scheme.
 
void copyin_field_gpu ()
 Synchronize field metadata and coefficients needed by device kernels.
 
void correct_current ()
 Apply continuity and model corrections to deposited parallel current.
 
void create_field_bspl (FieldType &field, bool computephibar=true, bool transform=true)
 Back-transform a field RHS into B-spline coefficients.
 
void create_rhs ()
 Assemble the active Fourier-space right-hand side from deposited moments.
 
void create_rhs_mass_bspl2fft_serial (const Kokkos::View< Real *** > &rho_bspl_loc, Kokkos::View< Complex ** > &rhs_f_loc)
 Build and transform the serial mass-matrix RHS.
 
void create_rhs_pptransp (int no_species_flag, bool filter_flag, const Kokkos::View< Real **** > &rho_bspl_loc, Kokkos::View< Complex ** > &rhs_f_loc, int sig2noi, bool transform)
 Assemble a mass-style spectral RHS for transpose-based paths.
 
void fdiag_energy (int isp, int step)
 Accumulate electrostatic/electromagnetic field energy by radius.
 
void fdiag_fields (int step)
 Write configured field profiles and spectra.
 
void fft2bspl ()
 Transform the active Fourier solution to B-spline representation.
 
void fft2bspl_pptransp_serial (const Kokkos::View< Complex ** > &rhs_f_loc, Kokkos::View< Real *** > &field_bspl_loc)
 Serial Fourier-to-B-spline inverse transform.
 
void fieldP2fieldC (int matnum, const Kokkos::View< Real *** > &zarrP, Kokkos::View< Real *** > &zarrC)
 Transform projected B-spline coefficients to solution coefficients.
 
 FieldsModule ()=default
 Construct an uninitialized field module.
 
Real func_init_potential (Real ps, Real chit, Real phit)
 Evaluate the configured analytic initial electrostatic potential.
 
Kokkos::View< int *** > get_filter (int iact, int mshift)
 Return a poloidally shifted spectral-filter mask.
 
Real get_phi0 (Real s, Real chi)
 Interpolate the toroidally axisymmetric electrostatic potential.
 
void get_pot_disp (int isp, bool run_on_device)
 Interpolate configured field values and gradients to every marker.
 
Real getpot (Real s, Real chi, Real phi_val)
 Interpolate electrostatic potential from the current spline coefficients.
 
Real getpot (Real s, Real chi, Real phi_val, const Kokkos::View< Real *** > &field_bspl)
 Interpolate supplied tensor-product B-spline coefficients.
 
Real getpot_host_cached (Real s, Real chi, Real phi_val, const Kokkos::View< Real * >::HostMirror &host_sgrid, const Kokkos::View< Real * >::HostMirror &host_chigrid, const Kokkos::View< Real * >::HostMirror &host_phigrid, const Kokkos::View< Real *** >::HostMirror &host_field_bspl)
 Host-mirror implementation of tensor-product B-spline interpolation.
 
void getrhoav ()
 Compute flux-surface-averaged density from deposited spline coefficients.
 
void init_field (FieldType &field)
 Allocate one field and initialize its per-species requirement metadata.
 
void init_filter ()
 Build spectral filter masks and retained mode bounds.
 
void init_mode_distribution (int &width_f)
 Distribute toroidal modes among MPI ranks.
 
void init_module ()
 Allocate grids, fields, filters, solver workspaces, and MPI mode metadata.
 
void initgrids ()
 Construct uniform field grids and their inverse spacings.
 
void initialize_fem ()
 Build finite-element matrices, transforms, and solver-side state.
 
void matmul_ami (int matnum, const Kokkos::View< Real *** > &zarrC, Kokkos::View< Real *** > &zarrP)
 Multiply solution coefficients by a selected matrix, \(P=M C\).
 
void output_back_pot ()
 Write the equilibrium background-potential profile.
 
void polarisation_terms_P0Q0 (int isp, Real sigma, Real chi, Real sigmat, Real chit, int ithread, int lnaveg, Real diag_weight, Real ephi)
 Accumulate the P0/Q0 polarization terms for one marker.
 
void profrz (const Kokkos::View< Real * > &sarr, const Kokkos::View< Real * > &chiarr, Kokkos::View< Real *** > &potsc, Kokkos::View< Real *** > &potsp, Kokkos::View< Real ** > &rsc, Kokkos::View< Real ** > &zsc, int field_select, int slice)
 Sample a selected field on \((s,\chi)\) and \((s,\varphi)\) planes.
 
void profrz_host (const Kokkos::View< Real * >::HostMirror &host_sarr, const Kokkos::View< Real * >::HostMirror &host_chiarr, Kokkos::View< Real *** >::HostMirror &host_potsc, Kokkos::View< Real *** >::HostMirror &host_potsp, Kokkos::View< Real ** >::HostMirror &host_rsc, Kokkos::View< Real ** >::HostMirror &host_zsc, int field_select, int slice)
 Host-mirror implementation of profrz().
 
void read_write_field_data_disp (bool read_flag, int datn)
 Read or write a numbered field checkpoint.
 
void set_apar_ramp (Real time)
 Apply the configured time ramp to parallel-vector-potential coefficients.
 
void setrho (int i_att)
 Select a deposited particle attribute as active charge density.
 
void setrho_species (int isp, bool is_first, bool is_last)
 Accumulate deposited charge for one species.
 
void solve_fem ()
 Assemble and solve the active finite-element quasineutrality/Ampere system.
 
void solve_mass_matrix ()
 Apply the mass-matrix solve to the module's active right-hand side.
 
void solve_mass_matrix_from_bspl (int adin, const Kokkos::View< Real *** > &rho_bspl_in, Kokkos::View< Real *** > &phi_bspl_out)
 Solve a mass-matrix projection between B-spline representations.
 
void spectrum2 (int ispec, int mdim, int ndim, std::vector< std::vector< Real > > &spec, std::vector< std::vector< Real > > &spec_loc, int isp=-1)
 Compute a two-dimensional poloidal/toroidal Fourier spectrum.
 
Real sphibar (Real s)
 Evaluate the flux-surface-averaged electrostatic potential.
 
Real sphibar_host_cached (Real s, const Kokkos::View< Real * >::HostMirror &host_zrhs0, const Kokkos::View< Real ** >::HostMirror &host_zwavg, const Kokkos::View< Real * >::HostMirror &host_sgrid)
 Evaluate sphibar() using already synchronized host mirrors.
 
void trace_getpot_host_cached_debug (Real s, Real chi, Real phi_val, const Kokkos::View< Real * >::HostMirror &host_sgrid, const Kokkos::View< Real * >::HostMirror &host_chigrid, const Kokkos::View< Real * >::HostMirror &host_phigrid, const Kokkos::View< Real *** >::HostMirror &host_field_bspl, int call_id, int ip, const char *label)
 Emit a detailed host interpolation trace for parity debugging.
 
void vecmatmul ()
 Apply configured finite-element matrices to the current field vectors.
 
 ~FieldsModule ()=default
 Release view handles; Kokkos owns their storage lifetime.
 

Static Public Member Functions

static void get_pot_disp (Real st, Real chit, Real phit, Real &pot, int field_select, int isp=-1)
 Interpolate the selected scalar field at one magnetic-coordinate point.
 
static void set_current_trace_context (int step, int rk)
 Set identifiers attached to parallel-current parity traces.
 
static void set_phi_trace_context (int step, int rk)
 Set identifiers attached to electrostatic-potential parity traces.
 

Public Attributes

FieldType apar
 Hamiltonian parallel vector potential \(A_\parallel\).
 
Kokkos::View< Real *** > apar_bspl_old
 Previous parallel-vector-potential coefficients.
 
Kokkos::View< Real *** > apar_ham_bspl
 Hamiltonian parallel-vector-potential coefficients.
 
FieldType apar_sympl
 Symplectic parallel vector potential.
 
Kokkos::View< int * > blsize
 Number of equations assigned to each radial block.
 
Kokkos::View< Real * > bnrm2
 Radial normalization used by field-energy integrals.
 
Kokkos::View< Real * > chigrid
 Uniform poloidal grid [rad].
 
Kokkos::View< Complex *** > crhs
 Complex spectral RHS before distributed transforms.
 
Kokkos::View< Complex *** > crhs_buffer
 MPI packing/unpacking workspace for spectral redistribution.
 
Kokkos::View< Complex *** > crhs_fft
 Complex RHS after local FFTs.
 
Kokkos::View< Complex *** > crhs_filtered
 Spectral RHS after mode filtering.
 
Kokkos::View< Real **** > curr_bspl
 Deposited parallel-current coefficients by species.
 
Kokkos::View< Real *** > curr_corr_bspl
 Corrected parallel-current coefficients.
 
Kokkos::View< Real *** > curr_sympl_bspl
 Symplectic parallel-current coefficients.
 
Kokkos::View< Real **** > curr_temp
 Temporary per-species parallel-current workspace.
 
Real dchigrid = 0.0
 Poloidal field-grid spacing [rad].
 
Real dchigrid_inv = 0.0
 Inverse poloidal spacing [rad \(^{-1}\)].
 
Kokkos::View< Real ** > density_1d_fluxest
 Flux-estimator radial density profile by species.
 
Kokkos::View< Real ** > density_1d_marker
 Direct marker-count radial density profile by species.
 
Kokkos::View< Complex * > Dfftmass
 Spectral mass-matrix factors for toroidal transforms.
 
int dim1 = 0
 First allocated dimension of spectral communication workspaces.
 
int dim2 = 0
 Second allocated dimension of spectral communication workspaces.
 
int dim3 = 0
 Third allocated dimension of spectral communication workspaces.
 
Real dphigrid = 0.0
 Toroidal field-grid spacing [rad].
 
Real dphigrid_inv = 0.0
 Inverse toroidal spacing [rad \(^{-1}\)].
 
Real dsgrid = 0.0
 Radial field-grid spacing.
 
Real dsgrid_inv = 0.0
 Inverse radial grid spacing.
 
Kokkos::View< Real *** > efield0_1D
 Zonal electrostatic/electromagnetic energy by radius and species.
 
Kokkos::View< Real *** > efield_nozf_1D
 Non-zonal electrostatic/electromagnetic energy by radius and species.
 
Kokkos::View< Real *** >::HostMirror fdiag_energy_host_apar
 Cached host mirror of Hamiltonian \(A_\parallel\).
 
Kokkos::View< Real *** >::HostMirror fdiag_energy_host_apar_sympl
 Cached host mirror of symplectic \(A_\parallel\).
 
int fdiag_energy_host_cache_step = -1
 Time step represented by the field-energy host mirrors.
 
Kokkos::View< Real **** >::HostMirror fdiag_energy_host_curr
 Cached host mirror of species parallel current.
 
Kokkos::View< Real *** >::HostMirror fdiag_energy_host_curr_sympl
 Cached host mirror of symplectic current.
 
Kokkos::View< Real *** >::HostMirror fdiag_energy_host_phi
 Cached host mirror of electrostatic potential.
 
Kokkos::View< Real **** >::HostMirror fdiag_energy_host_rho
 Cached host mirror of species charge density.
 
Kokkos::View< Real * > fftminv
 Inverse FFT normalization factors.
 
Kokkos::View< int *** > filter
 Primary mask of retained \((m,n)\) Fourier modes by surface.
 
Kokkos::View< int *** > filter2
 Secondary mask used by the alternate filter pass.
 
Kokkos::View< int[8]> filter_modes
 Enabled spectral-filter mode selectors.
 
Kokkos::View< int * > iblock
 Starting equation index of each radial block.
 
int islw = 0
 Lower radial B-spline coefficient bound.
 
int islw1 = 0
 Lower radial bound of the reduced/interior layout.
 
int islw_b = 0
 Lower radial bound of the background-potential table.
 
int isup = 0
 Upper radial B-spline coefficient bound.
 
int isup1 = 0
 Upper radial bound of the reduced/interior layout.
 
int isup_b = 0
 Upper radial bound of the background-potential table.
 
int jclw = 0
 Lower poloidal B-spline coefficient bound.
 
int jclw1 = 0
 Lower poloidal bound of the reduced/interior layout.
 
int jcup = 0
 Upper poloidal B-spline coefficient bound.
 
int jcup1 = 0
 Upper poloidal bound of the reduced/interior layout.
 
int kplw = 0
 Lower toroidal B-spline coefficient bound.
 
int kplw1 = 0
 Lower toroidal bound of the reduced/interior layout.
 
int kpup = 0
 Upper toroidal B-spline coefficient bound.
 
int kpup1 = 0
 Upper toroidal bound of the reduced/interior layout.
 
int lb [4] = {0, 0, 0, 0}
 Fortran lower bounds in \((s,\chi,\varphi,\mathrm{species})\) order.
 
bool lbuild = false
 Whether Fourier-space solver matrices must be constructed.
 
Kokkos::View< int * > local_n_disp
 Packed-buffer displacement for each rank's modes.
 
Kokkos::View< int * > local_n_end
 Last toroidal-mode index owned by each rank.
 
Kokkos::View< int * > local_n_modes
 Number of toroidal modes owned by each MPI rank.
 
Kokkos::View< int * > local_n_start
 First toroidal-mode index owned by each rank.
 
Kokkos::View< int *** > mbounds
 Packed lower/upper poloidal-mode bounds for filtering kernels.
 
Kokkos::View< int ** > mmax_f
 Locally retained maximum poloidal mode by surface/toroidal mode.
 
Kokkos::View< int ** > mmax_f_global
 Global maximum retained poloidal mode bounds.
 
Kokkos::View< int ** > mmin_f
 Locally retained minimum poloidal mode by surface/toroidal mode.
 
Kokkos::View< int ** > mmin_f_global
 Global minimum retained poloidal mode bounds.
 
Kokkos::View< Complex ** > mom_rhs
 Fourier-space species-moment right-hand side.
 
Kokkos::View< Real *** > mom_sp_bspl
 Species moment projected in B-spline space.
 
Kokkos::View< Real *** > moment_sp_bspl
 Species-summed moment coefficients used by field solves.
 
MPI_Datatype MPI_rtype_c = MPI_DATATYPE_NULL
 Receive datatype for complex spectral redistribution.
 
MPI_Datatype MPI_rtype_r = MPI_DATATYPE_NULL
 Receive datatype for real spectral redistribution.
 
MPI_Datatype MPI_stype_c = MPI_DATATYPE_NULL
 Send datatype for complex spectral redistribution.
 
MPI_Datatype MPI_stype_r = MPI_DATATYPE_NULL
 Send datatype for real spectral redistribution.
 
int nblocks_eff = 0
 Effective number of radial blocks used by the field decomposition.
 
Kokkos::View< Real *** > ne_bspl
 Electron density in B-spline space.
 
int neq = 0
 Number of real-space finite-element equations.
 
int neq_f = 0
 Number of Fourier-space finite-element equations.
 
Kokkos::View< Real *** > pe_bspl
 Electron pressure in B-spline space.
 
FieldType phi
 Electrostatic potential \(\phi\).
 
Kokkos::View< Real ** > phi0
 Toroidally axisymmetric \(n=0\) electrostatic potential.
 
Kokkos::View< Real *** > phi1_bspl
 First electrostatic-potential time level in B-spline space.
 
Kokkos::View< Real *** > phi2_bspl
 Second electrostatic-potential time level in B-spline space.
 
Kokkos::View< Real * > phib
 Radial boundary values for electrostatic potential.
 
Kokkos::View< Real * > phib2
 Secondary/time-level electrostatic boundary values.
 
Kokkos::View< Real * > phigrid
 Uniform toroidal grid [rad].
 
Kokkos::View< Real **** > rho_bspl
 Deposited gyrocentre charge-density coefficients by species.
 
Kokkos::View< Real *** > rho_mass_bspl
 Charge-density coefficients after mass-matrix processing.
 
Kokkos::View< Real ** > rho_passing_bspl
 Passing-particle density projected into the reduced spline layout.
 
Kokkos::View< Complex ** > rhs_f
 Active Fourier-space field-equation right-hand side.
 
Kokkos::View< Complex ** > rhs_f_adi_curr
 Adiabatic-current contribution in Fourier space.
 
Kokkos::View< Complex ** > rhs_f_amp
 Fourier right-hand side for Ampere's equation.
 
Kokkos::View< Complex ** > rhs_f_apar_sympl
 Fourier right-hand side for symplectic \(A_\parallel\).
 
Kokkos::View< Complex ** > rhs_f_lapl
 Fourier representation of the perpendicular-Laplacian contribution.
 
Kokkos::View< Complex ** > rhs_f_mass
 Fourier right-hand side for the mass-matrix solve.
 
Kokkos::View< Real ** > rhs_mass
 Real-space mass-matrix right-hand side.
 
Kokkos::View< Real ** > rhs_tmp
 Real-space temporary right-hand-side workspace.
 
Kokkos::View< Real * > sgrid
 Uniform \(s=\sqrt{\psi}\) field grid.
 
int ub [4] = {0, 0, 0, 0}
 Fortran upper bounds in \((s,\chi,\varphi,\mathrm{species})\) order.
 
Kokkos::View< Real *** > ue_bspl
 Electron parallel velocity in B-spline space.
 
int width_f = 0
 Maximum number of retained poloidal modes per surface.
 
int width_m = 0
 Maximum number of toroidal modes assigned to one rank.
 
Kokkos::View< Real * > zrhs0
 Radial coefficients of the zonal potential RHS.
 

Detailed Description

Coordinates charge/current deposition, spectral filtering, field solves, and interpolation.

FieldsModule bridges particle moments and the finite-element field solver. It owns the field-aligned grid and B-spline/Fourier workspaces, constructs quasineutrality and Ampere right-hand sides, distributes spectral modes over MPI ranks, solves for electrostatic and parallel-vector potentials, and interpolates those fields back to particle attributes and diagnostics.

Constructor & Destructor Documentation

◆ FieldsModule()

orb5x::FieldsModule::FieldsModule ( )
default

Construct an uninitialized field module.

◆ ~FieldsModule()

orb5x::FieldsModule::~FieldsModule ( )
default

Release view handles; Kokkos owns their storage lifetime.

Member Function Documentation

◆ add_field_attributes()

void orb5x::FieldsModule::add_field_attributes ( FieldType &  field,
int &  natts,
int  isp 
)

Reserve particle-attribute slots required by a field for one species.

Parameters
[in,out]fieldField whose particle-property indices are assigned.
[in,out]nattsRunning count of allocated real particle attributes.
[in]ispZero-based species index.

◆ apply_filter()

void orb5x::FieldsModule::apply_filter ( )

Apply the primary spectral mode filter to the active RHS.

◆ apply_filter2()

void orb5x::FieldsModule::apply_filter2 ( )

Apply the secondary spectral mode filter.

◆ backsolve()

void orb5x::FieldsModule::backsolve ( int  nsel_backsolve)

Backsolve the selected Fourier finite-element system.

Parameters
[in]nsel_backsolveMatrix/right-hand-side selector.

◆ backsolve_generic()

void orb5x::FieldsModule::backsolve_generic ( int  matnum,
Kokkos::View< Complex ** > &  rhs_f 
)

Backsolve a selected matrix against a Fourier right-hand side.

Parameters
[in]matnumSolver-matrix selector.
[in,out]rhs_fFourier RHS replaced by the solution coefficients.

◆ bspl2fft()

void orb5x::FieldsModule::bspl2fft ( )

Transform the active B-spline right-hand side to Fourier representation.

◆ bspl2fft_pptransp_serial()

void orb5x::FieldsModule::bspl2fft_pptransp_serial ( const Kokkos::View< Real *** > &  rho_bspl_loc,
Kokkos::View< Complex ** > &  rhs_f_loc,
bool  trace_mass_forward = false 
)

Serial B-spline-to-Fourier transform for transpose-based paths.

Parameters
[in]rho_bspl_locInput real B-spline coefficients.
[out]rhs_f_locOutput Fourier coefficients.
[in]trace_mass_forwardEmit the configured mass-transform parity trace.

◆ clear_fdiag_energy_host_cache()

void orb5x::FieldsModule::clear_fdiag_energy_host_cache ( )

Invalidate host mirrors used by field-energy diagnostics.

◆ compute_density_1d_fluxest()

void orb5x::FieldsModule::compute_density_1d_fluxest ( int  isp)

Compute the flux-estimator radial density.

Parameters
[in]ispZero-based species index.

◆ compute_density_1d_marker()

void orb5x::FieldsModule::compute_density_1d_marker ( int  isp)

Compute the direct marker-estimator radial density.

Parameters
[in]ispZero-based species index.

◆ compute_rhospecmn()

void orb5x::FieldsModule::compute_rhospecmn ( int  isp,
int  mdim,
int  ndim,
std::vector< Real > &  spec,
std::vector< Real > &  spec_loc 
) const

Compute local and globally reduced (m,n) charge spectra.

Parameters
[in]ispZero-based species index.
[in]mdimNumber of non-negative poloidal modes reported.
[in]ndimNumber of toroidal modes reported.
[out]specGlobally reduced flattened spectrum.
[out]spec_locRank-local flattened spectrum.

◆ copy_fields()

void orb5x::FieldsModule::copy_fields ( )

Advance/copy stored field time levels required by the integration scheme.

◆ copyin_field_gpu()

void orb5x::FieldsModule::copyin_field_gpu ( )

Synchronize field metadata and coefficients needed by device kernels.

◆ correct_current()

void orb5x::FieldsModule::correct_current ( )

Apply continuity and model corrections to deposited parallel current.

◆ create_field_bspl()

void orb5x::FieldsModule::create_field_bspl ( FieldType &  field,
bool  computephibar = true,
bool  transform = true 
)

Back-transform a field RHS into B-spline coefficients.

Parameters
[in,out]fieldField whose Fourier RHS is transformed into bspl.
[in]computephibarAlso update the flux-surface-averaged potential.
[in]transformPerform the inverse spectral transform when true.

◆ create_rhs()

void orb5x::FieldsModule::create_rhs ( )

Assemble the active Fourier-space right-hand side from deposited moments.

◆ create_rhs_mass_bspl2fft_serial()

void orb5x::FieldsModule::create_rhs_mass_bspl2fft_serial ( const Kokkos::View< Real *** > &  rho_bspl_loc,
Kokkos::View< Complex ** > &  rhs_f_loc 
)

Build and transform the serial mass-matrix RHS.

Parameters
[in]rho_bspl_locInput real B-spline coefficients.
[out]rhs_f_locOutput mass-matrix Fourier RHS.

◆ create_rhs_pptransp()

void orb5x::FieldsModule::create_rhs_pptransp ( int  no_species_flag,
bool  filter_flag,
const Kokkos::View< Real **** > &  rho_bspl_loc,
Kokkos::View< Complex ** > &  rhs_f_loc,
int  sig2noi,
bool  transform 
)

Assemble a mass-style spectral RHS for transpose-based paths.

Parameters
[in]no_species_flagSpecies summation/selection mode.
[in]filter_flagApply the configured spectral filter when true.
[in]rho_bspl_locInput deposited B-spline coefficients by species.
[out]rhs_f_locFourier-space right-hand side.
[in]sig2noiSignal-to-noise/filter selector retained from fields.F90.
[in]transformPerform the spectral transform when true.

◆ fdiag_energy()

void orb5x::FieldsModule::fdiag_energy ( int  isp,
int  step 
)

Accumulate electrostatic/electromagnetic field energy by radius.

Parameters
[in]ispZero-based species index.
[in]stepGlobal timestep index represented by the cached host fields.

◆ fdiag_fields()

void orb5x::FieldsModule::fdiag_fields ( int  step)

Write configured field profiles and spectra.

Parameters
[in]stepGlobal timestep index.

◆ fft2bspl()

void orb5x::FieldsModule::fft2bspl ( )

Transform the active Fourier solution to B-spline representation.

◆ fft2bspl_pptransp_serial()

void orb5x::FieldsModule::fft2bspl_pptransp_serial ( const Kokkos::View< Complex ** > &  rhs_f_loc,
Kokkos::View< Real *** > &  field_bspl_loc 
)

Serial Fourier-to-B-spline inverse transform.

Parameters
[in]rhs_f_locInput Fourier coefficients.
[out]field_bspl_locReconstructed real B-spline coefficients.

◆ fieldP2fieldC()

void orb5x::FieldsModule::fieldP2fieldC ( int  matnum,
const Kokkos::View< Real *** > &  zarrP,
Kokkos::View< Real *** > &  zarrC 
)

Transform projected B-spline coefficients to solution coefficients.

Parameters
[in]matnumSolver-matrix selector.
[in]zarrPProjection-space coefficients.
[out]zarrCSolution-space coefficients.

◆ func_init_potential()

Real orb5x::FieldsModule::func_init_potential ( Real  ps,
Real  chit,
Real  phit 
)

Evaluate the configured analytic initial electrostatic potential.

Parameters
[in]psToroidal-flux coordinate.
[in]chitPoloidal angle [rad].
[in]phitToroidal angle [rad].
Returns
Normalized analytic perturbation potential.

◆ get_filter()

Kokkos::View< int *** > orb5x::FieldsModule::get_filter ( int  iact,
int  mshift 
)

Return a poloidally shifted spectral-filter mask.

Parameters
[in]iactFilter/action selector used by the solver coupling.
[in]mshiftSigned poloidal mode-number shift.
Returns
Newly allocated integer mask in the primary filter layout.

◆ get_phi0()

Real orb5x::FieldsModule::get_phi0 ( Real  s,
Real  chi 
)

Interpolate the toroidally axisymmetric electrostatic potential.

Parameters
[in]sRadial coordinate s=sqrt(psi).
[in]chiPoloidal angle [rad].
Returns
Normalized axisymmetric electrostatic potential.

◆ get_pot_disp() [1/2]

void orb5x::FieldsModule::get_pot_disp ( int  isp,
bool  run_on_device 
)

Interpolate configured field values and gradients to every marker.

Parameters
[in]ispZero-based species index.
[in]run_on_deviceExecute the gather on the active Kokkos device when true.

◆ get_pot_disp() [2/2]

static void orb5x::FieldsModule::get_pot_disp ( Real  st,
Real  chit,
Real  phit,
Real &  pot,
int  field_select,
int  isp = -1 
)
static

Interpolate the selected scalar field at one magnetic-coordinate point.

Parameters
[in]stRadial coordinate s=sqrt(psi).
[in]chitPoloidal angle [rad].
[in]phitToroidal angle [rad].
[out]potInterpolated normalized field value.
[in]field_selectField selector defined by the get-potential constants.
[in]ispOptional zero-based species index for species-dependent fields.

◆ getpot() [1/2]

Real orb5x::FieldsModule::getpot ( Real  s,
Real  chi,
Real  phi_val 
)

Interpolate electrostatic potential from the current spline coefficients.

Parameters
[in]sRadial coordinate s=sqrt(psi).
[in]chiPoloidal angle [rad].
[in]phi_valToroidal angle [rad].
Returns
Normalized electrostatic potential.

◆ getpot() [2/2]

Real orb5x::FieldsModule::getpot ( Real  s,
Real  chi,
Real  phi_val,
const Kokkos::View< Real *** > &  field_bspl 
)

Interpolate supplied tensor-product B-spline coefficients.

Parameters
[in]sRadial coordinate s=sqrt(psi).
[in]chiPoloidal angle [rad].
[in]phi_valToroidal angle [rad].
[in]field_bsplField coefficients in the module's offset layout.
Returns
Interpolated normalized field value.

◆ getpot_host_cached()

Real orb5x::FieldsModule::getpot_host_cached ( Real  s,
Real  chi,
Real  phi_val,
const Kokkos::View< Real * >::HostMirror &  host_sgrid,
const Kokkos::View< Real * >::HostMirror &  host_chigrid,
const Kokkos::View< Real * >::HostMirror &  host_phigrid,
const Kokkos::View< Real *** >::HostMirror &  host_field_bspl 
)

Host-mirror implementation of tensor-product B-spline interpolation.

Parameters
[in]sRadial coordinate s=sqrt(psi).
[in]chiPoloidal angle [rad].
[in]phi_valToroidal angle [rad].
[in]host_sgridSynchronized host mirror of the radial grid.
[in]host_chigridSynchronized host mirror of the poloidal grid.
[in]host_phigridSynchronized host mirror of the toroidal grid.
[in]host_field_bsplSynchronized host field coefficients.
Returns
Interpolated normalized field value.

◆ getrhoav()

void orb5x::FieldsModule::getrhoav ( )

Compute flux-surface-averaged density from deposited spline coefficients.

◆ init_field()

void orb5x::FieldsModule::init_field ( FieldType &  field)

Allocate one field and initialize its per-species requirement metadata.

Parameters
[in,out]fieldField descriptor populated from active grid and solver sizes.

◆ init_filter()

void orb5x::FieldsModule::init_filter ( )

Build spectral filter masks and retained mode bounds.

◆ init_mode_distribution()

void orb5x::FieldsModule::init_mode_distribution ( int &  width_f)

Distribute toroidal modes among MPI ranks.

Parameters
[out]width_fMaximum retained poloidal width over local mode blocks.

◆ init_module()

void orb5x::FieldsModule::init_module ( )

Allocate grids, fields, filters, solver workspaces, and MPI mode metadata.

◆ initgrids()

void orb5x::FieldsModule::initgrids ( )

Construct uniform field grids and their inverse spacings.

◆ initialize_fem()

void orb5x::FieldsModule::initialize_fem ( )

Build finite-element matrices, transforms, and solver-side state.

◆ matmul_ami()

void orb5x::FieldsModule::matmul_ami ( int  matnum,
const Kokkos::View< Real *** > &  zarrC,
Kokkos::View< Real *** > &  zarrP 
)

Multiply solution coefficients by a selected matrix, \(P=M C\).

Parameters
[in]matnumMatrix selector.
[in]zarrCSolution-space B-spline coefficients.
[out]zarrPProjection-space coefficients.

◆ output_back_pot()

void orb5x::FieldsModule::output_back_pot ( )

Write the equilibrium background-potential profile.

◆ polarisation_terms_P0Q0()

void orb5x::FieldsModule::polarisation_terms_P0Q0 ( int  isp,
Real  sigma,
Real  chi,
Real  sigmat,
Real  chit,
int  ithread,
int  lnaveg,
Real  diag_weight,
Real  ephi 
)

Accumulate the P0/Q0 polarization terms for one marker.

Parameters
[in]ispZero-based species index.
[in]sigmaDeposition-point radial coordinate.
[in]chiDeposition-point poloidal angle [rad].
[in]sigmatGuiding-center radial coordinate.
[in]chitGuiding-center poloidal angle [rad].
[in]ithreadLogical diagnostic accumulator index.
[in]lnavegNumber of gyroaveraging points represented by this contribution.
[in]diag_weightMarker diagnostic/deposition weight.
[in]ephiElectrostatic energy contribution.

◆ profrz()

void orb5x::FieldsModule::profrz ( const Kokkos::View< Real * > &  sarr,
const Kokkos::View< Real * > &  chiarr,
Kokkos::View< Real *** > &  potsc,
Kokkos::View< Real *** > &  potsp,
Kokkos::View< Real ** > &  rsc,
Kokkos::View< Real ** > &  zsc,
int  field_select,
int  slice 
)

Sample a selected field on \((s,\chi)\) and \((s,\varphi)\) planes.

Also returns cylindrical \((R,Z)\) coordinates for the poloidal plane; slice selects the destination slab in the three-dimensional outputs.

Parameters
[in]sarrRadial sampling coordinates.
[in]chiarrPoloidal sampling coordinates [rad].
[out]potscField samples on the (s,chi) plane.
[out]potspField samples on the (s,phi) plane.
[out]rscCylindrical R coordinates of the poloidal plane.
[out]zscCylindrical Z coordinates of the poloidal plane.
[in]field_selectField selector defined by the get-potential constants.
[in]sliceDestination slab in potsc and potsp.
Note
Corresponds to profrz in fields.F90.

◆ profrz_host()

void orb5x::FieldsModule::profrz_host ( const Kokkos::View< Real * >::HostMirror &  host_sarr,
const Kokkos::View< Real * >::HostMirror &  host_chiarr,
Kokkos::View< Real *** >::HostMirror &  host_potsc,
Kokkos::View< Real *** >::HostMirror &  host_potsp,
Kokkos::View< Real ** >::HostMirror &  host_rsc,
Kokkos::View< Real ** >::HostMirror &  host_zsc,
int  field_select,
int  slice 
)

Host-mirror implementation of profrz().

Parameters
[in]host_sarrHost radial sampling coordinates.
[in]host_chiarrHost poloidal sampling coordinates [rad].
[out]host_potscHost (s,chi) field samples.
[out]host_potspHost (s,phi) field samples.
[out]host_rscHost cylindrical R coordinates.
[out]host_zscHost cylindrical Z coordinates.
[in]field_selectField selector defined by the get-potential constants.
[in]sliceDestination slab in the output views.

◆ read_write_field_data_disp()

void orb5x::FieldsModule::read_write_field_data_disp ( bool  read_flag,
int  datn 
)

Read or write a numbered field checkpoint.

Parameters
[in]read_flagRead when true; write when false.
[in]datnAlternating restart generation, normally 0 or 1.

◆ set_apar_ramp()

void orb5x::FieldsModule::set_apar_ramp ( Real  time)

Apply the configured time ramp to parallel-vector-potential coefficients.

Parameters
[in]timeCurrent normalized simulation time.

◆ set_current_trace_context()

static void orb5x::FieldsModule::set_current_trace_context ( int  step,
int  rk 
)
static

Set identifiers attached to parallel-current parity traces.

Parameters
[in]stepGlobal timestep index.
[in]rkRunge–Kutta stage index.

◆ set_phi_trace_context()

static void orb5x::FieldsModule::set_phi_trace_context ( int  step,
int  rk 
)
static

Set identifiers attached to electrostatic-potential parity traces.

Parameters
[in]stepGlobal timestep index.
[in]rkRunge–Kutta stage index.

◆ setrho()

void orb5x::FieldsModule::setrho ( int  i_att)

Select a deposited particle attribute as active charge density.

Parameters
[in]i_attZero-based deposited-attribute selector.

◆ setrho_species()

void orb5x::FieldsModule::setrho_species ( int  isp,
bool  is_first,
bool  is_last 
)

Accumulate deposited charge for one species.

Parameters
[in]ispZero-based species index.
[in]is_firstClear/initialize the aggregate before adding this species.
[in]is_lastFinalize/filter the aggregate after adding this species.

◆ solve_fem()

void orb5x::FieldsModule::solve_fem ( )

Assemble and solve the active finite-element quasineutrality/Ampere system.

◆ solve_mass_matrix()

void orb5x::FieldsModule::solve_mass_matrix ( )

Apply the mass-matrix solve to the module's active right-hand side.

◆ solve_mass_matrix_from_bspl()

void orb5x::FieldsModule::solve_mass_matrix_from_bspl ( int  adin,
const Kokkos::View< Real *** > &  rho_bspl_in,
Kokkos::View< Real *** > &  phi_bspl_out 
)

Solve a mass-matrix projection between B-spline representations.

Parameters
[in]adinMatrix/backsolve selector used by the finite-element solver.
[in]rho_bspl_inProjection-space source coefficients.
[out]phi_bspl_outSolution-space coefficients.

◆ spectrum2()

void orb5x::FieldsModule::spectrum2 ( int  ispec,
int  mdim,
int  ndim,
std::vector< std::vector< Real > > &  spec,
std::vector< std::vector< Real > > &  spec_loc,
int  isp = -1 
)

Compute a two-dimensional poloidal/toroidal Fourier spectrum.

Parameters
[in]ispec1 EF1, 2 PHI, 3 RHO, 4 EF2, 5 APA, or 6 CUR.
[in]mdimNumber of reported poloidal modes.
[in]ndimNumber of reported toroidal modes.
[out]specGlobally reduced spectrum, shaped [ndim][2*mdim].
[out]spec_locRank-local spectrum in the same layout.
[in]ispOptional zero-based species selector for species moments.

◆ sphibar()

Real orb5x::FieldsModule::sphibar ( Real  s)

Evaluate the flux-surface-averaged electrostatic potential.

Parameters
[in]sRadial coordinate s=sqrt(psi).
Returns
Normalized zonal electrostatic potential at the requested radius.

◆ sphibar_host_cached()

Real orb5x::FieldsModule::sphibar_host_cached ( Real  s,
const Kokkos::View< Real * >::HostMirror &  host_zrhs0,
const Kokkos::View< Real ** >::HostMirror &  host_zwavg,
const Kokkos::View< Real * >::HostMirror &  host_sgrid 
)

Evaluate sphibar() using already synchronized host mirrors.

Parameters
[in]sRadial coordinate s=sqrt(psi).
[in]host_zrhs0Host radial zonal-potential coefficients.
[in]host_zwavgHost flux-surface averaging weights.
[in]host_sgridHost radial field grid.
Returns
Normalized flux-surface-averaged potential.

◆ trace_getpot_host_cached_debug()

void orb5x::FieldsModule::trace_getpot_host_cached_debug ( Real  s,
Real  chi,
Real  phi_val,
const Kokkos::View< Real * >::HostMirror &  host_sgrid,
const Kokkos::View< Real * >::HostMirror &  host_chigrid,
const Kokkos::View< Real * >::HostMirror &  host_phigrid,
const Kokkos::View< Real *** >::HostMirror &  host_field_bspl,
int  call_id,
int  ip,
const char *  label 
)

Emit a detailed host interpolation trace for parity debugging.

Parameters
[in]sRadial coordinate s=sqrt(psi).
[in]chiPoloidal angle [rad].
[in]phi_valToroidal angle [rad].
[in]host_sgridHost radial grid.
[in]host_chigridHost poloidal grid.
[in]host_phigridHost toroidal grid.
[in]host_field_bsplHost B-spline coefficients.
[in]call_idMonotonic trace-call identifier.
[in]ipLocal marker index associated with the trace.
[in]labelHuman-readable field/trace label.

◆ vecmatmul()

void orb5x::FieldsModule::vecmatmul ( )

Apply configured finite-element matrices to the current field vectors.

Member Data Documentation

◆ apar

FieldType orb5x::FieldsModule::apar

Hamiltonian parallel vector potential \(A_\parallel\).

◆ apar_bspl_old

Kokkos::View<Real***> orb5x::FieldsModule::apar_bspl_old

Previous parallel-vector-potential coefficients.

◆ apar_ham_bspl

Kokkos::View<Real***> orb5x::FieldsModule::apar_ham_bspl

Hamiltonian parallel-vector-potential coefficients.

◆ apar_sympl

FieldType orb5x::FieldsModule::apar_sympl

Symplectic parallel vector potential.

◆ blsize

Kokkos::View<int*> orb5x::FieldsModule::blsize

Number of equations assigned to each radial block.

◆ bnrm2

Kokkos::View<Real*> orb5x::FieldsModule::bnrm2

Radial normalization used by field-energy integrals.

◆ chigrid

Kokkos::View<Real*> orb5x::FieldsModule::chigrid

Uniform poloidal grid [rad].

◆ crhs

Kokkos::View<Complex***> orb5x::FieldsModule::crhs

Complex spectral RHS before distributed transforms.

◆ crhs_buffer

Kokkos::View<Complex***> orb5x::FieldsModule::crhs_buffer

MPI packing/unpacking workspace for spectral redistribution.

◆ crhs_fft

Kokkos::View<Complex***> orb5x::FieldsModule::crhs_fft

Complex RHS after local FFTs.

◆ crhs_filtered

Kokkos::View<Complex***> orb5x::FieldsModule::crhs_filtered

Spectral RHS after mode filtering.

◆ curr_bspl

Kokkos::View<Real****> orb5x::FieldsModule::curr_bspl

Deposited parallel-current coefficients by species.

◆ curr_corr_bspl

Kokkos::View<Real***> orb5x::FieldsModule::curr_corr_bspl

Corrected parallel-current coefficients.

◆ curr_sympl_bspl

Kokkos::View<Real***> orb5x::FieldsModule::curr_sympl_bspl

Symplectic parallel-current coefficients.

◆ curr_temp

Kokkos::View<Real****> orb5x::FieldsModule::curr_temp

Temporary per-species parallel-current workspace.

◆ dchigrid

Real orb5x::FieldsModule::dchigrid = 0.0

Poloidal field-grid spacing [rad].

◆ dchigrid_inv

Real orb5x::FieldsModule::dchigrid_inv = 0.0

Inverse poloidal spacing [rad \(^{-1}\)].

◆ density_1d_fluxest

Kokkos::View<Real**> orb5x::FieldsModule::density_1d_fluxest

Flux-estimator radial density profile by species.

◆ density_1d_marker

Kokkos::View<Real**> orb5x::FieldsModule::density_1d_marker

Direct marker-count radial density profile by species.

◆ Dfftmass

Kokkos::View<Complex*> orb5x::FieldsModule::Dfftmass

Spectral mass-matrix factors for toroidal transforms.

◆ dim1

int orb5x::FieldsModule::dim1 = 0

First allocated dimension of spectral communication workspaces.

◆ dim2

int orb5x::FieldsModule::dim2 = 0

Second allocated dimension of spectral communication workspaces.

◆ dim3

int orb5x::FieldsModule::dim3 = 0

Third allocated dimension of spectral communication workspaces.

◆ dphigrid

Real orb5x::FieldsModule::dphigrid = 0.0

Toroidal field-grid spacing [rad].

◆ dphigrid_inv

Real orb5x::FieldsModule::dphigrid_inv = 0.0

Inverse toroidal spacing [rad \(^{-1}\)].

◆ dsgrid

Real orb5x::FieldsModule::dsgrid = 0.0

Radial field-grid spacing.

◆ dsgrid_inv

Real orb5x::FieldsModule::dsgrid_inv = 0.0

Inverse radial grid spacing.

◆ efield0_1D

Kokkos::View<Real***> orb5x::FieldsModule::efield0_1D

Zonal electrostatic/electromagnetic energy by radius and species.

◆ efield_nozf_1D

Kokkos::View<Real***> orb5x::FieldsModule::efield_nozf_1D

Non-zonal electrostatic/electromagnetic energy by radius and species.

◆ fdiag_energy_host_apar

Kokkos::View<Real***>::HostMirror orb5x::FieldsModule::fdiag_energy_host_apar

Cached host mirror of Hamiltonian \(A_\parallel\).

◆ fdiag_energy_host_apar_sympl

Kokkos::View<Real***>::HostMirror orb5x::FieldsModule::fdiag_energy_host_apar_sympl

Cached host mirror of symplectic \(A_\parallel\).

◆ fdiag_energy_host_cache_step

int orb5x::FieldsModule::fdiag_energy_host_cache_step = -1

Time step represented by the field-energy host mirrors.

◆ fdiag_energy_host_curr

Kokkos::View<Real****>::HostMirror orb5x::FieldsModule::fdiag_energy_host_curr

Cached host mirror of species parallel current.

◆ fdiag_energy_host_curr_sympl

Kokkos::View<Real***>::HostMirror orb5x::FieldsModule::fdiag_energy_host_curr_sympl

Cached host mirror of symplectic current.

◆ fdiag_energy_host_phi

Kokkos::View<Real***>::HostMirror orb5x::FieldsModule::fdiag_energy_host_phi

Cached host mirror of electrostatic potential.

◆ fdiag_energy_host_rho

Kokkos::View<Real****>::HostMirror orb5x::FieldsModule::fdiag_energy_host_rho

Cached host mirror of species charge density.

◆ fftminv

Kokkos::View<Real*> orb5x::FieldsModule::fftminv

Inverse FFT normalization factors.

◆ filter

Kokkos::View<int***> orb5x::FieldsModule::filter

Primary mask of retained \((m,n)\) Fourier modes by surface.

◆ filter2

Kokkos::View<int***> orb5x::FieldsModule::filter2

Secondary mask used by the alternate filter pass.

◆ filter_modes

Kokkos::View<int[8]> orb5x::FieldsModule::filter_modes

Enabled spectral-filter mode selectors.

◆ iblock

Kokkos::View<int*> orb5x::FieldsModule::iblock

Starting equation index of each radial block.

◆ islw

int orb5x::FieldsModule::islw = 0

Lower radial B-spline coefficient bound.

◆ islw1

int orb5x::FieldsModule::islw1 = 0

Lower radial bound of the reduced/interior layout.

◆ islw_b

int orb5x::FieldsModule::islw_b = 0

Lower radial bound of the background-potential table.

◆ isup

int orb5x::FieldsModule::isup = 0

Upper radial B-spline coefficient bound.

◆ isup1

int orb5x::FieldsModule::isup1 = 0

Upper radial bound of the reduced/interior layout.

◆ isup_b

int orb5x::FieldsModule::isup_b = 0

Upper radial bound of the background-potential table.

◆ jclw

int orb5x::FieldsModule::jclw = 0

Lower poloidal B-spline coefficient bound.

◆ jclw1

int orb5x::FieldsModule::jclw1 = 0

Lower poloidal bound of the reduced/interior layout.

◆ jcup

int orb5x::FieldsModule::jcup = 0

Upper poloidal B-spline coefficient bound.

◆ jcup1

int orb5x::FieldsModule::jcup1 = 0

Upper poloidal bound of the reduced/interior layout.

◆ kplw

int orb5x::FieldsModule::kplw = 0

Lower toroidal B-spline coefficient bound.

◆ kplw1

int orb5x::FieldsModule::kplw1 = 0

Lower toroidal bound of the reduced/interior layout.

◆ kpup

int orb5x::FieldsModule::kpup = 0

Upper toroidal B-spline coefficient bound.

◆ kpup1

int orb5x::FieldsModule::kpup1 = 0

Upper toroidal bound of the reduced/interior layout.

◆ lb

int orb5x::FieldsModule::lb[4] = {0, 0, 0, 0}

Fortran lower bounds in \((s,\chi,\varphi,\mathrm{species})\) order.

◆ lbuild

bool orb5x::FieldsModule::lbuild = false

Whether Fourier-space solver matrices must be constructed.

◆ local_n_disp

Kokkos::View<int*> orb5x::FieldsModule::local_n_disp

Packed-buffer displacement for each rank's modes.

◆ local_n_end

Kokkos::View<int*> orb5x::FieldsModule::local_n_end

Last toroidal-mode index owned by each rank.

◆ local_n_modes

Kokkos::View<int*> orb5x::FieldsModule::local_n_modes

Number of toroidal modes owned by each MPI rank.

◆ local_n_start

Kokkos::View<int*> orb5x::FieldsModule::local_n_start

First toroidal-mode index owned by each rank.

◆ mbounds

Kokkos::View<int***> orb5x::FieldsModule::mbounds

Packed lower/upper poloidal-mode bounds for filtering kernels.

◆ mmax_f

Kokkos::View<int**> orb5x::FieldsModule::mmax_f

Locally retained maximum poloidal mode by surface/toroidal mode.

◆ mmax_f_global

Kokkos::View<int**> orb5x::FieldsModule::mmax_f_global

Global maximum retained poloidal mode bounds.

◆ mmin_f

Kokkos::View<int**> orb5x::FieldsModule::mmin_f

Locally retained minimum poloidal mode by surface/toroidal mode.

◆ mmin_f_global

Kokkos::View<int**> orb5x::FieldsModule::mmin_f_global

Global minimum retained poloidal mode bounds.

◆ mom_rhs

Kokkos::View<Complex**> orb5x::FieldsModule::mom_rhs

Fourier-space species-moment right-hand side.

◆ mom_sp_bspl

Kokkos::View<Real***> orb5x::FieldsModule::mom_sp_bspl

Species moment projected in B-spline space.

◆ moment_sp_bspl

Kokkos::View<Real***> orb5x::FieldsModule::moment_sp_bspl

Species-summed moment coefficients used by field solves.

◆ MPI_rtype_c

MPI_Datatype orb5x::FieldsModule::MPI_rtype_c = MPI_DATATYPE_NULL

Receive datatype for complex spectral redistribution.

◆ MPI_rtype_r

MPI_Datatype orb5x::FieldsModule::MPI_rtype_r = MPI_DATATYPE_NULL

Receive datatype for real spectral redistribution.

◆ MPI_stype_c

MPI_Datatype orb5x::FieldsModule::MPI_stype_c = MPI_DATATYPE_NULL

Send datatype for complex spectral redistribution.

◆ MPI_stype_r

MPI_Datatype orb5x::FieldsModule::MPI_stype_r = MPI_DATATYPE_NULL

Send datatype for real spectral redistribution.

◆ nblocks_eff

int orb5x::FieldsModule::nblocks_eff = 0

Effective number of radial blocks used by the field decomposition.

◆ ne_bspl

Kokkos::View<Real***> orb5x::FieldsModule::ne_bspl

Electron density in B-spline space.

◆ neq

int orb5x::FieldsModule::neq = 0

Number of real-space finite-element equations.

◆ neq_f

int orb5x::FieldsModule::neq_f = 0

Number of Fourier-space finite-element equations.

◆ pe_bspl

Kokkos::View<Real***> orb5x::FieldsModule::pe_bspl

Electron pressure in B-spline space.

◆ phi

FieldType orb5x::FieldsModule::phi

Electrostatic potential \(\phi\).

◆ phi0

Kokkos::View<Real**> orb5x::FieldsModule::phi0

Toroidally axisymmetric \(n=0\) electrostatic potential.

◆ phi1_bspl

Kokkos::View<Real***> orb5x::FieldsModule::phi1_bspl

First electrostatic-potential time level in B-spline space.

◆ phi2_bspl

Kokkos::View<Real***> orb5x::FieldsModule::phi2_bspl

Second electrostatic-potential time level in B-spline space.

◆ phib

Kokkos::View<Real*> orb5x::FieldsModule::phib

Radial boundary values for electrostatic potential.

◆ phib2

Kokkos::View<Real*> orb5x::FieldsModule::phib2

Secondary/time-level electrostatic boundary values.

◆ phigrid

Kokkos::View<Real*> orb5x::FieldsModule::phigrid

Uniform toroidal grid [rad].

◆ rho_bspl

Kokkos::View<Real****> orb5x::FieldsModule::rho_bspl

Deposited gyrocentre charge-density coefficients by species.

◆ rho_mass_bspl

Kokkos::View<Real***> orb5x::FieldsModule::rho_mass_bspl

Charge-density coefficients after mass-matrix processing.

◆ rho_passing_bspl

Kokkos::View<Real**> orb5x::FieldsModule::rho_passing_bspl

Passing-particle density projected into the reduced spline layout.

◆ rhs_f

Kokkos::View<Complex**> orb5x::FieldsModule::rhs_f

Active Fourier-space field-equation right-hand side.

◆ rhs_f_adi_curr

Kokkos::View<Complex**> orb5x::FieldsModule::rhs_f_adi_curr

Adiabatic-current contribution in Fourier space.

◆ rhs_f_amp

Kokkos::View<Complex**> orb5x::FieldsModule::rhs_f_amp

Fourier right-hand side for Ampere's equation.

◆ rhs_f_apar_sympl

Kokkos::View<Complex**> orb5x::FieldsModule::rhs_f_apar_sympl

Fourier right-hand side for symplectic \(A_\parallel\).

◆ rhs_f_lapl

Kokkos::View<Complex**> orb5x::FieldsModule::rhs_f_lapl

Fourier representation of the perpendicular-Laplacian contribution.

◆ rhs_f_mass

Kokkos::View<Complex**> orb5x::FieldsModule::rhs_f_mass

Fourier right-hand side for the mass-matrix solve.

◆ rhs_mass

Kokkos::View<Real**> orb5x::FieldsModule::rhs_mass

Real-space mass-matrix right-hand side.

◆ rhs_tmp

Kokkos::View<Real**> orb5x::FieldsModule::rhs_tmp

Real-space temporary right-hand-side workspace.

◆ sgrid

Kokkos::View<Real*> orb5x::FieldsModule::sgrid

Uniform \(s=\sqrt{\psi}\) field grid.

◆ ub

int orb5x::FieldsModule::ub[4] = {0, 0, 0, 0}

Fortran upper bounds in \((s,\chi,\varphi,\mathrm{species})\) order.

◆ ue_bspl

Kokkos::View<Real***> orb5x::FieldsModule::ue_bspl

Electron parallel velocity in B-spline space.

◆ width_f

int orb5x::FieldsModule::width_f = 0

Maximum number of retained poloidal modes per surface.

◆ width_m

int orb5x::FieldsModule::width_m = 0

Maximum number of toroidal modes assigned to one rank.

◆ zrhs0

Kokkos::View<Real*> orb5x::FieldsModule::zrhs0

Radial coefficients of the zonal potential RHS.


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