Go to the documentation of this file.
10 #ifndef VTKM_KERNEL_SPLINE_3RD_ORDER_H
11 #define VTKM_KERNEL_SPLINE_3RD_ORDER_H
23 namespace splatkernels
26 template <vtkm::IdComponent Dim>
32 const double value = 10.0 / (7.0 *
M_PI);
38 const double value = 1.0 /
M_PI;
42 template <
int Dimensions>
66 double w(
double distance)
const
72 return scale_W_ * (1.0 - (3.0 / 2.0) * Q * Q + (3.0 / 4.0) * Q * Q * Q);
76 double q2 = (2.0 - Q);
77 return scale_W_ * (1.0 / 4.0) * (q2 * q2 * q2);
88 double w2(
double distance2)
const
94 return scale_W_ * (1.0 - (3.0 / 2.0) * Q * Q + (3.0 / 4.0) * Q * Q * Q);
98 double q2 = (2.0 - Q);
99 return scale_W_ * (1.0 / 4.0) * (q2 * q2 * q2);
110 double w(
double h,
double distance)
const
112 double Hinverse = 1.0 / h;
113 double scale_W =
norm_ * PowerExpansion<Dimensions>(Hinverse);
114 double Q = distance * Hinverse;
117 return scale_W * (1.0 - (3.0 / 2.0) * Q * Q + (3.0 / 4.0) * Q * Q * Q);
121 double q2 = (2.0 - Q);
122 return scale_W * (1.0 / 4.0) * (q2 * q2 * q2);
133 double w2(
double h,
double distance2)
const
135 double Hinverse = 1.0 / h;
136 double scale_W =
norm_ * PowerExpansion<Dimensions>(Hinverse);
137 double Q = sqrt(distance2) * Hinverse;
140 return scale_W * (1.0 - (3.0 / 2.0) * Q * Q + (3.0 / 4.0) * Q * Q * Q);
144 double q2 = (2.0 - Q);
145 return scale_W * (1.0 / 4.0) * (q2 * q2 * q2);
168 return scale_GradW_ * (-3.0 * Q + (9.0 / 4.0) * Q * Q) * pos;
172 double q2 = (2.0 - Q);
185 double Hinverse = 1.0 / h;
186 double scale_GradW =
norm_ * PowerExpansion<Dimensions + 1>(Hinverse);
187 double Q = distance * Hinverse;
194 return scale_GradW * (-3.0 * Q + (9.0 / 4.0) * Q * Q) * pos;
198 double q2 = (2.0 - Q);
199 return scale_GradW * (-3.0 / 4.0) * q2 * q2 * pos;
VTKM_EXEC_CONT double w2(double h, double distance2) const
Definition: Spline3rdOrder.h:133
double maxRadius_
Definition: Spline3rdOrder.h:236
Groups connected points that have the same field value.
Definition: Atomic.h:19
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
Definition: Spline3rdOrder.h:27
VTKM_EXEC_CONT vector_type gradW(double h, double distance, const vector_type &pos) const
Definition: Spline3rdOrder.h:183
VTKM_EXEC_CONT Spline3rdOrder(double smoothingLength)
Definition: Spline3rdOrder.h:50
double Hinverse_
Definition: Spline3rdOrder.h:234
VTKM_EXEC_CONT double getDilationFactor() const
Definition: Spline3rdOrder.h:230
VTKM_EXEC_CONT double maxSquaredDistance() const
Definition: Spline3rdOrder.h:220
double Hinverse2_
Definition: Spline3rdOrder.h:235
double scale_GradW_
Definition: Spline3rdOrder.h:239
#define M_PI
Definition: KernelBase.h:27
Definition: KernelBase.h:53
double norm_
Definition: Spline3rdOrder.h:233
double maxRadius2_
Definition: Spline3rdOrder.h:237
VTKM_EXEC_CONT double w2(double distance2) const
Definition: Spline3rdOrder.h:88
VTKM_EXEC_CONT vector_type gradW(double distance, const vector_type &pos) const
Definition: Spline3rdOrder.h:159
Definition: Spline3rdOrder.h:43
VTKM_EXEC_CONT double w(double distance) const
Definition: Spline3rdOrder.h:66
VTKM_EXEC_CONT double w(double h, double distance) const
Definition: Spline3rdOrder.h:110
double scale_W_
Definition: Spline3rdOrder.h:238
VTKM_EXEC_CONT double maxSquaredDistance(double h) const
Definition: Spline3rdOrder.h:225
vtkm::Vec3f_64 vector_type
Definition: KernelBase.h:24
VTKM_EXEC_CONT double maxDistance() const
Definition: Spline3rdOrder.h:210
VTKM_EXEC_CONT double maxDistance(double h) const
Definition: Spline3rdOrder.h:215