\( f(x) = B + 0.5 A(1+ \text{sign} \tanh((x-x_b)/\alpha ) ) \)
More...
\( f(x) = B + 0.5 A(1+ \text{sign} \tanh((x-x_b)/\alpha ) ) \)
An approximation to Heaviside using tanh
◆ TanhProfX()
dg::TanhProfX::TanhProfX |
( |
double |
xb, |
|
|
double |
width, |
|
|
int |
sign = 1 , |
|
|
double |
bgamp = 0. , |
|
|
double |
profamp = 1. |
|
) |
| |
|
inline |
Construct with xb, width and sign.
- Parameters
-
xb | boundary value |
width | damping width alpha (must be !=0) |
sign | sign of the Tanh, defines the damping direction |
bgamp | background amplitude B |
profamp | profile amplitude A |
- 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()() [1/3]
DG_DEVICE double dg::TanhProfX::operator() |
( |
double |
x | ) |
const |
|
inline |
◆ operator()() [2/3]
DG_DEVICE double dg::TanhProfX::operator() |
( |
double |
x, |
|
|
double |
y |
|
) |
| const |
|
inline |
◆ operator()() [3/3]
DG_DEVICE double dg::TanhProfX::operator() |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| const |
|
inline |
The documentation for this struct was generated from the following file: