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

Computes the total mass of all SPH particles. More...

#include <Integrals.h>

Inheritance diagram for TotalMass:
IIntegral< Float > Polymorphic

Public Member Functions

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

Computes the total mass of all SPH particles.

Storage must contains particle masses, of course; checked by assert.

Note
Total mass is always conserved automatically as particles do not change their mass. This is therefore only useful as a sanity check, or potentially when using solver with variable number of particles.

Definition at line 49 of file Integrals.h.

Member Function Documentation

◆ evaluate()

NAMESPACE_SPH_BEGIN Float TotalMass::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 9 of file Integrals.cpp.

◆ getName()

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

Returns the name of the integral.

Needed to label the integral in logs, GUI etc.

Implements IIntegral< Float >.

Definition at line 53 of file Integrals.h.


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