Discontinuous Galerkin Library
#include "dg/algorithm.h"
dg::IPolynomialHeaviside Struct Reference

\( f(x) = \begin{cases} x_b \text{ if } x < x_b-a \\ x_b + ((35 a^3 - 47 a^2 (x - x_b) + 25 a (x - x_b)^2 - 5 (x - x_b)^3) (a + x - x_b)^5)/(256 a^7) \text{ if } |x-x_b| < a \\ x \text{ if } x > x_b + a \end{cases}\) The integral of PolynomialHeaviside approximates xH(x) More...

Public Member Functions

 IPolynomialHeaviside (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
 

Detailed Description

\( f(x) = \begin{cases} x_b \text{ if } x < x_b-a \\ x_b + ((35 a^3 - 47 a^2 (x - x_b) + 25 a (x - x_b)^2 - 5 (x - x_b)^3) (a + x - x_b)^5)/(256 a^7) \text{ if } |x-x_b| < a \\ x \text{ if } x > x_b + a \end{cases}\) The integral of PolynomialHeaviside approximates xH(x)

This function is 4 times continuously differentiable,
has a transition width \c a on both sides of \c xb, where it transitions from the
constant \c xb to the linear function \c x.

Constructor & Destructor Documentation

◆ IPolynomialHeaviside()

dg::IPolynomialHeaviside::IPolynomialHeaviside ( double  xb,
double  a,
int  sign = +1 
)
inline

Construct with xb, width and sign.

Parameters
xbboundary value
atransition width (must be != 0)
signeither +1 (original) or -1 (the function is point mirrored at x=xb: 2*xb-f(2xb-x))

Member Function Documentation

◆ operator()() [1/3]

DG_DEVICE double dg::IPolynomialHeaviside::operator() ( double  x) const
inline

◆ operator()() [2/3]

DG_DEVICE double dg::IPolynomialHeaviside::operator() ( double  x,
double  y 
) const
inline

◆ operator()() [3/3]

DG_DEVICE double dg::IPolynomialHeaviside::operator() ( double  x,
double  y,
double  z 
) const
inline

The documentation for this struct was generated from the following file: