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

Computes total angular momentum of all SPH particles with a respect to the reference frame. More...

#include <Integrals.h>

Inheritance diagram for TotalAngularMomentum:
IIntegral< Vector > Polymorphic

Public Member Functions

 TotalAngularMomentum (const Float frameFrequency=0._f)
 
virtual Vector 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

Computes total angular momentum of all SPH particles with a respect to the reference frame.

Storage must contain at least particle masses and particle positions with velocities, checked by assert. If the particles also have nonzero angular velocities, the 'local' angular momenta are added to the total angular momentum.

Definition at line 81 of file Integrals.h.

Constructor & Destructor Documentation

◆ TotalAngularMomentum()

TotalAngularMomentum::TotalAngularMomentum ( const Float  frameFrequency = 0._f)
explicit

Definition at line 37 of file Integrals.cpp.

Member Function Documentation

◆ evaluate()

Vector TotalAngularMomentum::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.

Todo:
consolidate the angular momentum here - always in local frame? introduce physical quantity?

Implements IIntegral< Vector >.

Definition at line 40 of file Integrals.cpp.

◆ getName()

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

Returns the name of the integral.

Needed to label the integral in logs, GUI etc.

Implements IIntegral< Vector >.

Definition at line 90 of file Integrals.h.


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