Portage::Meshfree::Weight Namespace Reference

Classes

struct  FacetData
 data for specifying a faceted weight. More...
 

Enumerations

enum  Kernel {
  B4, SQUARE, EPANECHNIKOV, POLYRAMP,
  INVSQRT, COULOMB, STEP
}
 Kernel types. More...
 
enum  Geometry { ELLIPTIC, TENSOR, FACETED }
 Geometry types. More...
 

Functions

double sign (double x)
 scalar sign function. More...
 
double unit_step (double x)
 scalar step function More...
 
double b4 (double x)
 scalar cubic b-spline. More...
 
double db4 (double x)
 scalar cubic b-spline derivative. More...
 
double ddb4 (double x)
 scalar cubic b-spline second derivative. More...
 
double ib4 (double x)
 scalar cubic b-spline anti-derivative. More...
 
double b4lh (double x)
 scalar left half cubic b-spline. More...
 
double b4rh (double x)
 scalar right half cubic b-spline. More...
 
double epanechnikov (double x)
 scalar epanechnikov kernel. More...
 
double depanechnikov (double x)
 scalar epanechnikov kernel derivative. More...
 
double ddepanechnikov (double x)
 scalar epanechnikov kernel second derivative. More...
 
double square (double x)
 scalar square kernel. More...
 
double dsquare (double x)
 scalar square kernel derivative. More...
 
double ddsquare (double x)
 scalar square kernel second derivative. More...
 
double polyramp (double x)
 scalar smooth ramp for faceted weight. More...
 
double dpolyramp (double x)
 scalar smooth ramp for faceted weight derivative. More...
 
double ddpolyramp (double x)
 scalar smooth ramp for faceted weight derivative. More...
 
double invsqrt (double x)
 inverse square root kernel. More...
 
double dinvsqrt (double x)
 derivative of inverse square root kernel. More...
 
double ddinvsqrt (double x)
 second derivative of inverse square root kernel. More...
 
double coulomb (double x)
 coulomb weight. More...
 
double dcoulomb (double x)
 coulomb weight derivative. More...
 
double ddcoulomb (double x)
 coulomb weight second derivative. More...
 
double step (double x)
 step weight. More...
 
double dstep (double x)
 step weight derivative. More...
 
double ddstep (double x)
 step weight second derivative. More...
 
double kernel (const Kernel kern, double x)
 General kernel function. More...
 
template<int dim>
double elliptic (Wonton::Point< dim > const &x, Wonton::Point< dim > const &y, std::array< double, dim > const &h)
 generic elliptically symmetric weight function argument. More...
 
template<int dim>
std::array< double, dim > tensor (Wonton::Point< dim > const &x, Wonton::Point< dim > const &y, std::array< double, dim > const &h)
 generic tensor weight function arguments. More...
 
template<int dim>
double eval (Geometry const geometry, Kernel const kern, Wonton::Point< dim > const &x, Wonton::Point< dim > const &y, std::array< double, dim > const &h)
 evaluation function for elliptic or tensor product weights. More...
 
template<int dim>
double faceted (Kernel const kern, Wonton::Point< dim > const &x, Wonton::Point< dim > const &y, std::vector< FacetData< dim >> const &facets, size_t nsides)
 faceted weight function More...
 
template<int dim>
double eval (Geometry const geo, Kernel const kern, Wonton::Point< dim > const &x, Wonton::Point< dim > const &y, std::vector< std::vector< double >> const &vh)
 evaluation function for any weight. More...
 

Variables

double const normconst [4] = { 2./3., 1./(.7 * M_PI), 1./M_PI, 1./M_PI }
 normalization constants for cubic B-spline (linear, cylindrical, and spherical). More...
 
double const epsilon = std::numeric_limits<double>::epsilon()
 Numerical tolerance. More...
 

Enumeration Type Documentation

◆ Geometry

Geometry types.

Enumerator
ELLIPTIC 
TENSOR 
FACETED 

◆ Kernel

Kernel types.

Enumerator
B4 
SQUARE 
EPANECHNIKOV 
POLYRAMP 
INVSQRT 
COULOMB 
STEP 

Function Documentation

◆ b4()

double Portage::Meshfree::Weight::b4 ( double  x)
inline

scalar cubic b-spline.

Parameters
xgiven scalar
Returns
its value at x.

◆ b4lh()

double Portage::Meshfree::Weight::b4lh ( double  x)
inline

scalar left half cubic b-spline.

Parameters
xgiven scalar
Returns
its value at x.

◆ b4rh()

double Portage::Meshfree::Weight::b4rh ( double  x)
inline

scalar right half cubic b-spline.

Parameters
xgiven scalar
Returns
its value at x.

◆ coulomb()

double Portage::Meshfree::Weight::coulomb ( double  x)
inline

coulomb weight.

Parameters
xgiven scalar.
Returns
its value at x.

◆ db4()

double Portage::Meshfree::Weight::db4 ( double  x)
inline

scalar cubic b-spline derivative.

Parameters
xgiven scalar
Returns
its value at x.

◆ dcoulomb()

double Portage::Meshfree::Weight::dcoulomb ( double  x)
inline

coulomb weight derivative.

Parameters
xgiven scalar.
Returns
its value at x.

◆ ddb4()

double Portage::Meshfree::Weight::ddb4 ( double  x)
inline

scalar cubic b-spline second derivative.

Parameters
xgiven scalar
Returns
its value at x.

◆ ddcoulomb()

double Portage::Meshfree::Weight::ddcoulomb ( double  x)
inline

coulomb weight second derivative.

Parameters
xgiven scalar.
Returns
its value at x.

◆ ddepanechnikov()

double Portage::Meshfree::Weight::ddepanechnikov ( double  x)
inline

scalar epanechnikov kernel second derivative.

Parameters
xgiven scalar.
Returns
its value at x.

◆ ddinvsqrt()

double Portage::Meshfree::Weight::ddinvsqrt ( double  x)
inline

second derivative of inverse square root kernel.

Parameters
xgiven scalar.
Returns
its value at x.

◆ ddpolyramp()

double Portage::Meshfree::Weight::ddpolyramp ( double  x)
inline

scalar smooth ramp for faceted weight derivative.

Parameters
xgiven scalar.
Returns
its value at x.

◆ ddsquare()

double Portage::Meshfree::Weight::ddsquare ( double  x)
inline

scalar square kernel second derivative.

Parameters
xgiven scalar.
Returns
its value at x.

◆ ddstep()

double Portage::Meshfree::Weight::ddstep ( double  x)
inline

step weight second derivative.

Parameters
xgiven scalar.
Returns
its value at x.

◆ depanechnikov()

double Portage::Meshfree::Weight::depanechnikov ( double  x)
inline

scalar epanechnikov kernel derivative.

Parameters
xgiven scalar.
Returns
its value at x.

◆ dinvsqrt()

double Portage::Meshfree::Weight::dinvsqrt ( double  x)
inline

derivative of inverse square root kernel.

Parameters
xgiven scalar.
Returns
its value at x.

◆ dpolyramp()

double Portage::Meshfree::Weight::dpolyramp ( double  x)
inline

scalar smooth ramp for faceted weight derivative.

Parameters
xgiven scalar.
Returns
its value at x.

◆ dsquare()

double Portage::Meshfree::Weight::dsquare ( double  x)
inline

scalar square kernel derivative.

Parameters
xgiven scalar.
Returns
its value at x.

◆ dstep()

double Portage::Meshfree::Weight::dstep ( double  x)
inline

step weight derivative.

Parameters
xgiven scalar.
Returns
its value at x.

◆ elliptic()

template<int dim>
double Portage::Meshfree::Weight::elliptic ( Wonton::Point< dim > const &  x,
Wonton::Point< dim > const &  y,
std::array< double, dim > const &  h 
)

generic elliptically symmetric weight function argument.

Template Parameters
dimspatial dimension.
Parameters
xfirst point
ysecond point
hsize metric
Returns
sqrt(sum_i (xi - yi)^2 / hi^2)

◆ epanechnikov()

double Portage::Meshfree::Weight::epanechnikov ( double  x)
inline

scalar epanechnikov kernel.

Parameters
xgiven scalar
Returns
its value at x.

◆ eval() [1/2]

template<int dim>
double Portage::Meshfree::Weight::eval ( Geometry const  geometry,
Kernel const  kern,
Wonton::Point< dim > const &  x,
Wonton::Point< dim > const &  y,
std::array< double, dim > const &  h 
)

evaluation function for elliptic or tensor product weights.

Template Parameters
dimspatial dimension.
Parameters
geometrythe geometry to consider.
kernthe kernel to consider.
xfirst point
ysecond point
hsize metric
Returns
evaluated kernel value.

◆ eval() [2/2]

template<int dim>
double Portage::Meshfree::Weight::eval ( Geometry const  geo,
Kernel const  kern,
Wonton::Point< dim > const &  x,
Wonton::Point< dim > const &  y,
std::vector< std::vector< double >> const &  vh 
)

evaluation function for any weight.

Template Parameters
dimspatial dimension.
Parameters
geothe geometry to consider.
kernthe kernel to consider.
xfirst point.
ysecond point.
vhsize matrix.
Returns
evaluated kernel value.

◆ faceted()

template<int dim>
double Portage::Meshfree::Weight::faceted ( Kernel const  kern,
Wonton::Point< dim > const &  x,
Wonton::Point< dim > const &  y,
std::vector< FacetData< dim >> const &  facets,
size_t  nsides 
)

faceted weight function

Template Parameters
dimspatial dimension.
Parameters
kernthe kernel to use.
xfirst point.
ysecond point.
facetslist of facets.
nsidesnumber of sides.
Returns
evaluated kernel value.

◆ ib4()

double Portage::Meshfree::Weight::ib4 ( double  x)
inline

scalar cubic b-spline anti-derivative.

Parameters
xgiven scalar
Returns
its value at x.

◆ invsqrt()

double Portage::Meshfree::Weight::invsqrt ( double  x)
inline

inverse square root kernel.

Parameters
xgiven scalar.
Returns
its value at x.

◆ kernel()

double Portage::Meshfree::Weight::kernel ( const Kernel  kern,
double  x 
)
inline

General kernel function.

Parameters
kernkernel type.
xgiven scalar.
Returns
related value.

◆ polyramp()

double Portage::Meshfree::Weight::polyramp ( double  x)
inline

scalar smooth ramp for faceted weight.

Parameters
xgiven scalar.
Returns
its value at x.

◆ sign()

double Portage::Meshfree::Weight::sign ( double  x)
inline

scalar sign function.

Parameters
xgiven scalar.
Returns
its sign.

◆ square()

double Portage::Meshfree::Weight::square ( double  x)
inline

scalar square kernel.

Parameters
xgiven scalar.
Returns
its value at x.

◆ step()

double Portage::Meshfree::Weight::step ( double  x)
inline

step weight.

Parameters
xgiven scalar.
Returns
its value at x.

◆ tensor()

template<int dim>
std::array<double,dim> Portage::Meshfree::Weight::tensor ( Wonton::Point< dim > const &  x,
Wonton::Point< dim > const &  y,
std::array< double, dim > const &  h 
)

generic tensor weight function arguments.

Template Parameters
dimspatial dimension.
Parameters
xfirst point
ysecond point
hsize metric
Returns
[(xi - yi) / hi]_{i=0,dim-1}

◆ unit_step()

double Portage::Meshfree::Weight::unit_step ( double  x)
inline

scalar step function

Variable Documentation

◆ epsilon

double const Portage::Meshfree::Weight::epsilon = std::numeric_limits<double>::epsilon()

Numerical tolerance.

◆ normconst

double const Portage::Meshfree::Weight::normconst[4] = { 2./3., 1./(.7 * M_PI), 1./M_PI, 1./M_PI }

normalization constants for cubic B-spline (linear, cylindrical, and spherical).