SPH
Public Member Functions | List of all members
IIntegral< Type > Class Template Referenceabstract

Interface for classes computing integral quantities from storage. More...

#include <Integrals.h>

Inheritance diagram for IIntegral< Type >:
Polymorphic

Public Member Functions

virtual Type evaluate (const Storage &storage) const =0
 Computes the integral quantity using particles in the storage. More...
 
virtual std::string getName () const =0
 Returns the name of the integral. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

template<typename Type>
class IIntegral< Type >

Interface for classes computing integral quantities from storage.

This interface is used to get reduced information from all particles (and possibly all quantities) in the storage. The result is a single value, type of which is given by the template parameter. This is useful to get integrals of motion, as the name suggests, as well as other useful values, like average/minimal/maximal value of given quantity, etc.

Todo:
automatically exclude ghost particles?

Definition at line 27 of file Integrals.h.

Member Function Documentation

◆ evaluate()

template<typename Type >
virtual Type IIntegral< Type >::evaluate ( const Storage storage) const
pure virtual

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.

Implemented in RelativeEnergyChange, IntegralWrapper, QuantityValue, QuantityMeans, CenterOfMass, TotalEnergy, TotalInternalEnergy, TotalKineticEnergy, TotalAngularMomentum, TotalMomentum, and TotalMass.

◆ getName()

template<typename Type >
virtual std::string IIntegral< Type >::getName ( ) const
pure virtual

Returns the name of the integral.

Needed to label the integral in logs, GUI etc.

Implemented in RelativeEnergyChange, SelectedParticleIntegral, IntegralWrapper, QuantityValue, QuantityMeans, CenterOfMass, TotalEnergy, TotalInternalEnergy, TotalKineticEnergy, TotalAngularMomentum, TotalMomentum, and TotalMass.


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