SPHinXsys
alpha version
|
Abstract base class of a general SPH kernel function which is a smoothed Dirac delta function, a kernel function is radial symmetric, and has a scaling factor. Based on difference data type in 2d or 3d buildings, the kernel is defined for 2 and 3 dimensions. The kernel gives value one at the origin. The naming of kernel function follows the stand SPH literature. Currently, only constant smoothing length is applied. Basically, one can assign different kernel for different particle interactions. More...
#include <base_kernel.h>
Inherited by SPH::KernelCubicBSpline, SPH::KernelHyperbolic, SPH::KernelLaguerreGauss, SPH::KernelQuadratic, SPH::KernelTabulated< KernelType >, and SPH::KernelWendlandC2.
Public Member Functions | |
Kernel (Real h, const std::string &kernel_name="Kernel") | |
std::string | Name () const |
Real | SmoothingLength () const |
virtual Real | KernelSize () const |
Real | CutOffRadius () const |
Real | FactorW1D () const |
Real | FactorW2D () const |
Real | FactorW3D () const |
virtual Real | W (const Real &r_ij, const Real &displacement) const |
virtual Real | W (const Real &r_ij, const Vec2d &displacement) const |
virtual Real | W (const Real &r_ij, const Vec3d &displacement) const |
virtual Real | W_1D (const Real q) const =0 |
virtual Real | W_2D (const Real q) const =0 |
virtual Real | W_3D (const Real q) const =0 |
virtual Real | W0 (const Real &point_i) const |
virtual Real | W0 (const Vec2d &point_i) const |
virtual Real | W0 (const Vec3d &point_i) const |
virtual Real | dW (const Real &r_ij, const Real &displacement) const |
virtual Real | dW (const Real &r_ij, const Vec2d &displacement) const |
virtual Real | dW (const Real &r_ij, const Vec3d &displacement) const |
virtual Real | dW_1D (const Real q) const =0 |
virtual Real | dW_2D (const Real q) const =0 |
virtual Real | dW_3D (const Real q) const =0 |
virtual Real | d2W (const Real &r_ij, const Real &displacement) const |
virtual Real | d2W (const Real &r_ij, const Vec2d &displacement) const |
virtual Real | d2W (const Real &r_ij, const Vec3d &displacement) const |
virtual Real | d2W_1D (const Real q) const =0 |
virtual Real | d2W_2D (const Real q) const =0 |
virtual Real | d2W_3D (const Real q) const =0 |
Real | CutOffRadius (Real h_ratio) const |
Real | W (const Real &h_ratio, const Real &r_ij, const Real &displacement) const |
Real | W (const Real &h_ratio, const Real &r_ij, const Vec2d &displacement) const |
Real | W (const Real &h_ratio, const Real &r_ij, const Vec3d &displacement) const |
Real | W0 (const Real &h_ratio, const Real &point_i) const |
Real | W0 (const Real &h_ratio, const Vec2d &point_i) const |
Real | W0 (const Real &h_ratio, const Vec3d &point_i) const |
Real | dW (const Real &h_ratio, const Real &r_ij, const Real &displacement) const |
Real | dW (const Real &h_ratio, const Real &r_ij, const Vec2d &displacement) const |
Real | dW (const Real &h_ratio, const Real &r_ij, const Vec3d &displacement) const |
Real | d2W (const Real &h_ratio, const Real &r_ij, const Real &displacement) const |
Real | d2W (const Real &h_ratio, const Real &r_ij, const Vec2d &displacement) const |
Real | d2W (const Real &h_ratio, const Real &r_ij, const Vec3d &displacement) const |
void | reduceOnce () |
void | reduceTwice () |
Protected Types | |
typedef std::function< Real(const Real &)> | FactorFunctor |
Protected Attributes | |
const std::string | kernel_name_ |
Real | h_ |
Real | inv_h_ |
Real | cutoff_radius_ref_ |
Real | factor_W_1D_ |
Real | factor_W_2D_ |
Real | factor_W_3D_ |
Real | factor_dW_1D_ |
Real | factor_dW_2D_ |
Real | factor_dW_3D_ |
Real | factor_d2W_1D_ |
Real | factor_d2W_2D_ |
Real | factor_d2W_3D_ |
FactorFunctor | h_factor_W_1D_ |
FactorFunctor | h_factor_W_2D_ |
FactorFunctor | h_factor_W_3D_ |
FactorFunctor | h_factor_dW_1D_ |
FactorFunctor | h_factor_dW_2D_ |
FactorFunctor | h_factor_dW_3D_ |
FactorFunctor | h_factor_d2W_1D_ |
FactorFunctor | h_factor_d2W_2D_ |
FactorFunctor | h_factor_d2W_3D_ |
Abstract base class of a general SPH kernel function which is a smoothed Dirac delta function, a kernel function is radial symmetric, and has a scaling factor. Based on difference data type in 2d or 3d buildings, the kernel is defined for 2 and 3 dimensions. The kernel gives value one at the origin. The naming of kernel function follows the stand SPH literature. Currently, only constant smoothing length is applied. Basically, one can assign different kernel for different particle interactions.
Kernel Laguerre Gauss.
Kernel Cubic B_Spline.
|
protected |
Functor for variable smoothing length.
|
explicit |
empty initialization in constructor, initialization will be carried out later.
|
virtual |
Calculates the kernel second order derivation for the given distance of two particles
Real SPH::Kernel::d2W | ( | const Real & | h_ratio, |
const Real & | r_ij, | ||
const Real & | displacement | ||
) | const |
Calculates the kernel second order derivation for the given distance of two particles
|
pure virtual |
this value could be use to calculate the value of d2W they are realized in specific kernel implementations
Implemented in SPH::KernelCubicBSpline, SPH::KernelHyperbolic, SPH::KernelLaguerreGauss, SPH::KernelQuadratic, SPH::KernelWendlandC2, and SPH::KernelTabulated< KernelType >.
|
virtual |
Calculates the kernel derivation for the given distance of two particles
Real SPH::Kernel::dW | ( | const Real & | h_ratio, |
const Real & | r_ij, | ||
const Real & | displacement | ||
) | const |
Calculates the kernel derivation for the given distance of two particles
|
pure virtual |
this value could be use to calculate the value of dW they are realized in specific kernel implementations
Implemented in SPH::KernelCubicBSpline, SPH::KernelHyperbolic, SPH::KernelLaguerreGauss, SPH::KernelQuadratic, SPH::KernelWendlandC2, and SPH::KernelTabulated< KernelType >.
|
inlinevirtual |
non-dimensional size of the kernel, generally 2.0
Reimplemented in SPH::KernelTabulated< KernelType >.
void SPH::Kernel::reduceTwice | ( | ) |
reduce for thin structures or films
|
virtual |
Calculates the kernel value for the given displacement of two particles r_ij pointing from particle j to particle i
|
inlinevirtual |
Calculates the kernel value at the origin
Real SPH::Kernel::W0 | ( | const Real & | h_ratio, |
const Real & | point_i | ||
) | const |
Calculates the kernel value at the origin
|
pure virtual |
this value could be use to calculate the value of W they are realized in specific kernel implementations
Implemented in SPH::KernelCubicBSpline, SPH::KernelHyperbolic, SPH::KernelLaguerreGauss, SPH::KernelQuadratic, SPH::KernelWendlandC2, and SPH::KernelTabulated< KernelType >.
|
protected |
Auxiliary factors for the second order derivative of kernel function
|
protected |
Auxiliary factors for the derivative of kernel function
|
protected |
reference cut off radius Normalization factors for the kernel function
|
protected |
reference smoothing length and its inverse