45 virtual void applyForce(std::vector<Particle>& particle_vector,
double curr_simulation_time)
const = 0;
50 virtual explicit operator std::string()
const = 0;
55 os << static_cast<std::string>(forceSource);
std::ostream & operator<<(std::ostream &os, const TargettedForceSource &forceSource)
Interface for targetted force source classes.
TargettedForceSource(const std::vector< size_t > &target_indices)
virtual ~TargettedForceSource()=default
Virtual destructor for correct cleanup of derived classes.
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.
std::vector< size_t > target_indices
Indices of the particles on which the force is applied.