template<size_t K>
Rodin::Variational::DubinerTetrahedron class

Dubiner orthogonal modal basis on the reference tetrahedron.

Template parameters
K Maximum polynomial degree.

Provides evaluation of the Dubiner basis functions $ \psi_{p,q,r}(a,b,c) $ on collapsed coordinates $ (a,b,c) \in [-1,1]^3 $ , mapped from the reference tetrahedron with vertices $ (0,0,0), (1,0,0), (0,1,0), (0,0,1) $ .

The basis uses a Duffy-type collapse and is constructed as:

\[ \psi_{p,q,r}(a,b,c) = P_p^{(0,0)}(a) \cdot P_q^{(2p+1,0)}(b) \cdot P_r^{(2p+2q+2,0)}(c) \cdot \left(\frac{1-b}{2}\right)^p \cdot \left(\frac{1-c}{2}\right)^{p+q} \]

Public static functions

template<size_t P, size_t Q, size_t R>
static void getBasis(Real& basis, Real a, Real b, Real c) constexpr
Evaluates the Dubiner basis function $ \psi_{P,Q,R}(a,b,c) $ .
template<size_t P, size_t Q, size_t R>
static void getGradient(Real& dpsi_da, Real& dpsi_db, Real& dpsi_dc, Real a, Real b, Real c) constexpr
Gets the gradient of the basis function.
template<size_t P, size_t Q, size_t R>
static void getReferenceGradient(Real& dpsi_dx, Real& dpsi_dy, Real& dpsi_dz, Real x, Real y, Real z) constexpr
Computes the gradient of $\psi_{P,Q,R}$ in reference coordinates.
template<size_t P, size_t Q, size_t R>
static void getReferenceGradientFromCollapsed(Real& dpsi_dx, Real& dpsi_dy, Real& dpsi_dz, Real a, Real b, Real c, Real s1, Real s2) constexpr
Computes the gradient of $\psi_{P,Q,R}$ from precomputed collapsed coordinates.
static void getCollapsed(Real& a, Real& b, Real& c, Real x, Real y, Real z) constexpr
Maps reference coordinates to collapsed coordinates.

Function documentation

template<size_t K> template<size_t P, size_t Q, size_t R>
static void Rodin::Variational::DubinerTetrahedron<K>::getBasis(Real& basis, Real a, Real b, Real c) constexpr

Evaluates the Dubiner basis function $ \psi_{P,Q,R}(a,b,c) $ .

Template parameters
P First modal index.
Q Second modal index.
R Third modal index (P + Q + R ≤ K).
Parameters
basis out The computed basis function value.
a First collapsed coordinate.
b Second collapsed coordinate.
c Third collapsed coordinate.

template<size_t K> template<size_t P, size_t Q, size_t R>
static void Rodin::Variational::DubinerTetrahedron<K>::getReferenceGradient(Real& dpsi_dx, Real& dpsi_dy, Real& dpsi_dz, Real x, Real y, Real z) constexpr

Computes the gradient of $\psi_{P,Q,R}$ in reference coordinates.

Template parameters
P First modal index.
Q Second modal index.
R Third modal index.
Parameters
dpsi_dx out Derivative with respect to $x$ .
dpsi_dy out Derivative with respect to $y$ .
dpsi_dz out Derivative with respect to $z$ .
x First reference coordinate.
y Second reference coordinate.
z Third reference coordinate.

The Duffy-coordinate factors cancel analytically before differentiation, so the returned derivative has a finite value on the collapsed edge and at the collapsed vertex.

template<size_t K> template<size_t P, size_t Q, size_t R>
static void Rodin::Variational::DubinerTetrahedron<K>::getReferenceGradientFromCollapsed(Real& dpsi_dx, Real& dpsi_dy, Real& dpsi_dz, Real a, Real b, Real c, Real s1, Real s2) constexpr

Computes the gradient of $\psi_{P,Q,R}$ from precomputed collapsed coordinates.

Parameters
dpsi_dx out Derivative with respect to $x$ .
dpsi_dy out Derivative with respect to $y$ .
dpsi_dz out Derivative with respect to $z$ .
a First collapsed coordinate.
b Second collapsed coordinate.
c Third collapsed coordinate.
s1 Value of $1-y-z$ .
s2 Value of $1-z$ .

This overload avoids repeated Duffy-coordinate transformations while tabulating all modes at the same reference point.