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. | |
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.
|
static |
Replace constrained rows of a complex band matrix by Dirichlet identities.
| [in,out] | mat | Distributed/wrapped complex band matrix. |
| [in] | left | Select inner or outer radial boundary. |
| [in] | nx | Number of radial grid intervals. |
| [in] | degree | B-spline degree. |
| [in] | nm | Number of poloidal modes in the matrix block. |
| [in] | nsm | Number of constrained spline rows. |
|
static |
Impose magnetic-axis unicity on a Fourier-space band matrix.
| [in,out] | mat | Matrix whose axis rows are replaced/combined. |
| [in] | nm | Number of retained poloidal modes. |
| [in] | nsm | Number of radial spline rows. |
| [in] | m0 | Index of the zero poloidal mode. |
|
static |
Zero direct-space RHS degrees constrained by a radial Dirichlet boundary.
| [in,out] | rhs | Flattened right-hand side. |
| [in] | left | Select the inner (true) or outer (false) boundary. |
| [in] | nx | Number of radial grid intervals. |
| [in] | degree | B-spline degree. |
| [in] | ny | Number of poloidal degrees of freedom per radial row. |
|
static |
Fourier-space counterpart of bcrhs_Dirichlet_direct for a complex RHS.
|
static |
Impose direct-space axis unicity by summing the first poloidal row.
| [in,out] | rhs | Flattened solver right-hand side. |
| [in] | ny | Number of poloidal degrees of freedom per radial row. |
|
static |
Fourier-space counterpart of bcrhs_unicity_direct for a complex RHS.
|
static |
Replicate the unique magnetic-axis solution across its poloidal row.
| [in,out] | sol | Flattened direct-space solution. |
| [in] | ny | Number of poloidal entries in the axis row. |
|
static |
Test a point against radial Dirichlet and poloidal-periodic bounds.
| [out] | isIn | True when the wrapped point lies in [xmin,xmax]. |
| [in,out] | x | Radial coordinate; not wrapped. |
| [in,out] | y | Poloidal coordinate, wrapped with period ly. |
| [in] | ly | Poloidal period in coordinate units. |
| [in] | xmin | Inclusive radial lower bound. |
| [in] | xmax | Inclusive radial upper bound. |
|
static |
Wrap both coordinates onto a doubly periodic domain.
| [out] | isIn | Always true after wrapping. |
| [in,out] | x | Coordinate wrapped with period lx. |
| [in,out] | y | Coordinate wrapped with period ly. |
| [in] | lx | First-coordinate period. |
| [in] | ly | Second-coordinate period. |
|
static |
Same coordinate test/wrapping convention as dirichlet_pointIndomain for the unicity constraint.