Go to the documentation of this file.
10 #ifndef VTKM_KERNEL_GAUSSIAN_H
11 #define VTKM_KERNEL_GAUSSIAN_H
25 namespace splatkernels
28 template <
int Dimensions>
44 norm_ = 1.0 / vtkm::Pow(
M_PI,
static_cast<double>(Dimensions) / 2.0);
57 double w(
double distance)
const
72 double w2(
double distance2)
const
87 double w(
double h,
double distance)
const
91 double Hinverse = 1.0 / h;
92 double scale_W =
norm_ * PowerExpansion<Dimensions>(Hinverse);
93 double Q = distance * Hinverse;
103 double w2(
double h,
double distance2)
const
107 double Hinverse = 1.0 / h;
108 double scale_W =
norm_ * PowerExpansion<Dimensions>(Hinverse);
109 double Q = distance2 * Hinverse * Hinverse;
139 double Hinverse = 1.0 / h;
140 double scale_GradW = -2.0 * PowerExpansion<Dimensions + 1>(Hinverse) /
141 vtkm::Pow(
M_PI,
static_cast<double>(Dimensions) / 2.0);
142 double Q = distance * Hinverse;
147 return scale_GradW *
vtkm::Exp(-Q * Q) * pos;
Groups connected points that have the same field value.
Definition: Atomic.h:19
VTKM_EXEC_CONT double maxSquaredDistance(double h) const
Definition: Gaussian.h:173
VTKM_EXEC_CONT Gaussian(double smoothingLength)
Definition: Gaussian.h:36
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
VTKM_EXEC_CONT double w2(double h, double distance2) const
Definition: Gaussian.h:103
double scale_GradW_
Definition: Gaussian.h:185
double Hinverse_
Definition: Gaussian.h:180
double norm_
Definition: Gaussian.h:179
VTKM_EXEC_CONT double maxSquaredDistance() const
Definition: Gaussian.h:168
VTKM_EXEC_CONT vector_type gradW(double h, double distance, const vector_type &pos) const
Definition: Gaussian.h:137
double maxRadius_
Definition: Gaussian.h:182
#define M_PI
Definition: KernelBase.h:27
VTKM_EXEC_CONT vtkm::Float32 Exp(vtkm::Float32 x)
Computes e**x, the base-e exponential of x.
Definition: Math.h:1212
VTKM_EXEC_CONT double w(double distance) const
Definition: Gaussian.h:57
Definition: KernelBase.h:53
VTKM_EXEC_CONT double maxDistance(double h) const
Definition: Gaussian.h:163
VTKM_EXEC_CONT double w(double h, double distance) const
Definition: Gaussian.h:87
VTKM_EXEC_CONT double w2(double distance2) const
Definition: Gaussian.h:72
double Hinverse2_
Definition: Gaussian.h:181
VTKM_EXEC_CONT vector_type gradW(double distance, const vector_type &pos) const
Definition: Gaussian.h:120
constexpr VTKM_EXEC_CONT double getDilationFactor() const
Definition: Gaussian.h:52
VTKM_EXEC_CONT double maxDistance() const
Definition: Gaussian.h:158
vtkm::Vec3f_64 vector_type
Definition: KernelBase.h:24
double maxRadius2_
Definition: Gaussian.h:183
Definition: Gaussian.h:29
double scale_W_
Definition: Gaussian.h:184