|
Molecular Dynamics
v0.4
Project for the Practical hosted by the Scientific Computing Chair
|
Interface representing the force that the source exerts on the target. More...
#include <Force.h>


Public Member Functions | |
| virtual std::array< double, 3 > | compute (Particle &target, Particle &source)=0 |
| Actual computation of the force occurring. More... | |
| virtual | ~Force ()=default |
| virtual std::array< double, 3 > | computeOptimized (Particle &target, Particle &source, std::array< double, 3 > &difference, double distance)=0 |
| We needed this to integrate our optimization in our code to prevent breaking the inheritance hierachy. Will be removed, when we integrated the optimization properly. More... | |
Interface representing the force that the source exerts on the target.
This interface provides a generalization of the force that might occur between two particles. There are different types of forces which may all implement this interface.
|
virtualdefault |
Actual computation of the force occurring.
| target | Particle on which the force acts. |
| source | Particle which exerts the force on the target. |
This method may be implemented by any child of this class according to the type of force it represents.
Implemented in LennardJonesForce, HarmonicForce, and Gravity.
|
pure virtual |
We needed this to integrate our optimization in our code to prevent breaking the inheritance hierachy. Will be removed, when we integrated the optimization properly.
Implemented in LennardJonesForce, HarmonicForce, and Gravity.