template<size_t K>
DubinerTriangle class
Dubiner orthogonal modal basis on the reference triangle.
| Template parameters | |
|---|---|
| K | Maximum polynomial degree. |
This class provides evaluation of the Dubiner basis functions on the collapsed coordinate system , which maps from the reference triangle with vertices .
The Dubiner basis is constructed as a product of Jacobi polynomials:
where are collapsed coordinates derived from .
This basis is L2-orthogonal on the reference triangle, making it numerically stable for high-order polynomial approximations.
Public static functions
-
template<size_t P, size_t Q>static void getBasis(Real& basis, Real r, Real s) constexpr
- Evaluates the Dubiner basis function .
-
template<size_t P, size_t Q>static void getGradient(Real& dpsi_dr, Real& dpsi_ds, Real r, Real s) constexpr
- Computes the gradient of w.r.t. collapsed coordinates.
- static void getCollapsed(Real& r, Real& s, Real x, Real y) constexpr
- Converts reference triangle coordinates to collapsed coordinates.
Function documentation
template<size_t K>
template<size_t P, size_t Q>
static void Rodin:: Variational:: DubinerTriangle<K>:: getBasis(Real& basis,
Real r,
Real s) constexpr
Evaluates the Dubiner basis function .
| Template parameters | |
|---|---|
| P | First modal index (0 ≤ P). |
| Q | Second modal index (0 ≤ Q, P + Q ≤ K). |
| Parameters | |
| basis out | The computed basis function value. |
| r | First collapsed coordinate in [-1,1]. |
| s | Second collapsed coordinate in [-1,1]. |
template<size_t K>
template<size_t P, size_t Q>
static void Rodin:: Variational:: DubinerTriangle<K>:: getGradient(Real& dpsi_dr,
Real& dpsi_ds,
Real r,
Real s) constexpr
Computes the gradient of w.r.t. collapsed coordinates.
| Template parameters | |
|---|---|
| P | First modal index. |
| Q | Second modal index. |
| Parameters | |
| dpsi_dr out | Derivative w.r.t. r. |
| dpsi_ds out | Derivative w.r.t. s. |
| r | First collapsed coordinate. |
| s | Second collapsed coordinate. |
Uses the chain rule to compute:
template<size_t K>
static void Rodin:: Variational:: DubinerTriangle<K>:: getCollapsed(Real& r,
Real& s,
Real x,
Real y) constexpr
Converts reference triangle coordinates to collapsed coordinates.
| Parameters | |
|---|---|
| r out | First collapsed coordinate. |
| s out | Second collapsed coordinate. |
| x | First reference coordinate. |
| y | Second reference coordinate. |
Maps from the reference triangle to :
with singularity handling at (top vertex).