SPH
Public Member Functions | List of all members
LutKernel< D > Class Template Reference

A look-up table approximation of the kernel. More...

#include <Kernel.h>

Inheritance diagram for LutKernel< D >:
Kernel< LutKernel< D >, D > Noncopyable

Public Member Functions

 LutKernel ()=default
 
 LutKernel (const LutKernel &other)
 
 LutKernel (LutKernel &&other)
 
LutKerneloperator= (const LutKernel &other)
 
LutKerneloperator= (LutKernel &&other)=default
 
template<typename TKernel , typename = std::enable_if_t<!std::is_same<std::decay_t<TKernel>, LutKernel<D>>::value>>
 LutKernel (TKernel &&source)
 Constructs LUT kernel given an exact SPH kernel. More...
 
INLINE bool isInit () const
 
INLINE Float radius () const noexcept
 
INLINE Float valueImpl (const Float qSqr) const noexcept
 
INLINE Float gradImpl (const Float qSqr) const noexcept
 
- Public Member Functions inherited from Kernel< LutKernel< D >, D >
 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<Size D>
class LutKernel< D >

A look-up table approximation of the kernel.

Can be constructed from any SPH kernel. Use this class exclusively for any high-performance computations, it is always faster than using kernel functions directly (except for trivial kerneles, such as TriangleKernel). The precision difference is about 1.e-6.

Definition at line 51 of file Kernel.h.

Constructor & Destructor Documentation

◆ LutKernel() [1/4]

template<Size D>
LutKernel< D >::LutKernel ( )
default

◆ LutKernel() [2/4]

template<Size D>
LutKernel< D >::LutKernel ( const LutKernel< D > &  other)
inline

Definition at line 64 of file Kernel.h.

◆ LutKernel() [3/4]

template<Size D>
LutKernel< D >::LutKernel ( LutKernel< D > &&  other)
inline

Definition at line 68 of file Kernel.h.

◆ LutKernel() [4/4]

template<Size D>
template<typename TKernel , typename = std::enable_if_t<!std::is_same<std::decay_t<TKernel>, LutKernel<D>>::value>>
LutKernel< D >::LutKernel ( TKernel &&  source)
inline

Constructs LUT kernel given an exact SPH kernel.

Todo:
re-normalize?

Definition at line 85 of file Kernel.h.

Member Function Documentation

◆ gradImpl()

template<Size D>
INLINE Float LutKernel< D >::gradImpl ( const Float  qSqr) const
inlinenoexcept

Definition at line 129 of file Kernel.h.

◆ isInit()

template<Size D>
INLINE bool LutKernel< D >::isInit ( ) const
inline

Definition at line 103 of file Kernel.h.

◆ operator=() [1/2]

template<Size D>
LutKernel& LutKernel< D >::operator= ( const LutKernel< D > &  other)
inline

Definition at line 72 of file Kernel.h.

◆ operator=() [2/2]

template<Size D>
LutKernel& LutKernel< D >::operator= ( LutKernel< D > &&  other)
default

◆ radius()

template<Size D>
INLINE Float LutKernel< D >::radius ( ) const
inlinenoexcept

Definition at line 107 of file Kernel.h.

◆ valueImpl()

template<Size D>
INLINE Float LutKernel< D >::valueImpl ( const Float  qSqr) const
inlinenoexcept

Definition at line 111 of file Kernel.h.


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