Molecular Dynamics Simulation
1.0
|
Interface for targetted force source classes. More...
#include <TargettedForceSource.h>
Public Member Functions | |
TargettedForceSource (const std::vector< size_t > &target_indices) | |
virtual | ~TargettedForceSource ()=default |
Virtual destructor for correct cleanup of derived classes. More... | |
virtual void | applyForce (std::vector< Particle > &particle_vector, double curr_simulation_time) const =0 |
Applies the force directly to the particles with the specified indices within the vector. More... | |
virtual | operator std::string () const =0 |
Conversion from a force source object to a string containing its name. More... | |
Protected Attributes | |
std::vector< size_t > | target_indices |
Indices of the particles on which the force is applied. More... | |
Interface for targetted force source classes.
Definition of an interface for targetted force source classes. This is used to ensure inheriting classes implement the method applyForce(std::vector<Particle>& particles) according to our definition.
A TargettedForceSource specifies the force exerted on a specific particles within a vector, using the index within that vector.
Definition at line 17 of file TargettedForceSource.h.
|
inline |
Definition at line 28 of file TargettedForceSource.h.
|
virtualdefault |
Virtual destructor for correct cleanup of derived classes.
Virtual destructor to ensure correct deletion of inheriting classes.
|
pure virtual |
Applies the force directly to the particles with the specified indices within the vector.
particle_vector | Particle vector on which the force is applied |
curr_simulation_time | Current simulation time |
Calculates and the force exerted on the particles identified by index within the given particle vector.
Implemented in TargettedTemporaryConstantForce.
|
explicitpure virtual |
Conversion from a force source object to a string containing its name.
Implemented in TargettedTemporaryConstantForce.
|
protected |
Indices of the particles on which the force is applied.
Definition at line 22 of file TargettedForceSource.h.