Discontinuous Galerkin Library
#include "dg/algorithm.h"
|
\( f(x) = \begin{cases} 0 \text{ if } x < x_b-a \\ ((16 a^3 - 29 a^2 (x - x_b) + 20 a (x - x_b)^2 - 5 (x - x_b)^3) (a + x - x_b)^4)/(32 a^7) \text{ if } |x-x_b| < a \\ 1 \text{ if } x > x_b + a \end{cases}\) More...
Public Member Functions | |
PolynomialHeaviside (double xb, double a, int sign=+1) | |
Construct with xb, width and sign. More... | |
DG_DEVICE double | operator() (double x) const |
DG_DEVICE double | operator() (double x, double y) const |
DG_DEVICE double | operator() (double x, double y, double z) const |
\( f(x) = \begin{cases} 0 \text{ if } x < x_b-a \\ ((16 a^3 - 29 a^2 (x - x_b) + 20 a (x - x_b)^2 - 5 (x - x_b)^3) (a + x - x_b)^4)/(32 a^7) \text{ if } |x-x_b| < a \\ 1 \text{ if } x > x_b + a \end{cases}\)
An approximation to Heaviside using polynomials. This function is 3 times continuously differentiable, takes the value 0.5 at xb and has a transition width a on both sides of xb.
|
inline |
Construct with xb, width and sign.
xb | boundary value |
a | transition width (must be != 0) |
sign | either +1 (original Heaviside) or -1 (the function is mirrored at the x=xb axis: f(2xb-x)) |
|
inline |
|
inline |
|
inline |