Fourier filter for field-aligned modes.
More...
#include "fourier_filter.hpp"
|
| 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 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 FourierFilter & | instance () |
| | Access the global singleton.
|
| |
|
| int | dm = 0 |
| | Half-width of poloidal mode filter.
|
| |
| Kokkos::View< int ** > | em_mmaxglobal |
| | EM upper poloidal bounds with the same layout as em_mminglobal.
|
| |
| Kokkos::View< int ** > | em_mminglobal |
| | EM lower poloidal bounds [nx+degree-1, em_NBmodesGlobal].
|
| |
| Kokkos::View< int ** > | em_mminglobal_ |
| | EM lower bounds wrapped modulo the poloidal grid size ny.
|
| |
| int | em_NBmodesGlobal = 0 |
| | Number of EM toroidal modes.
|
| |
| Kokkos::View< int ** > | em_nfiltglobal |
| | EM toroidal-mode list [em_NBmodesGlobal,2] (mode, owner/index metadata).
|
| |
| 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.
|
| |
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.
◆ 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)
◆ ~FourierFilter()
| orb5x::FourierFilter::~FourierFilter |
( |
| ) |
|
|
default |
Default destructor — Kokkos Views are reference-counted.
◆ destroyFourierFilterModule()
| static 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.
- Parameters
-
| [out] | nqsmin | Lower retained poloidal index for every radial spline row. |
| [in] | mode | Global toroidal-mode number to locate in em_nfiltglobal. |
Fortran ref: subroutine em_get_matrix_filter (FourierFilter.F90 lines 216-228)
◆ em_initFourierFilter()
| static 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).
- Parameters
-
| [in] | NBmodesGlobal_ | Number of global electromagnetic toroidal modes. |
| [in] | nfiltglobal_ | Mode/ownership metadata [NBmodesGlobal_][2]. |
| [in] | dm_ | Half-width of the retained poloidal band. |
| [in] | nm_ | Minimum retained poloidal-mode count. 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.
- Parameters
-
| [out] | nqsmin | Lower retained poloidal index for every radial spline row. |
| [in] | mode | Global toroidal-mode number to locate in nfiltglobal. |
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.
- Parameters
-
| [in] | em_NBmodesGlobal_ | Number of global electromagnetic toroidal modes. |
| [in] | nfiltglobal_ | Mode/ownership metadata [em_NBmodesGlobal_][2]. |
| [in] | dm_ | Half-width of the retained poloidal band. |
| [in] | nm_ | Minimum retained poloidal-mode count. |
Fortran ref: subroutine em_initFourierFilter (FourierFilter.F90 lines 33-42)
◆ initFourierFilter()
| static 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).
- Parameters
-
| [in] | NBmodesGlobal_ | Number of global electrostatic toroidal modes. |
| [in] | nfiltglobal_ | Mode/ownership metadata [NBmodesGlobal_][2]. |
| [in] | dm_ | Half-width of the retained poloidal band. |
| [in] | nm_ | Minimum retained poloidal-mode count. Fortran ref: subroutine initFourierFilter (FourierFilter.F90 lines 22-31) |
◆ instance()
Access the global singleton.
Throws if not yet initialised.
- Returns
- Reference to the initialized process-wide filter.
- Exceptions
-
◆ dm
| int orb5x::FourierFilter::dm = 0 |
Half-width of poloidal mode filter.
◆ em_mmaxglobal
| Kokkos::View<int**> orb5x::FourierFilter::em_mmaxglobal |
EM upper poloidal bounds with the same layout as em_mminglobal.
◆ em_mminglobal
| Kokkos::View<int**> orb5x::FourierFilter::em_mminglobal |
EM lower poloidal bounds [nx+degree-1, em_NBmodesGlobal].
◆ em_mminglobal_
| Kokkos::View<int**> orb5x::FourierFilter::em_mminglobal_ |
EM lower bounds wrapped modulo the poloidal grid size ny.
◆ em_NBmodesGlobal
| int orb5x::FourierFilter::em_NBmodesGlobal = 0 |
Number of EM toroidal modes.
◆ em_nfiltglobal
| Kokkos::View<int**> orb5x::FourierFilter::em_nfiltglobal |
EM toroidal-mode list [em_NBmodesGlobal,2] (mode, owner/index metadata).
◆ 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_ |
◆ 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: