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

Returns the total kinetic energy of all particles. More...

#include <Integrals.h>

Inheritance diagram for TotalKineticEnergy:
IIntegral< Float > Polymorphic

Public Member Functions

 TotalKineticEnergy (const Float omega=0._f)
 
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

Returns the total kinetic energy of all particles.

Storage must contain at least particle masses and particle positions with velocities, checked by assert. If the particles also have nonzero angular velocities, the rotational energy is added to the total kinetic energy.

Definition at line 100 of file Integrals.h.

Constructor & Destructor Documentation

◆ TotalKineticEnergy()

TotalKineticEnergy::TotalKineticEnergy ( const Float  omega = 0._f)
explicit

Definition at line 93 of file Integrals.cpp.

Member Function Documentation

◆ evaluate()

Float TotalKineticEnergy::evaluate ( const Storage storage) const
overridevirtual

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 96 of file Integrals.cpp.

◆ getName()

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

Returns the name of the integral.

Needed to label the integral in logs, GUI etc.

Implements IIntegral< Float >.

Definition at line 109 of file Integrals.h.


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