Constructs small element-local B-spline overlap operators.
More...
#include "mass_matrix.hpp"
|
| static void | compute_1d_mass_matrix (int nidbas, Real dx, Kokkos::View< Real ** > &mass_mat) |
| | Compute \(M_{ij}=\int B_i(x)B_j(x)\,dx\) on one uniform cell.
|
| static void | compute_2d_mass_matrix (int nidbas_s, int nidbas_chi, Real ds, Real dchi, Kokkos::View< Real **** > &mass_mat_2d) |
| | Form the tensor product of radial and poloidal 1-D mass matrices.
|
| static void | compute_inverse_mass_fourier (const Kokkos::View< Complex * > &mass_fourier, Kokkos::View< Complex * > &inv_mass_fourier, int nphi) |
| | Compute a guarded reciprocal for each Fourier coefficient.
|
| static void | compute_mass_matrix_toroidal_deriv (int nidbas, Real dx, Kokkos::View< Real ** > &mass_mat_deriv) |
| | Compute \(D_{ij}=\int B_i(x)\,dB_j/dx\,dx\) on one cell.
|
| static void | project_to_fourier (const Kokkos::View< Real ** > &mass_bspl, Kokkos::View< Complex * > &mass_fourier, int nphi) |
| | Populate per-mode coefficients from a B-spline mass matrix.
|
Constructs small element-local B-spline overlap operators.
These helpers create host-computed Kokkos views used to map between local B-spline coefficients and integral weights. They are separate from the production distributed matrices assembled by MatrixCoeff/SolverModule. Quadratic coefficients and Fourier projection in this utility are currently approximate, as stated by the implementation.
◆ compute_1d_mass_matrix()
| void orb5x::MassMatrix::compute_1d_mass_matrix |
( |
int | nidbas, |
|
|
Real | dx, |
|
|
Kokkos::View< Real ** > & | mass_mat ) |
|
static |
Compute \(M_{ij}=\int B_i(x)B_j(x)\,dx\) on one uniform cell.
- Parameters
-
| [in] | nidbas | B-spline degree; explicit coefficients exist for 1–3. |
| [in] | dx | Coordinate-space cell width; the matrix has the same units. |
| [in,out] | mass_mat | Output (nidbas+1)^2 device view, allocated when empty. |
- Note
- Unsupported degrees produce a diagonal matrix scaled by dx.
◆ compute_2d_mass_matrix()
| void orb5x::MassMatrix::compute_2d_mass_matrix |
( |
int | nidbas_s, |
|
|
int | nidbas_chi, |
|
|
Real | ds, |
|
|
Real | dchi, |
|
|
Kokkos::View< Real **** > & | mass_mat_2d ) |
|
static |
Form the tensor product of radial and poloidal 1-D mass matrices.
- Parameters
-
| [in] | nidbas_s | Radial B-spline degree. |
| [in] | nidbas_chi | Poloidal B-spline degree. |
| [in] | ds | Radial cell width in normalized s coordinates. |
| [in] | dchi | Poloidal cell width [rad]. |
| [in,out] | mass_mat_2d | Four-index tensor, allocated when empty. |
◆ compute_inverse_mass_fourier()
| void orb5x::MassMatrix::compute_inverse_mass_fourier |
( |
const Kokkos::View< Complex * > & | mass_fourier, |
|
|
Kokkos::View< Complex * > & | inv_mass_fourier, |
|
|
int | nphi ) |
|
static |
Compute a guarded reciprocal for each Fourier coefficient.
- Parameters
-
| [in] | mass_fourier | Complex mode coefficients. |
| [in,out] | inv_mass_fourier | Output reciprocals, allocated when empty. |
| [in] | nphi | Number of coefficients to process. |
- Note
- Magnitudes at or below 1e-12 map to zero.
◆ compute_mass_matrix_toroidal_deriv()
| void orb5x::MassMatrix::compute_mass_matrix_toroidal_deriv |
( |
int | nidbas, |
|
|
Real | dx, |
|
|
Kokkos::View< Real ** > & | mass_mat_deriv ) |
|
static |
Compute \(D_{ij}=\int B_i(x)\,dB_j/dx\,dx\) on one cell.
- Parameters
-
| [in] | nidbas | B-spline degree. |
| [in] | dx | Cell width; retained for interface parity although the implemented degree 1–3 reference coefficients are dimensionless. |
| [in,out] | mass_mat_deriv | Output square device view. |
◆ project_to_fourier()
| void orb5x::MassMatrix::project_to_fourier |
( |
const Kokkos::View< Real ** > & | mass_bspl, |
|
|
Kokkos::View< Complex * > & | mass_fourier, |
|
|
int | nphi ) |
|
static |
Populate per-mode coefficients from a B-spline mass matrix.
- Parameters
-
| [in] | mass_bspl | Square local mass matrix. |
| [in,out] | mass_fourier | Complex output of length nphi, allocated when empty. |
| [in] | nphi | Number of toroidal Fourier modes. |
- Warning
- The current implementation assigns the same element average to every mode; it is not a full discrete Fourier transform.
The documentation for this class was generated from the following file: