Skip to content

num::sph_kernel

Defined in header <spatial/sph_kernel.hpp>

template <int Dim>
struct sph_kernel;

Kernels for smoothed particle hydrodynamics: Monaghan's cubic spline \(W(r, h)\) and Desbrun's spiky gradient. Support is \(r \le 2h\).

Members

member description
static float W(float r, float h) Evaluate the cubic spline kernel: \(W(r, h)\), \(\int W\, dV = 1\).
static float dW_dr(float r, float h) Evaluate the radial derivative of the cubic spline kernel: \(\partial W / \partial r\).
static float Spiky_dW_dr(float r, float h) Evaluate the radial derivative of the spiky kernel: \(\partial W_{\mathrm{spiky}} / \partial r\).
static std::array<float, Dim> Spiky_gradW(std::array<float, Dim> r_vec, float r, float h) Evaluate the gradient of the spiky kernel: \(\nabla W_{\mathrm{spiky}}(r_{ij}, h)\).