ORB5X 1.0.0
Performance-portable global electromagnetic gyrokinetic PIC code
Loading...
Searching...
No Matches
orb5x::FourierFilter Class Reference

Fourier filter for field-aligned modes. More...

#include "fourier_filter.hpp"

Public Member Functions

void em_get_matrix_filter (Kokkos::View< int * > &nqsmin, int mode) const
 Retrieve electromagnetic poloidal filter bounds for a given toroidal mode.
 FourierFilter (int NBmodesGlobal_, const Kokkos::View< int ** > &nfiltglobal_, int dm_, int nm_)
 Construct and fully initialise the ES Fourier filter.
void get_matrix_filter (Kokkos::View< int * > &nqsmin, int mode) const
 Retrieve poloidal filter bounds (mminglobal) for a given toroidal mode.
void initEM (int em_NBmodesGlobal_, const Kokkos::View< int ** > &nfiltglobal_, int dm_, int nm_)
 Add electromagnetic filter arrays to this instance.
 ~FourierFilter ()=default
 Default destructor — Kokkos Views are reference-counted.

Static Public Member Functions

static void destroyFourierFilterModule ()
 Destroy the global singleton.
static void em_initFourierFilter (int NBmodesGlobal_, const Kokkos::View< int ** > &nfiltglobal_, int dm_, int nm_)
 Add EM filter to the global singleton (matches old static em_initFourierFilter).
static void initFourierFilter (int NBmodesGlobal_, const Kokkos::View< int ** > &nfiltglobal_, int dm_, int nm_)
 Create/replace the global singleton (matches old static initFourierFilter).
static FourierFilterinstance ()
 Access the global singleton.

Public Attributes

int dm = 0
 Half-width of poloidal mode filter.
Kokkos::View< int ** > em_mmaxglobal
Kokkos::View< int ** > em_mminglobal
Kokkos::View< int ** > em_mminglobal_
int em_NBmodesGlobal = 0
 Number of EM toroidal modes.
Kokkos::View< int ** > em_nfiltglobal
Kokkos::View< int ** > mmaxglobal
 Upper poloidal mode bounds.
Kokkos::View< int ** > mminglobal
 Lower poloidal mode bounds [nx+degree-1, NBmodesGlobal].
Kokkos::View< int ** > mminglobal_
 mminglobal modulo ny
int NBmodesGlobal = 0
 Number of ES toroidal modes.
Kokkos::View< int ** > nfiltglobal
 Toroidal mode list [NBmodesGlobal, 2].
int nm = 0
 Minimum number of poloidal modes.

Detailed Description

Fourier filter for field-aligned modes.

Fortran reference: module FourierFilter (FourierFilter.F90)

Instance-based class: the constructor builds the ES filter arrays, and initEM() adds the EM filter arrays to the same instance. A static singleton (s_instance_) provides backward-compatible global access.

Constructor & Destructor Documentation

◆ FourierFilter()

orb5x::FourierFilter::FourierFilter ( int NBmodesGlobal_,
const Kokkos::View< int ** > & nfiltglobal_,
int dm_,
int nm_ )

Construct and fully initialise the ES Fourier filter.

Reads grid parameters from BSplinesBasis::instance().

Parameters
NBmodesGlobal_Number of global toroidal modes
nfiltglobal_Array [NBmodesGlobal][2]: (mode_number, cpu_index)
dm_Half-width of poloidal mode filter
nm_Minimum number of poloidal modes (nm = 1 + 2*dm)

Fortran ref: subroutine initFourierFilter (FourierFilter.F90 lines 22-31)

Referenced by instance().

◆ ~FourierFilter()

orb5x::FourierFilter::~FourierFilter ( )
default

Default destructor — Kokkos Views are reference-counted.

Member Function Documentation

◆ destroyFourierFilterModule()

void orb5x::FourierFilter::destroyFourierFilterModule ( )
static

Destroy the global singleton.

Must be called before Kokkos::finalize(). (No direct Fortran equivalent; added for C++ RAII correctness.)

◆ em_get_matrix_filter()

void orb5x::FourierFilter::em_get_matrix_filter ( Kokkos::View< int * > & nqsmin,
int mode ) const

Retrieve electromagnetic poloidal filter bounds for a given toroidal mode.

Fortran ref: subroutine em_get_matrix_filter (FourierFilter.F90 lines 216-228)

◆ em_initFourierFilter()

void orb5x::FourierFilter::em_initFourierFilter ( int NBmodesGlobal_,
const Kokkos::View< int ** > & nfiltglobal_,
int dm_,
int nm_ )
static

Add EM filter to the global singleton (matches old static em_initFourierFilter).

Fortran ref: subroutine em_initFourierFilter (FourierFilter.F90 lines 33-42)

◆ get_matrix_filter()

void orb5x::FourierFilter::get_matrix_filter ( Kokkos::View< int * > & nqsmin,
int mode ) const

Retrieve poloidal filter bounds (mminglobal) for a given toroidal mode.

Fortran ref: subroutine get_matrix_filter (FourierFilter.F90 lines 202-214)

◆ initEM()

void orb5x::FourierFilter::initEM ( int em_NBmodesGlobal_,
const Kokkos::View< int ** > & nfiltglobal_,
int dm_,
int nm_ )

Add electromagnetic filter arrays to this instance.

Fortran ref: subroutine em_initFourierFilter (FourierFilter.F90 lines 33-42)

◆ initFourierFilter()

void orb5x::FourierFilter::initFourierFilter ( int NBmodesGlobal_,
const Kokkos::View< int ** > & nfiltglobal_,
int dm_,
int nm_ )
static

Create/replace the global singleton (matches old static initFourierFilter).

Fortran ref: subroutine initFourierFilter (FourierFilter.F90 lines 22-31)

◆ instance()

FourierFilter & orb5x::FourierFilter::instance ( )
static

Access the global singleton.

Throws if not yet initialised.

References FourierFilter().

Member Data Documentation

◆ dm

int orb5x::FourierFilter::dm = 0

Half-width of poloidal mode filter.

◆ em_mmaxglobal

Kokkos::View<int**> orb5x::FourierFilter::em_mmaxglobal

◆ em_mminglobal

Kokkos::View<int**> orb5x::FourierFilter::em_mminglobal

◆ em_mminglobal_

Kokkos::View<int**> orb5x::FourierFilter::em_mminglobal_

◆ em_NBmodesGlobal

int orb5x::FourierFilter::em_NBmodesGlobal = 0

Number of EM toroidal modes.

◆ em_nfiltglobal

Kokkos::View<int**> orb5x::FourierFilter::em_nfiltglobal

◆ mmaxglobal

Kokkos::View<int**> orb5x::FourierFilter::mmaxglobal

Upper poloidal mode bounds.

◆ mminglobal

Kokkos::View<int**> orb5x::FourierFilter::mminglobal

Lower poloidal mode bounds [nx+degree-1, NBmodesGlobal].

◆ mminglobal_

Kokkos::View<int**> orb5x::FourierFilter::mminglobal_

mminglobal modulo ny

◆ NBmodesGlobal

int orb5x::FourierFilter::NBmodesGlobal = 0

Number of ES toroidal modes.

◆ nfiltglobal

Kokkos::View<int**> orb5x::FourierFilter::nfiltglobal

Toroidal mode list [NBmodesGlobal, 2].

◆ nm

int orb5x::FourierFilter::nm = 0

Minimum number of poloidal modes.


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