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

Applies the radial/poloidal boundary constraints used by field solves. More...

#include "solver_boundary_conditions.hpp"

Static Public Member Functions

static void bcmat_dirichlet (Zbmat &mat, bool left, int nx, int degree, int nm, int nsm)
 Replace constrained rows of a complex band matrix by Dirichlet identities.
static void bcmat_unicity_fourier (Zbmat &mat, int nm, int nsm, int m0)
 Impose magnetic-axis unicity on a Fourier-space band matrix.
static void bcrhs_Dirichlet_direct (Kokkos::View< Real * > &rhs, bool left, int nx, int degree, int ny)
 Zero direct-space RHS degrees constrained by a radial Dirichlet boundary.
static void bcrhs_Dirichlet_fourier (Kokkos::View< Complex * > &rhs, bool left, int nx, int degree, int ny)
 Fourier-space counterpart of bcrhs_Dirichlet_direct for a complex RHS.
static void bcrhs_unicity_direct (Kokkos::View< Real * > &rhs, int ny)
 Impose direct-space axis unicity by summing the first poloidal row.
static void bcrhs_unicity_fourier (Kokkos::View< Complex * > &rhs, int ny)
 Fourier-space counterpart of bcrhs_unicity_direct for a complex RHS.
static void bcsol_unicity_direct (Kokkos::View< Real * > &sol, int ny)
 Replicate the unique magnetic-axis solution across its poloidal row.
static void dirichlet_pointIndomain (bool &isIn, Real &x, Real &y, Real ly, Real xmin, Real xmax)
 Test a point against radial Dirichlet and poloidal-periodic bounds.
static void periodic_pointIndomain (bool &isIn, Real &x, Real &y, Real lx, Real ly)
 Wrap both coordinates onto a doubly periodic domain.
static void unicity_pointIndomain (bool &isIn, Real &x, Real &y, Real ly, Real xmin, Real xmax)
 Same coordinate test/wrapping convention as dirichlet_pointIndomain for the unicity constraint.

Detailed Description

Applies the radial/poloidal boundary constraints used by field solves.

The solver calls these helpers while evaluating basis support, assembling right-hand sides, conditioning band matrices, and reconstructing solutions. They preserve the indexing and Fourier-mode conventions of boundaryconditions.F90; coordinates use the normalized solver domain and periodic lengths.

Member Function Documentation

◆ bcmat_dirichlet()

void orb5x::SolverBoundaryConditions::bcmat_dirichlet ( Zbmat & mat,
bool left,
int nx,
int degree,
int nm,
int nsm )
static

Replace constrained rows of a complex band matrix by Dirichlet identities.

Parameters
[in,out]matDistributed/wrapped complex band matrix.
[in]leftSelect inner or outer radial boundary.
[in]nxNumber of radial grid intervals.
[in]degreeB-spline degree.
[in]nmNumber of poloidal modes in the matrix block.
[in]nsmNumber of constrained spline rows.

◆ bcmat_unicity_fourier()

void orb5x::SolverBoundaryConditions::bcmat_unicity_fourier ( Zbmat & mat,
int nm,
int nsm,
int m0 )
static

Impose magnetic-axis unicity on a Fourier-space band matrix.

Parameters
[in,out]matMatrix whose axis rows are replaced/combined.
[in]nmNumber of retained poloidal modes.
[in]nsmNumber of radial spline rows.
[in]m0Index of the zero poloidal mode.

◆ bcrhs_Dirichlet_direct()

void orb5x::SolverBoundaryConditions::bcrhs_Dirichlet_direct ( Kokkos::View< Real * > & rhs,
bool left,
int nx,
int degree,
int ny )
static

Zero direct-space RHS degrees constrained by a radial Dirichlet boundary.

Parameters
[in,out]rhsFlattened right-hand side.
[in]leftSelect the inner (true) or outer (false) boundary.
[in]nxNumber of radial grid intervals.
[in]degreeB-spline degree.
[in]nyNumber of poloidal degrees of freedom per radial row.

◆ bcrhs_Dirichlet_fourier()

void orb5x::SolverBoundaryConditions::bcrhs_Dirichlet_fourier ( Kokkos::View< Complex * > & rhs,
bool left,
int nx,
int degree,
int ny )
static

Fourier-space counterpart of bcrhs_Dirichlet_direct for a complex RHS.

◆ bcrhs_unicity_direct()

void orb5x::SolverBoundaryConditions::bcrhs_unicity_direct ( Kokkos::View< Real * > & rhs,
int ny )
static

Impose direct-space axis unicity by summing the first poloidal row.

Parameters
[in,out]rhsFlattened solver right-hand side.
[in]nyNumber of poloidal degrees of freedom per radial row.

◆ bcrhs_unicity_fourier()

void orb5x::SolverBoundaryConditions::bcrhs_unicity_fourier ( Kokkos::View< Complex * > & rhs,
int ny )
static

Fourier-space counterpart of bcrhs_unicity_direct for a complex RHS.

◆ bcsol_unicity_direct()

void orb5x::SolverBoundaryConditions::bcsol_unicity_direct ( Kokkos::View< Real * > & sol,
int ny )
static

Replicate the unique magnetic-axis solution across its poloidal row.

Parameters
[in,out]solFlattened direct-space solution.
[in]nyNumber of poloidal entries in the axis row.

◆ dirichlet_pointIndomain()

void orb5x::SolverBoundaryConditions::dirichlet_pointIndomain ( bool & isIn,
Real & x,
Real & y,
Real ly,
Real xmin,
Real xmax )
static

Test a point against radial Dirichlet and poloidal-periodic bounds.

Parameters
[out]isInTrue when the wrapped point lies in [xmin,xmax].
[in,out]xRadial coordinate; not wrapped.
[in,out]yPoloidal coordinate, wrapped with period ly.
[in]lyPoloidal period in coordinate units.
[in]xminInclusive radial lower bound.
[in]xmaxInclusive radial upper bound.

◆ periodic_pointIndomain()

void orb5x::SolverBoundaryConditions::periodic_pointIndomain ( bool & isIn,
Real & x,
Real & y,
Real lx,
Real ly )
static

Wrap both coordinates onto a doubly periodic domain.

Parameters
[out]isInAlways true after wrapping.
[in,out]xCoordinate wrapped with period lx.
[in,out]yCoordinate wrapped with period ly.
[in]lxFirst-coordinate period.
[in]lySecond-coordinate period.

◆ unicity_pointIndomain()

void orb5x::SolverBoundaryConditions::unicity_pointIndomain ( bool & isIn,
Real & x,
Real & y,
Real ly,
Real xmin,
Real xmax )
static

Same coordinate test/wrapping convention as dirichlet_pointIndomain for the unicity constraint.


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