Molecular Dynamics Simulation  1.0
GlobalDownwardsGravity.h
Go to the documentation of this file.
1 #pragma once
2 
4 
9  private:
10  double g;
11 
12  public:
17  explicit GlobalDownwardsGravity(double g);
18 
24  std::array<double, 3UL> calculateForce(Particle& p) const override;
25 
29  explicit operator std::string() const override;
30 
36  void setGravitationalAcceleration(double g);
37 };
Class to calculate the global downwards gravity force.
void setGravitationalAcceleration(double g)
Sets the gravitational acceleration.
std::array< double, 3UL > calculateForce(Particle &p) const override
Calculates the downwards gravity force on a particle using the given gravitational acceleration.
GlobalDownwardsGravity(double g)
Constructor for the GlobalDownwardsGravity class.
Class to represent a particle.
Definition: Particle.h:26
Interface for simple force source classes.