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

\( f(x) = \begin{cases} 0 \text{ if } x < x_b-a || x > x_b+a \\ (35 (a + x - x_b)^3 (a - x + x_b)^3)/(32 a^7) \text{ if } |x-x_b| < a \end{cases}\) The derivative of PolynomialHeaviside approximates delta(x) More...

Public Member Functions

 DPolynomialHeaviside (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} 0 \text{ if } x < x_b-a || x > x_b+a \\ (35 (a + x - x_b)^3 (a - x + x_b)^3)/(32 a^7) \text{ if } |x-x_b| < a \end{cases}\) The derivative of PolynomialHeaviside approximates delta(x)

This function is 2 times continuously differentiable, is symmetric around xb and has a width a on both sides of x0. The integral over this function yields 1.

Constructor & Destructor Documentation

◆ DPolynomialHeaviside()

dg::DPolynomialHeaviside::DPolynomialHeaviside ( 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 mirrored at x=x0) (since this function is symmetric this parameter is ignored, it's there to be consistent with PolynomialHeaviside)

Member Function Documentation

◆ operator()() [1/3]

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

◆ operator()() [2/3]

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

◆ operator()() [3/3]

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

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