Discontinuous Galerkin Library
#include "dg/algorithm.h"

\( f(x) = B + 0.5 A(1+ \text{sign} \tanh((x-x_b)/\alpha ) ) \) More...

Public Member Functions

 TanhProfX (double xb, double width, int sign=1, double bgamp=0., double profamp=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
 

Detailed Description

\( f(x) = B + 0.5 A(1+ \text{sign} \tanh((x-x_b)/\alpha ) ) \)

An approximation to Heaviside using tanh

Constructor & Destructor Documentation

◆ 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
xbboundary value
widthdamping width alpha (must be !=0)
signsign of the Tanh, defines the damping direction
bgampbackground amplitude B
profampprofile 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.

Member Function Documentation

◆ 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: