DubinerTetrahedron
Dubiner orthogonal modal basis on the reference tetrahedron.
Defined in Rodin/Variational/H1/Dubiner.h
template < size_t K> class DubinerTetrahedron;
| Template parameters | |
|---|---|
| K | Maximum polynomial degree. |
Provides evaluation of the Dubiner basis functions on collapsed coordinates , mapped from the reference tetrahedron with vertices .
The basis uses a Duffy-type collapse and is constructed as:
Public types
- struct Values
- Selects the value column of caller-owned modal rows.
- struct Gradients
- Selects the three derivative columns of caller-owned modal rows.
- using Tabulation = std::array<std::array<Real, 4>,(K+1)*(K+2)*(K+3)/6>
- Fixed modal rows containing a value followed by three derivatives.
Public static functions
-
static void tabulate(Tabulation& output,
const Math::
SpatialPoint& rc) - Tabulates all four modal columns with shared point-local work.
-
static void tabulate(Values values,
const Math::
SpatialPoint& rc) - Tabulates modal values at one point.
-
static void tabulate(Gradients gradients,
const Math::
SpatialPoint& rc) - Tabulates modal reference gradients at one point.
-
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 .
- getGradient
- Gets the gradient of the basis function.
- getReferenceGradient
- Computes the gradient of in reference coordinates.
- getReferenceGradientFromCollapsed
- Computes the gradient of 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.
Typedef documentation
using Tabulation = std::array<std::array<Real, 4>,(K+1)*(K+2)*(K+3)/6>
Fixed modal rows containing a value followed by three derivatives.
Row contains . Its compile-time layout retains the original point-local modal workspace.
Function documentation
static void tabulate(Tabulation& output,
const Math:: SpatialPoint& rc)
Tabulates all four modal columns with shared point-local work.
| Parameters | |
|---|---|
| output | Caller-owned fixed-layout modal rows. |
| rc | Three reference coordinates, with optional trailing padding. |
| Exceptions | |
| Alert::Exception | If coordinates are invalid. |
static void tabulate(Values values,
const Math:: SpatialPoint& rc)
Tabulates modal values at one point.
| Parameters | |
|---|---|
| values | Mode-indexed output. |
| rc | Reference coordinates. |
| Exceptions | |
| Alert::Exception | If coordinates are invalid. |
static void tabulate(Gradients gradients,
const Math:: SpatialPoint& rc)
Tabulates modal reference gradients at one point.
| Parameters | |
|---|---|
| gradients | Mode-major output. |
| rc | Reference coordinates. |
| Exceptions | |
| Alert::Exception | If coordinates are invalid. |
template<size_t K>
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 .
| 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 getGradient(Real& dpsi_da,
Real& dpsi_db,
Real& dpsi_dc,
Real a,
Real b,
Real c) constexpr
Gets the gradient of the basis function.
| Parameters | |
|---|---|
| dpsi_da | Storage for the derivative in the first collapsed coordinate. |
| dpsi_db | Storage for the derivative in the second collapsed coordinate. |
| dpsi_dc | Storage for the derivative in the third collapsed coordinate. |
| a | Coordinate at which the basis is evaluated. |
| b | Coordinate at which the basis is evaluated. |
| c | Coordinate at which the basis is evaluated. |
template<size_t K>
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 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 . |
| dpsi_dy out | Derivative with respect to . |
| dpsi_dz out | Derivative with respect to . |
| 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 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 from precomputed collapsed coordinates.
| Parameters | |
|---|---|
| dpsi_dx out | Derivative with respect to . |
| dpsi_dy out | Derivative with respect to . |
| dpsi_dz out | Derivative with respect to . |
| a | First collapsed coordinate. |
| b | Second collapsed coordinate. |
| c | Third collapsed coordinate. |
| s1 | Value of . |
| s2 | Value of . |
This overload avoids repeated Duffy-coordinate transformations while tabulating all modes at the same reference point.
static void getCollapsed(Real& a, Real& b, Real& c, Real x, Real y, Real z) constexpr
Maps reference coordinates to collapsed coordinates.
| Parameters | |
|---|---|
| a | Storage for the first collapsed coordinate. |
| b | Storage for the second collapsed coordinate. |
| c | Storage for the third collapsed coordinate. |
| x | Coordinate at which the basis is evaluated. |
| y | Coordinate at which the basis is evaluated. |
| z | Coordinate at which the basis is evaluated. |