numerics
Loading...
Searching...
No Matches
kernel3d.hpp
Go to the documentation of this file.
1/// @file kernel3d.hpp
2/// @brief SPH smoothing kernels for 3D WCSPH — delegates to num::SPHKernel<3>.
3///
4/// The implementation lives in include/spatial/sph_kernel.hpp.
5/// This file keeps the Kernel3D:: API used by the 3D backends unchanged.
6#pragma once
7
9
10namespace physics {
11
12struct Kernel3D {
13 static float W(float r, float h) {
14 return num::SPHKernel<3>::W(r, h);
15 }
16 static float dW_dr(float r, float h) {
17 return num::SPHKernel<3>::dW_dr(r, h);
18 }
19 static float Spiky_dW_dr(float r, float h) {
21 }
22 static void Spiky_gradW(float rx, float ry, float rz, float r, float h,
23 float& gx, float& gy, float& gz) {
24 auto g = num::SPHKernel<3>::Spiky_gradW({rx, ry, rz}, r, h);
25 gx = g[0]; gy = g[1]; gz = g[2];
26 }
27};
28
29} // namespace physics
Dimension-generic SPH smoothing kernels.
static std::array< float, Dim > Spiky_gradW(std::array< float, Dim > r_vec, float r, float h)
static float dW_dr(float r, float h)
static float Spiky_dW_dr(float r, float h)
Radial derivative dW/dr of spiky kernel (<= 0, non-zero at r=0).
static float W(float r, float h)
2D/3D cubic spline density kernel. Support = 2h.
static float dW_dr(float r, float h)
Definition kernel3d.hpp:16
static void Spiky_gradW(float rx, float ry, float rz, float r, float h, float &gx, float &gy, float &gz)
Definition kernel3d.hpp:22
static float Spiky_dW_dr(float r, float h)
Definition kernel3d.hpp:19
static float W(float r, float h)
Definition kernel3d.hpp:13