SPH
Public Member Functions | List of all members
Kernel< TDerived, D > Class Template Reference

Base class for all SPH kernels. More...

#include <Kernel.h>

Inheritance diagram for Kernel< TDerived, D >:
Noncopyable

Public Member Functions

 Kernel ()=default
 
INLINE Float value (const Vector &r, const Float h) const noexcept
 
INLINE Vector grad (const Vector &r, const Float h) const noexcept
 
- Public Member Functions inherited from Noncopyable
 Noncopyable ()=default
 
 Noncopyable (const Noncopyable &)=delete
 
 Noncopyable (Noncopyable &&)=default
 
Noncopyableoperator= (const Noncopyable &)=delete
 
Noncopyableoperator= (Noncopyable &&)=default
 

Detailed Description

template<typename TDerived, Size D>
class Kernel< TDerived, D >

Base class for all SPH kernels.

Provides an interface for computing kernel values and gradients. All derived class must implement method valueImpl and gradImpl. Both function take SQUARED value of dimensionless distance q as a parameter. Function value returns the kernel value, grad returns gradient DIVIDED BY q.

Definition at line 19 of file Kernel.h.

Constructor & Destructor Documentation

◆ Kernel()

template<typename TDerived , Size D>
Kernel< TDerived, D >::Kernel ( )
default

Member Function Documentation

◆ grad()

template<typename TDerived , Size D>
INLINE Vector Kernel< TDerived, D >::grad ( const Vector r,
const Float  h 
) const
inlinenoexcept

Definition at line 32 of file Kernel.h.

◆ value()

template<typename TDerived , Size D>
INLINE Float Kernel< TDerived, D >::value ( const Vector r,
const Float  h 
) const
inlinenoexcept

Value of kernel at given point this should be called only once for a pair of particles as there is expensive division

Todo:
Potentially precompute the 3rd power ...

Definition at line 26 of file Kernel.h.


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