numerics
Loading...
Searching...
No Matches
num::SPHKernel< Dim > Struct Template Reference

Dimension-generic SPH smoothing kernels. Dim = 2 or 3. More...

#include <sph_kernel.hpp>

Static Public Member Functions

static float W (float r, float h)
 2D/3D cubic spline density kernel. Support = 2h.
 
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 std::array< float, DimSpiky_gradW (std::array< float, Dim > r_vec, float r, float h)
 

Detailed Description

template<int Dim>
struct num::SPHKernel< Dim >

Dimension-generic SPH smoothing kernels. Dim = 2 or 3.

Definition at line 66 of file sph_kernel.hpp.

Member Function Documentation

◆ dW_dr()

template<int Dim>
static float num::SPHKernel< Dim >::dW_dr ( float  r,
float  h 
)
inlinestatic

Radial derivative dW/dr of cubic spline (<= 0 for r > 0). Used for the Morris SPH Laplacian in viscosity and heat.

Definition at line 84 of file sph_kernel.hpp.

References num::ipow().

Referenced by physics::Kernel::dW_dr(), and physics::Kernel3D::dW_dr().

◆ Spiky_dW_dr()

template<int Dim>
static float num::SPHKernel< Dim >::Spiky_dW_dr ( float  r,
float  h 
)
inlinestatic

Radial derivative dW/dr of spiky kernel (<= 0, non-zero at r=0).

Definition at line 96 of file sph_kernel.hpp.

References num::ipow().

Referenced by physics::Kernel::Spiky_dW_dr(), and physics::Kernel3D::Spiky_dW_dr().

◆ Spiky_gradW()

template<int Dim>
static std::array< float, Dim > num::SPHKernel< Dim >::Spiky_gradW ( std::array< float, Dim r_vec,
float  r,
float  h 
)
inlinestatic

Gradient of spiky kernel: g = (dW/dr / r) * r_vec. Returns zero array if r < eps or r >= 2h.

Definition at line 102 of file sph_kernel.hpp.

References num::ipow().

Referenced by physics::Kernel::Spiky_gradW(), and physics::Kernel3D::Spiky_gradW().

◆ W()

template<int Dim>
static float num::SPHKernel< Dim >::W ( float  r,
float  h 
)
inlinestatic

2D/3D cubic spline density kernel. Support = 2h.

Definition at line 70 of file sph_kernel.hpp.

References num::ipow().

Referenced by physics::Kernel::W(), and physics::Kernel3D::W().


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