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

Interface for solver integration in ORB5X. More...

#include "interface_solver_in_orb5.hpp"

Public Member Functions

void backsolveMassF (Kokkos::View< Complex * > &rhs_f, int globalk)
void backsolveRhsF (Kokkos::View< Complex * > &rhs_f, int globalk, int matnum)
int degree () const
void destroy ()
void init (int nx, int ny, int nz, int degree, int nfilt1, int nfilt2, int deltan, int dm, int nsel_poisson, int nsel_ampere, int nsel_control_variate, int inner_BC, Real xmin, Real xmax, Real ymin, Real ymax, Real a, int nphip)
int innerBC () const
 InterfaceSolverInOrb5 ()
 InterfaceSolverInOrb5 (const InterfaceSolverInOrb5 &)=delete
bool isInitialized () const
int multiMatrix () const
void multiplyMassF (Kokkos::View< Complex * > &arr_f, int globalk)
int nm () const
int nx () const
int ny () const
InterfaceSolverInOrb5operator= (const InterfaceSolverInOrb5 &)=delete
int subarraySize () const
 Subarray size used by backsolve / multiply: (nx_+degree_-1)*nm_.
 ~InterfaceSolverInOrb5 ()

Static Public Member Functions

static void backsolve_mass_f (Kokkos::View< Complex * > &rhs_f, int globalk)
static void backsolve_rhs_f (Kokkos::View< Complex * > &rhs_f, int globalk, int matnum)
static void computeLoadBalancing (int nphip, int nfilt1, int nfilt2, int deltan, int nsd, std::vector< int > &loadbalancing_mpi, std::vector< int > &rank_cart, int &nbcart_busy)
 Compute MPI load balancing for matrix assembly.
static void destroyNewSolver ()
static void determineLocalModes (int nphip, int nfilt1, int nfilt2, int deltan, int nz, int color, int me_sd, Kokkos::View< bool * > &isnfiltlocal, Kokkos::View< bool * > &isnfiltlocalysolved, Kokkos::View< int * > &nfiltlocal, int &NBmodeslocal, bool &localassembly)
 Determine which toroidal modes are local for assembly and backsolving.
static void initNewSolverInOrb5 (int nx, int ny, int nz, int degree, int nfilt1, int nfilt2, int deltan, int dm_, int nsel_poisson, int nsel_ampere, int nsel_control_variate, int inner_BC, Real xmin, Real xmax, Real ymin, Real ymax, Real a, int nphip)
static void multiply_mass_f (Kokkos::View< Complex * > &arr_f, int globalk)
static void readSolverHackNamelist (const std::string &input_path, bool &phase_factor, bool &force_no_adiabatic, bool &force_no_polarization, bool &force_no_zonal, int &counter_freq, bool &old_parallelization, int &testcase, bool &oldAvgJac, int &internal_boundary, int &multi_matrix, bool &lapl_boundary_terms)
 Parse the SOLVER_HACK Fortran namelist from input_path.

Detailed Description

Interface for solver integration in ORB5X.

Refactored from Fortran module interfaceSolverInOrb5 (interfaceSolverInOrb5.F90).

The class mirrors the Fortran module pattern: a single process-wide instance (instance_) holds all module-level state. Static facade methods keep existing call sites unchanged.

Constructor & Destructor Documentation

◆ InterfaceSolverInOrb5() [1/2]

orb5x::InterfaceSolverInOrb5::InterfaceSolverInOrb5 ( )

Referenced by InterfaceSolverInOrb5(), and operator=().

◆ ~InterfaceSolverInOrb5()

orb5x::InterfaceSolverInOrb5::~InterfaceSolverInOrb5 ( )

◆ InterfaceSolverInOrb5() [2/2]

orb5x::InterfaceSolverInOrb5::InterfaceSolverInOrb5 ( const InterfaceSolverInOrb5 & )
delete

Member Function Documentation

◆ backsolve_mass_f()

void orb5x::InterfaceSolverInOrb5::backsolve_mass_f ( Kokkos::View< Complex * > & rhs_f,
int globalk )
static

◆ backsolve_rhs_f()

void orb5x::InterfaceSolverInOrb5::backsolve_rhs_f ( Kokkos::View< Complex * > & rhs_f,
int globalk,
int matnum )
static

◆ backsolveMassF()

void orb5x::InterfaceSolverInOrb5::backsolveMassF ( Kokkos::View< Complex * > & rhs_f,
int globalk )

◆ backsolveRhsF()

void orb5x::InterfaceSolverInOrb5::backsolveRhsF ( Kokkos::View< Complex * > & rhs_f,
int globalk,
int matnum )

◆ computeLoadBalancing()

void orb5x::InterfaceSolverInOrb5::computeLoadBalancing ( int nphip,
int nfilt1,
int nfilt2,
int deltan,
int nsd,
std::vector< int > & loadbalancing_mpi,
std::vector< int > & rank_cart,
int & nbcart_busy )
static

Compute MPI load balancing for matrix assembly.

Ref: interfaceSolverInOrb5.F90 lines 213-233.

◆ degree()

int orb5x::InterfaceSolverInOrb5::degree ( ) const
inline

Referenced by init(), and initNewSolverInOrb5().

◆ destroy()

void orb5x::InterfaceSolverInOrb5::destroy ( )

◆ destroyNewSolver()

void orb5x::InterfaceSolverInOrb5::destroyNewSolver ( )
static

◆ determineLocalModes()

void orb5x::InterfaceSolverInOrb5::determineLocalModes ( int nphip,
int nfilt1,
int nfilt2,
int deltan,
int nz,
int color,
int me_sd,
Kokkos::View< bool * > & isnfiltlocal,
Kokkos::View< bool * > & isnfiltlocalysolved,
Kokkos::View< int * > & nfiltlocal,
int & NBmodeslocal,
bool & localassembly )
static

Determine which toroidal modes are local for assembly and backsolving.

Ref: interfaceSolverInOrb5.F90 lines 290-315.

◆ init()

void orb5x::InterfaceSolverInOrb5::init ( int nx,
int ny,
int nz,
int degree,
int nfilt1,
int nfilt2,
int deltan,
int dm,
int nsel_poisson,
int nsel_ampere,
int nsel_control_variate,
int inner_BC,
Real xmin,
Real xmax,
Real ymin,
Real ymax,
Real a,
int nphip )

References degree(), nx(), and ny().

◆ initNewSolverInOrb5()

void orb5x::InterfaceSolverInOrb5::initNewSolverInOrb5 ( int nx,
int ny,
int nz,
int degree,
int nfilt1,
int nfilt2,
int deltan,
int dm_,
int nsel_poisson,
int nsel_ampere,
int nsel_control_variate,
int inner_BC,
Real xmin,
Real xmax,
Real ymin,
Real ymax,
Real a,
int nphip )
static

References degree(), nx(), and ny().

◆ innerBC()

int orb5x::InterfaceSolverInOrb5::innerBC ( ) const
inline

◆ isInitialized()

bool orb5x::InterfaceSolverInOrb5::isInitialized ( ) const
inline

◆ multiMatrix()

int orb5x::InterfaceSolverInOrb5::multiMatrix ( ) const
inline

◆ multiply_mass_f()

void orb5x::InterfaceSolverInOrb5::multiply_mass_f ( Kokkos::View< Complex * > & arr_f,
int globalk )
static

◆ multiplyMassF()

void orb5x::InterfaceSolverInOrb5::multiplyMassF ( Kokkos::View< Complex * > & arr_f,
int globalk )

◆ nm()

int orb5x::InterfaceSolverInOrb5::nm ( ) const
inline

◆ nx()

int orb5x::InterfaceSolverInOrb5::nx ( ) const
inline

Referenced by init(), and initNewSolverInOrb5().

◆ ny()

int orb5x::InterfaceSolverInOrb5::ny ( ) const
inline

Referenced by init(), and initNewSolverInOrb5().

◆ operator=()

InterfaceSolverInOrb5 & orb5x::InterfaceSolverInOrb5::operator= ( const InterfaceSolverInOrb5 & )
delete

◆ readSolverHackNamelist()

void orb5x::InterfaceSolverInOrb5::readSolverHackNamelist ( const std::string & input_path,
bool & phase_factor,
bool & force_no_adiabatic,
bool & force_no_polarization,
bool & force_no_zonal,
int & counter_freq,
bool & old_parallelization,
int & testcase,
bool & oldAvgJac,
int & internal_boundary,
int & multi_matrix,
bool & lapl_boundary_terms )
static

Parse the SOLVER_HACK Fortran namelist from input_path.

Ref: interfaceSolverInOrb5.F90 lines 99-134.

◆ subarraySize()

int orb5x::InterfaceSolverInOrb5::subarraySize ( ) const
inline

Subarray size used by backsolve / multiply: (nx_+degree_-1)*nm_.


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