Molecular Dynamics Simulation
1.0
|
Interface for simple force source classes. More...
#include <SimpleForceSource.h>
Public Member Functions | |
virtual | ~SimpleForceSource ()=default |
Virtual destructor for correct cleanup of derived classes. More... | |
virtual std::array< double, 3UL > | calculateForce (Particle &p) const =0 |
Calculates the force a particle q exerts on another particle p. More... | |
virtual | operator std::string () const =0 |
Conversion from a force source object to a string containing its name. More... | |
Interface for simple force source classes.
Definition of an interface for simple force source classes. This is used to ensure inheriting classes implement the method calculateForce(Particle& p) according to our definition.
A ForceSource specifies the force exerted on a single particle p.
Definition at line 16 of file SimpleForceSource.h.
|
virtualdefault |
Virtual destructor for correct cleanup of derived classes.
Virtual destructor to ensure correct deletion of inheriting classes.
|
pure virtual |
Calculates the force a particle q exerts on another particle p.
p | Particle whose force is to be updated |
Calculates the force exerted on a particle p.
Implemented in HarmonicForce, and GlobalDownwardsGravity.
|
explicitpure virtual |
Conversion from a force source object to a string containing its name.
Implemented in HarmonicForce, and GlobalDownwardsGravity.