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

\( f(x,y,z) = Ae^{-\left(\frac{(x-x_0)^2}{2\sigma_x^2} + \frac{(y-y_0)^2}{2\sigma_y^2} + \frac{(z-z_0)^2}{2\sigma_z^2}\right)} \) More...

Public Member Functions

 Gaussian3d (double x0, double y0, double z0, double sigma_x, double sigma_y, double sigma_z, double amp)
 Functor returning a Gaussian. More...
 
DG_DEVICE double operator() (double x, double y) const
 Return a 2d Gaussian. More...
 
DG_DEVICE double operator() (double x, double y, double z) const
 Return the value of the Gaussian. More...
 

Detailed Description

\( f(x,y,z) = Ae^{-\left(\frac{(x-x_0)^2}{2\sigma_x^2} + \frac{(y-y_0)^2}{2\sigma_y^2} + \frac{(z-z_0)^2}{2\sigma_z^2}\right)} \)

Constructor & Destructor Documentation

◆ Gaussian3d()

dg::Gaussian3d::Gaussian3d ( double  x0,
double  y0,
double  z0,
double  sigma_x,
double  sigma_y,
double  sigma_z,
double  amp 
)
inline

Functor returning a Gaussian.

Parameters
x0x-center-coordinate
y0y-center-coordinate
z0z-center-coordinate
sigma_xx - variance (must be !=0)
sigma_yy - variance (must be !=0)
sigma_zz - variance (must be !=0)
ampAmplitude

Member Function Documentation

◆ operator()() [1/2]

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

Return a 2d Gaussian.

\[ f(x,y) = Ae^{-(\frac{(x-x_0)^2}{2\sigma_x^2} + \frac{(y-y_0)^2}{2\sigma_y^2})} \]

Parameters
xx - coordinate
yy - coordinate
Returns
gaussian

◆ operator()() [2/2]

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

Return the value of the Gaussian.

\[ f(x,y) = Ae^{-(\frac{(x-x_0)^2}{2\sigma_x^2} + \frac{(y-y_0)^2}{2\sigma_y^2}+\frac{(z-z_0)^2}{2\sigma_z^2})} \]

Parameters
xx - coordinate
yy - coordinate
zz - coordinate
Returns
gaussian

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