\( f(x) = \begin{cases} 0 \text{ if } x < x_b \\ 1 \text{ else} \end{cases}\)
More...
\( f(x) = \begin{cases} 0 \text{ if } x < x_b \\ 1 \text{ else} \end{cases}\)
- Note
- the 1 is inclusive i.e if x==x_b the functor always returns 1
◆ Heaviside()
dg::Heaviside::Heaviside |
( |
double |
xb, |
|
|
int |
sign = +1 |
|
) |
| |
|
inline |
Construct with xb and sign.
- Parameters
-
xb | boundary value |
sign | either +1 or -1, If -1, we mirror the Heaviside at the x=x_b axis, i.e. we swap the < sign in the definition to > |
- Note
- When sign is positive the function leaves the positive and damps the negative and vice versa when sign is negative the function leaves the negative and damps the positive.
◆ operator()()
DG_DEVICE double dg::Heaviside::operator() |
( |
double |
x | ) |
const |
|
inline |
The documentation for this struct was generated from the following file: