SPH
Classes | Functions
Kernel.h File Reference

SPH kernels. More...

#include "objects/containers/Array.h"
#include "objects/geometry/Vector.h"

Go to the source code of this file.

Classes

class  Kernel< TDerived, D >
 Base class for all SPH kernels. More...
 
class  LutKernel< D >
 A look-up table approximation of the kernel. More...
 
class  CubicSpline< D >
 Cubic spline (M4) kernel. More...
 
class  FourthOrderSpline< D >
 Fourth-order spline (M5) kernel. More...
 
class  CoreTriangle
 Kernel proposed by Read et al. (2010) with improved stability. More...
 
class  ThomasCouchmanKernel< D >
 Kernel introduced by Thomas & Couchman (1992). More...
 
class  WendlandC2
 
class  WendlandC4
 
class  WendlandC6
 
class  Gaussian< D >
 Gaussian kernel. More...
 
class  TriangleKernel< D >
 Triangular (piecewise linear) kernel. More...
 
class  ScalingKernel< D, TKernel >
 Helper kernel wrapper that modifies the support of another kernel. More...
 
class  SymmetrizeValues< TKernel >
 
class  SymmetrizeSmoothingLengths< TKernel >
 
struct  IsKernel< T, typename >
 
struct  IsKernel< T, VoidType< decltype(std::declval< T >().radius())> >
 

Functions

template<typename T >
INLINElaplacian (const T &value, const Vector &grad, const Vector &dr)
 SPH approximation of laplacian, computed from a kernel gradient. More...
 
INLINE Vector gradientOfDivergence (const Vector &value, const Vector &grad, const Vector &dr)
 Second derivative of vector quantity, applying gradient on a divergence. More...
 

Detailed Description

SPH kernels.

Author
Pavel Sevecek (sevecek at sirrah.troja.mff.cuni.cz))
Date
2016-2021

Definition in file Kernel.h.

Function Documentation

◆ gradientOfDivergence()

INLINE Vector gradientOfDivergence ( const Vector value,
const Vector grad,
const Vector dr 
)

Second derivative of vector quantity, applying gradient on a divergence.

Doesn't make sense for scalar quantities. See Price 2010 [Price_2010]

Definition at line 527 of file Kernel.h.

◆ laplacian()

template<typename T >
INLINE T laplacian ( const T &  value,
const Vector grad,
const Vector dr 
)

SPH approximation of laplacian, computed from a kernel gradient.

Is more stable than directly applying second derivatives to kernel and has the same error O(h^2). Can be used to compute laplacian of both scalar and vector quantities.

Parameters
valueScalar or vector value from which we compute the laplacian
gradKernel gradient corresponding to vector dr
Note
Note that the sign is different compared to the Eq. (95) of [Price_2010]. This is correct, provided the value is computed as v[j]-v[i], dr is computed as r[j]-r[i] and grad is computed as grad W(r[j]-r[i]).

Definition at line 519 of file Kernel.h.