SPH
Public Member Functions | List of all members
IntegralWrapper Class Reference

Helper integral wrapping another integral and converting the returned value to scalar. More...

#include <Integrals.h>

Inheritance diagram for IntegralWrapper:
IIntegral< Float > Polymorphic

Public Member Functions

 IntegralWrapper ()=default
 
template<typename TIntegral >
 IntegralWrapper (AutoPtr< TIntegral > &&integral)
 
virtual Float evaluate (const Storage &storage) const override
 Computes the integral quantity using particles in the storage. More...
 
virtual std::string getName () const override
 Returns the name of the integral. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

Helper integral wrapping another integral and converting the returned value to scalar.

Works as type erasere, allowing to integrals without template parameters, store integrals of different types in one container, etc.

Definition at line 228 of file Integrals.h.

Constructor & Destructor Documentation

◆ IntegralWrapper() [1/2]

IntegralWrapper::IntegralWrapper ( )
default

◆ IntegralWrapper() [2/2]

template<typename TIntegral >
IntegralWrapper::IntegralWrapper ( AutoPtr< TIntegral > &&  integral)
inline

Definition at line 240 of file Integrals.h.

Member Function Documentation

◆ evaluate()

virtual Float IntegralWrapper::evaluate ( const Storage storage) const
inlineoverridevirtual

Computes the integral quantity using particles in the storage.

Storage must contain quantites relevant to the integral implementation. Generally positions, masses and density must be present.

Implements IIntegral< Float >.

Definition at line 246 of file Integrals.h.

◆ getName()

virtual std::string IntegralWrapper::getName ( ) const
inlineoverridevirtual

Returns the name of the integral.

Needed to label the integral in logs, GUI etc.

Implements IIntegral< Float >.

Definition at line 250 of file Integrals.h.


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