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 a, Real b) constexpr
- Evaluates the Dubiner basis function ψ_{P,Q} on the collapsed coordinates (a,b).
-
template<size_t P, size_t Q>static void getGradient(Real& dpsi_da, Real& dpsi_db, Real a, Real b) constexpr
- Computes the gradient of ψ_{P,Q} with respect to the collapsed coordinates (a,b).
- static void getCollapsed(Real& a, Real& b, Real x, Real y) constexpr
- Converts (x,y) on the reference triangle to collapsed coordinates (a,b) ∈ [-1,1]^2.
Function documentation
template<size_t K>
template<size_t P, size_t Q>
static void Rodin:: Variational:: DubinerTriangle<K>:: getBasis(Real& basis,
Real a,
Real b) constexpr
Evaluates the Dubiner basis function ψ_{P,Q} on the collapsed coordinates (a,b).
| 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. |
| a | First collapsed coordinate in [-1,1]. |
| b | 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_da,
Real& dpsi_db,
Real a,
Real b) constexpr
Computes the gradient of ψ_{P,Q} with respect to the collapsed coordinates (a,b).
| Template parameters | |
|---|---|
| P | First modal index. |
| Q | Second modal index. |
| Parameters | |
| dpsi_da out | Derivative w.r.t. a. |
| dpsi_db out | Derivative w.r.t. b. |
| a | First collapsed coordinate in [-1,1]. |
| b | Second collapsed coordinate in [-1,1]. |
Computes: dψ/da, dψ/db
a = 2x/(1-y) - 1, b = 2y - 1 da/dx = 2/(1-y), da/dy = 2x/(1-y)^2 db/dx = 0, db/dy = 2
so: dψ/dx = dψ/da * da/dx + dψ/db * db/dx dψ/dy = dψ/da * da/dy + dψ/db * db/dy
template<size_t K>
static void Rodin:: Variational:: DubinerTriangle<K>:: getCollapsed(Real& a,
Real& b,
Real x,
Real y) constexpr
Converts (x,y) on the reference triangle to collapsed coordinates (a,b) ∈ [-1,1]^2.
| Parameters | |
|---|---|
| a out | First collapsed coordinate. |
| b out | Second collapsed coordinate. |
| x | First reference coordinate in [0,1]. |
| y | Second reference coordinate in [0,1], with x+y ≤ 1. |
Reference triangle vertices: (0,0), (1,0), (0,1).
Mapping: b = 2y - 1 a = 2x/(1-y) - 1 if 1-y > tol a = -1 otherwise (collapse at the top edge/vertex y=1)