SPH
Public Member Functions | Protected Attributes | List of all members
SphInterpolant< Type > Class Template Reference

Object for computing interpolated values of quantities. More...

#include <Interpolation.h>

Inheritance diagram for SphInterpolant< Type >:
IInterpolant< Type > Noncopyable CorrectedSphInterpolant< Type >

Public Member Functions

 SphInterpolant (const Storage &storage, const QuantityId id, const OrderEnum deriv, const RunSettings &settings=RunSettings::getDefaults())
 Constructs the interpolation object from settings. More...
 
 SphInterpolant (const Storage &storage, const QuantityId id, const OrderEnum deriv, AutoPtr< IBasicFinder > &&finder, LutKernel< 3 > &&kernel)
 Constructs the interpolation object given a neighbour finding object and a SPH kernel. More...
 
virtual Type interpolate (const Vector &pos) const override
 Compute quantity value at given position. More...
 
- Public Member Functions inherited from Noncopyable
 Noncopyable ()=default
 
 Noncopyable (const Noncopyable &)=delete
 
 Noncopyable (Noncopyable &&)=default
 
Noncopyableoperator= (const Noncopyable &)=delete
 
Noncopyableoperator= (Noncopyable &&)=default
 

Protected Attributes

ArrayView< const Vectorr
 
ArrayView< const Floatm
 
ArrayView< const Floatrho
 
ArrayView< const Type > quantity
 
AutoPtr< IBasicFinderfinder
 
LutKernel< 3 > kernel
 
Float searchRadius = 0._f
 

Detailed Description

template<typename Type>
class SphInterpolant< Type >

Object for computing interpolated values of quantities.

Quantity values or derivatives are interpolated using SPH kernel. If the point of interpolation lies outside of support of all SPH particles, the interpolated value is zero.

Template Parameters
TypeValue type of the quantity being interpolated.

Definition at line 35 of file Interpolation.h.

Constructor & Destructor Documentation

◆ SphInterpolant() [1/2]

template<typename Type >
SphInterpolant< Type >::SphInterpolant ( const Storage storage,
const QuantityId  id,
const OrderEnum  deriv,
const RunSettings settings = RunSettings::getDefaults() 
)
inline

Constructs the interpolation object from settings.

Definition at line 47 of file Interpolation.h.

◆ SphInterpolant() [2/2]

template<typename Type >
SphInterpolant< Type >::SphInterpolant ( const Storage storage,
const QuantityId  id,
const OrderEnum  deriv,
AutoPtr< IBasicFinder > &&  finder,
LutKernel< 3 > &&  kernel 
)
inline

Constructs the interpolation object given a neighbour finding object and a SPH kernel.

Parameters
finderObject for finding neighbours. Overload of INeighbourFinder::findNeighbours taking a vector must be implemented. Parameter must not be nullptr.
kernelSPH kernel used for interpolation.
idQuantity values of which we wish to interpolate. The quantity must be stored in the storage.
derivSpecifies whether to interpolate quantity values or its derivatives. For values, use OrderEnum::ZERO. If the first or second derivative is being interpolated, the quantity must be of corresponding order, checked by assert.

Definition at line 61 of file Interpolation.h.

Member Function Documentation

◆ interpolate()

template<typename Type >
virtual Type SphInterpolant< Type >::interpolate ( const Vector pos) const
inlineoverridevirtual

Compute quantity value at given position.

Parameters
posPosition where the interpolated value is computed.
Returns
Interpolated value

Implements IInterpolant< Type >.

Reimplemented in CorrectedSphInterpolant< Type >.

Definition at line 75 of file Interpolation.h.

Member Data Documentation

◆ finder

template<typename Type >
AutoPtr<IBasicFinder> SphInterpolant< Type >::finder
protected

Definition at line 41 of file Interpolation.h.

◆ kernel

template<typename Type >
LutKernel<3> SphInterpolant< Type >::kernel
protected

Definition at line 42 of file Interpolation.h.

◆ m

template<typename Type >
ArrayView<const Float> SphInterpolant< Type >::m
protected

Definition at line 38 of file Interpolation.h.

◆ quantity

template<typename Type >
ArrayView<const Type> SphInterpolant< Type >::quantity
protected

Definition at line 39 of file Interpolation.h.

◆ r

template<typename Type >
ArrayView<const Vector> SphInterpolant< Type >::r
protected

Definition at line 37 of file Interpolation.h.

◆ rho

template<typename Type >
ArrayView<const Float> SphInterpolant< Type >::rho
protected

Definition at line 38 of file Interpolation.h.

◆ searchRadius

template<typename Type >
Float SphInterpolant< Type >::searchRadius = 0._f
protected

Definition at line 43 of file Interpolation.h.


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