Shared B-spline quadrature, projection, rebasing, and boundary support. More...
#include "pdespline.hpp"
Static Public Member Functions | |
| static void | analytical_rhs (Kokkos::View< Real *** > &rhs) |
| Project the built-in Gaussian two-mode test field onto the basis. | |
| static void | destroyStaticViews () |
Release all static Kokkos Views before Kokkos::finalize(). | |
| static int | get_nbmatf () |
| Return the number of local field matrices. | |
| static int | get_width_f () |
| Return packed poloidal Fourier width per radial row. | |
| static Kokkos::View< Real ** > | get_zwavg () |
| Return flux-surface-average weights. | |
| static void | impose_bc (Kokkos::View< Complex ** > &v) |
| Impose radial solver boundary rows on complex right-hand sides. | |
| static void | impose_bc_host (Kokkos::View< Complex ** >::HostMirror &v) |
| Host-mirror implementation of impose_bc(). | |
| static void | initpde (int nidbas, int ns_, Real ds_, Real smin_, int nchi_, Real dchi_, int nphip_, Real dphi_, const Kokkos::View< int ** > &mmin_, const Kokkos::View< int ** > &mmax_, int iquafor) |
| Initialize spline, mesh, quadrature, and Fourier-mode metadata. | |
| static void | rebase_c1d (Kokkos::View< Complex * > &v, NSelWhichMat nsel_which_mat) |
| Rebase a packed complex radial/Fourier vector in place. | |
| static void | rebase_c2d (Kokkos::View< Complex ** > &v, NSelWhichMat nsel_which_mat) |
| Rebase every right-hand-side column of complex solver storage. | |
| static void | rebase_c2d_host (Kokkos::View< Complex ** >::HostMirror &v, NSelWhichMat nsel_which_mat) |
| Host-mirror implementation of complex two-dimensional rebasing. | |
| static void | rebase_r1d (Kokkos::View< Real * > &v, NSelWhichMat nsel_which_mat) |
| Rebase a real radial/poloidal vector through host staging. | |
| static void | rebase_r1d (Kokkos::View< Real *, Kokkos::HostSpace > &v, NSelWhichMat nsel_which_mat) |
| Rebase an already host-resident real vector in place. | |
| static void | rebase_r1d_host_data (Real *data, int size, NSelWhichMat nsel_which_mat) |
| Rebase contiguous host data as one real coefficient vector. | |
| static void | rebase_r2d (Kokkos::View< Real ** > &v, NSelWhichMat nsel_which_mat) |
| Rebase every column of a real 2-D View through host staging. | |
| static void | rebase_r2d (Kokkos::View< Real **, Kokkos::HostSpace > &v, NSelWhichMat nsel_which_mat) |
| Rebase every column of a host-resident real 2-D View. | |
| static void | rebase_r2d_host_data (Real *data, int size0, int size1, NSelWhichMat nsel_which_mat) |
| Rebase columns of contiguous host matrix data. | |
| static Kokkos::View< Real * > | splines (Real z) |
| Evaluate the active cell-local B-spline basis. | |
Shared B-spline quadrature, projection, rebasing, and boundary support.
Pdespline prepares the uniform (s,chi,phi) spline basis used by field equation assembly. It caches basis values at grid and Gauss points, packed Fourier mode bounds, and flux-surface-average weights. Its rebase routines apply the radial boundary change of basis (T, T^T, or T^-1) before and after sparse solves. The module is process-global and must be initialized after field/equilibrium geometry but before matrix assembly.
|
static |
Project the built-in Gaussian two-mode test field onto the basis.
| [out] | rhs | Integrated coefficients [ns+p][nchi+p][nphip+p]. |
Uses tensor-product Gaussian quadrature and the equilibrium Jacobian, folds poloidal periodic guards, then accumulates toroidal guard contributions across the spatial-domain communicator.
|
static |
Release all static Kokkos Views before Kokkos::finalize().
|
inlinestatic |
Return the number of local field matrices.
|
inlinestatic |
Return packed poloidal Fourier width per radial row.
|
inlinestatic |
Return flux-surface-average weights.
[chi][radial grid point] sharing module storage.
|
static |
Impose radial solver boundary rows on complex right-hand sides.
| [in,out] | v | Coefficients with (ns+p)*width_f in the first extent. |
|
static |
Host-mirror implementation of impose_bc().
| [in,out] | v | Host coefficients modified in place. |
|
static |
Initialize spline, mesh, quadrature, and Fourier-mode metadata.
| [in] | nidbas | B-spline degree p, supported from 0 through 3. |
| [in] | ns_ | Number of radial intervals. |
| [in] | ds_ | Uniform radial spacing in normalized s. |
| [in] | smin_ | Lower radial coordinate in normalized s. |
| [in] | nchi_ | Number of periodic poloidal intervals. |
| [in] | dchi_ | Poloidal spacing [rad]. |
| [in] | nphip_ | Local toroidal interval count on this spatial rank. |
| [in] | dphi_ | Toroidal spacing [rad]. |
| [in] | mmin_ | Lowest retained poloidal mode by radial row and local toroidal mode. |
| [in] | mmax_ | Highest retained poloidal mode on the same layout. |
| [in] | iquafor | Requested Gauss–Legendre point count, clamped to 1–10. |
|
static |
Rebase a packed complex radial/Fourier vector in place.
| [in,out] | v | Flattened storage of (ns+p)*width_f coefficients. |
| [in] | nsel_which_mat | Select boundary matrix operation. |
|
static |
Rebase every right-hand-side column of complex solver storage.
| [in,out] | v | First extent contains (ns+p)*width_f coefficients. |
| [in] | nsel_which_mat | Select boundary matrix operation. |
|
static |
Host-mirror implementation of complex two-dimensional rebasing.
| [in,out] | v | Host mirror modified in place. |
| [in] | nsel_which_mat | Select boundary matrix operation. |
|
static |
Rebase a real radial/poloidal vector through host staging.
| [in,out] | v | Flattened storage of at least (ns+p)*nchi values. |
| [in] | nsel_which_mat | Select T, T^T, or T^-1. |
|
static |
Rebase an already host-resident real vector in place.
| [in,out] | v | Flattened storage of at least (ns+p)*nchi values. |
| [in] | nsel_which_mat | Select T, T^T, or T^-1. |
|
static |
Rebase contiguous host data as one real coefficient vector.
| [in,out] | data | Pointer to size values. |
| [in] | size | Available length; short buffers are warned about and unchanged. |
| [in] | nsel_which_mat | Select boundary matrix operation. |
|
static |
Rebase every column of a real 2-D View through host staging.
| [in,out] | v | First extent holds flattened radial/poloidal coefficients. |
| [in] | nsel_which_mat | Select T, T^T, or T^-1. |
|
static |
Rebase every column of a host-resident real 2-D View.
| [in,out] | v | Matrix whose first extent is the coefficient vector. |
| [in] | nsel_which_mat | Select boundary matrix operation. |
|
static |
Rebase columns of contiguous host matrix data.
| [in,out] | data | Contiguous Kokkos-layout matrix storage. |
| [in] | size0 | Coefficient-vector extent. |
| [in] | size1 | Number of columns. |
| [in] | nsel_which_mat | Select boundary matrix operation. |
Evaluate the active cell-local B-spline basis.
| [in] | z | Dimensionless cell coordinate, normally in [0,1]. |
p+1 dimensionless basis values. MPI_COMM_WORLD.