ORB5X 1.0.0
Performance-portable global electromagnetic gyrokinetic PIC code
orb5x::FieldType Struct Reference

Storage and per-species access metadata for one scalar field. More...

#include "fields.hpp"

Public Member Functions

void allocate (int nspecies, int ns, int nchi, int nphip, int nidbas, int neq_f)
 Allocate all numerical and metadata storage for this field.
 
void allocate_field_storage (int ns, int nchi, int nphip, int nidbas, int neq_f)
 Allocate spline coefficients and Fourier right-hand-side storage.
 
void allocate_metadata (int nspecies)
 Allocate and initialize per-species field-requirement metadata.
 
 FieldType ()=default
 Construct an unallocated field descriptor.
 

Public Attributes

Kokkos::View< Real *** > bspl
 Real-space B-spline coefficients with lower-bound offsets folded into C++ indices.
 
Kokkos::View< int * > field_pic
 Base particle-attribute index for the scalar field.
 
Kokkos::View< int * > grad_field_pic
 Base attribute index followed by radial, poloidal, and toroidal gradients.
 
Kokkos::View< int * > gyro_field_pic
 Base particle-attribute index for the gyro-average.
 
Kokkos::View< int * > gyro_grad_field_pic
 Base particle-attribute index for the gyro-averaged gradient.
 
Kokkos::View< int * > need_field
 Per-species cadence: -1 unused, 0 each substep, positive every N steps.
 
Kokkos::View< int * > need_grad_field
 Per-species cadence for field-gradient evaluation.
 
Kokkos::View< int * > need_gyro_field
 Per-species cadence for gyro-averaged field evaluation.
 
Kokkos::View< int * > need_gyro_grad_field
 Per-species cadence for gyro-averaged gradients.
 
Kokkos::View< Complex ** > rhs_f
 Complex solver right-hand side indexed by Fourier equation and toroidal mode.
 

Detailed Description

Storage and per-species access metadata for one scalar field.

A field is represented by tensor-product B-spline coefficients in real space and by a Fourier-space solver right-hand side. Metadata maps each species to the particle-attribute slots populated by get_pot_disp().

Constructor & Destructor Documentation

◆ FieldType()

orb5x::FieldType::FieldType ( )
default

Construct an unallocated field descriptor.

Member Function Documentation

◆ allocate()

void orb5x::FieldType::allocate ( int  nspecies,
int  ns,
int  nchi,
int  nphip,
int  nidbas,
int  neq_f 
)
inline

Allocate all numerical and metadata storage for this field.

Parameters
[in]nspeciesNumber of configured species.
[in]nsNumber of radial grid intervals.
[in]nchiNumber of poloidal grid intervals.
[in]nphipNumber of retained toroidal planes.
[in]nidbasNumber of B-spline overlap/guard coefficients.
[in]neq_fNumber of Fourier-space equations.

References allocate_field_storage(), and allocate_metadata().

◆ allocate_field_storage()

void orb5x::FieldType::allocate_field_storage ( int  ns,
int  nchi,
int  nphip,
int  nidbas,
int  neq_f 
)
inline

Allocate spline coefficients and Fourier right-hand-side storage.

Parameters
[in]nsNumber of radial grid intervals.
[in]nchiNumber of poloidal grid intervals.
[in]nphipNumber of retained toroidal planes.
[in]nidbasNumber of B-spline overlap/guard coefficients.
[in]neq_fNumber of Fourier-space equations.

References bspl, and rhs_f.

Referenced by allocate().

◆ allocate_metadata()

void orb5x::FieldType::allocate_metadata ( int  nspecies)
inline

Allocate and initialize per-species field-requirement metadata.

Parameters
[in]nspeciesNumber of configured kinetic/fluid species.

References field_pic, grad_field_pic, gyro_field_pic, gyro_grad_field_pic, need_field, need_grad_field, need_gyro_field, and need_gyro_grad_field.

Referenced by allocate().

Member Data Documentation

◆ bspl

Kokkos::View<Real***> orb5x::FieldType::bspl

Real-space B-spline coefficients with lower-bound offsets folded into C++ indices.

Referenced by allocate_field_storage().

◆ field_pic

Kokkos::View<int*> orb5x::FieldType::field_pic

Base particle-attribute index for the scalar field.

Referenced by allocate_metadata().

◆ grad_field_pic

Kokkos::View<int*> orb5x::FieldType::grad_field_pic

Base attribute index followed by radial, poloidal, and toroidal gradients.

Referenced by allocate_metadata().

◆ gyro_field_pic

Kokkos::View<int*> orb5x::FieldType::gyro_field_pic

Base particle-attribute index for the gyro-average.

Referenced by allocate_metadata().

◆ gyro_grad_field_pic

Kokkos::View<int*> orb5x::FieldType::gyro_grad_field_pic

Base particle-attribute index for the gyro-averaged gradient.

Referenced by allocate_metadata().

◆ need_field

Kokkos::View<int*> orb5x::FieldType::need_field

Per-species cadence: -1 unused, 0 each substep, positive every N steps.

Referenced by allocate_metadata().

◆ need_grad_field

Kokkos::View<int*> orb5x::FieldType::need_grad_field

Per-species cadence for field-gradient evaluation.

Referenced by allocate_metadata().

◆ need_gyro_field

Kokkos::View<int*> orb5x::FieldType::need_gyro_field

Per-species cadence for gyro-averaged field evaluation.

Referenced by allocate_metadata().

◆ need_gyro_grad_field

Kokkos::View<int*> orb5x::FieldType::need_gyro_grad_field

Per-species cadence for gyro-averaged gradients.

Referenced by allocate_metadata().

◆ rhs_f

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

Complex solver right-hand side indexed by Fourier equation and toroidal mode.

Referenced by allocate_field_storage().


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