Molecular Dynamics Simulation  1.0
TargettedTemporaryConstantForce.h
Go to the documentation of this file.
1 #include <array>
2 
3 #include "TargettedForceSource.h"
4 
11  private:
15  const std::array<double, 3> force;
16 
20  const double start_time;
21 
25  const double end_time;
26 
27  public:
36  TargettedTemporaryConstantForce(const std::vector<size_t>& targetIndices, const std::array<double, 3>& force, double start_time,
37  double end_time);
38 
47  void applyForce(std::vector<Particle>& particle_vector, double curr_simulation_time) const override;
48 
52  explicit operator std::string() const override;
53 };
Interface for targetted force source classes.
Class for a constant force source.
const double end_time
End Time within the simulation until which the force is exerted.
TargettedTemporaryConstantForce(const std::vector< size_t > &targetIndices, const std::array< double, 3 > &force, double start_time, double end_time)
Construct a new Targetted Temporary Constant Force object.
void applyForce(std::vector< Particle > &particle_vector, double curr_simulation_time) const override
Applies the force directly to the particles with the specified indices within the vector.
const std::array< double, 3 > force
Force exerted on the particles.
const double start_time
Start Time within the simulation from which on the force is exerted.