SPH
|
Computes the center of mass of particles. More...
#include <Integrals.h>
Public Member Functions | |
CenterOfMass (const Optional< Size > bodyId=NOTHING) | |
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... | |
![]() | |
virtual | ~Polymorphic () |
Computes the center of mass of particles.
By default, the center of mass is computed from all particles, optionally only particles belonging to body of given ID are considered. The center is evaluated with a respect to reference frame.
Definition at line 150 of file Integrals.h.
Definition at line 124 of file Integrals.cpp.
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< Vector >.
Definition at line 127 of file Integrals.cpp.
|
inlineoverridevirtual |
Returns the name of the integral.
Needed to label the integral in logs, GUI etc.
Implements IIntegral< Vector >.
Definition at line 159 of file Integrals.h.