Molecular Dynamics Simulation
1.0
|
Class to calculate gravitational forces between particles. Implements the interface PairwiseForceSource. More...
#include <GravitationalForce.h>
Public Member Functions | |
std::array< double, 3UL > | calculateForce (const Particle &p, const Particle &q) const override |
Calculates the gravitational forces between two particles. More... | |
operator std::string () const override | |
Returns "Gravity" as name of the force. More... | |
Public Member Functions inherited from PairwiseForceSource | |
virtual | ~PairwiseForceSource ()=default |
Virtual destructor for correct cleanup of derived classes. More... | |
Class to calculate gravitational forces between particles. Implements the interface PairwiseForceSource.
Implementation of the force calculation to simulate gravity forces between particles. This class implements the interface PairwiseForceSource.
Definition at line 11 of file GravitationalForce.h.
|
overridevirtual |
Calculates the gravitational forces between two particles.
Calculates the gravitational force which q exerts on p
Implements PairwiseForceSource.
Definition at line 5 of file GravitationalForce.cpp.
|
explicitoverridevirtual |
Returns "Gravity" as name of the force.
Implements PairwiseForceSource.
Definition at line 14 of file GravitationalForce.cpp.