|
Molecular Dynamics Simulation
1.0
|
Class to calculate the global downwards gravity force. More...
#include <GlobalDownwardsGravity.h>


Public Member Functions | |
| GlobalDownwardsGravity (double g) | |
| Constructor for the GlobalDownwardsGravity class. More... | |
| std::array< double, 3UL > | calculateForce (Particle &p) const override |
| Calculates the downwards gravity force on a particle using the given gravitational acceleration. More... | |
| operator std::string () const override | |
| Returns "Gravity" as name of the force. More... | |
| void | setGravitationalAcceleration (double g) |
| Sets the gravitational acceleration. More... | |
Public Member Functions inherited from SimpleForceSource | |
| virtual | ~SimpleForceSource ()=default |
| Virtual destructor for correct cleanup of derived classes. More... | |
Private Attributes | |
| double | g |
Class to calculate the global downwards gravity force.
Definition at line 8 of file GlobalDownwardsGravity.h.
|
explicit |
Constructor for the GlobalDownwardsGravity class.
| g | Gravitational acceleration |
Definition at line 3 of file GlobalDownwardsGravity.cpp.
|
overridevirtual |
Calculates the downwards gravity force on a particle using the given gravitational acceleration.
| p | Particle |
Implements SimpleForceSource.
Definition at line 5 of file GlobalDownwardsGravity.cpp.
|
explicitoverridevirtual |
Returns "Gravity" as name of the force.
Implements SimpleForceSource.
Definition at line 7 of file GlobalDownwardsGravity.cpp.
| void GlobalDownwardsGravity::setGravitationalAcceleration | ( | double | g | ) |
Sets the gravitational acceleration.
| g | Gravitational acceleration |
Definition at line 9 of file GlobalDownwardsGravity.cpp.
|
private |
Definition at line 10 of file GlobalDownwardsGravity.h.