54 virtual void applySimpleForces(
const std::vector<std::shared_ptr<SimpleForceSource>>& simple_force_sources) = 0;
64 virtual void applyPairwiseForces(
const std::vector<std::shared_ptr<PairwiseForceSource>>& pairwise_force_sources) = 0;
74 virtual void applyTargettedForces(
const std::vector<std::shared_ptr<TargettedForceSource>>& targetted_force_sources,
75 double curr_simulation_time) = 0;
89 [[nodiscard]]
virtual size_t size()
const = 0;
104 [[nodiscard]]
virtual std::vector<Particle>::iterator
begin() = 0;
111 [[nodiscard]]
virtual std::vector<Particle>::iterator
end() = 0;
118 [[nodiscard]]
virtual std::vector<Particle>::const_iterator
begin()
const = 0;
125 [[nodiscard]]
virtual std::vector<Particle>::const_iterator
end()
const = 0;
131 [[nodiscard]]
virtual const std::vector<Particle>&
getParticles()
const = 0;
Interface for particle containers.
virtual void applyTargettedForces(const std::vector< std::shared_ptr< TargettedForceSource >> &targetted_force_sources, double curr_simulation_time)=0
Applies the given targetted force sources to the particles.
virtual size_t size() const =0
Returns the number of particles in the container.
virtual void applyPairwiseForces(const std::vector< std::shared_ptr< PairwiseForceSource >> &pairwise_force_sources)=0
Applies the given pairwise force sources to the particles.
virtual void prepareForceCalculation()=0
Prepares everything for the force calculations (must be called before applySimpleForces and applyPair...
virtual const std::vector< Particle > & getParticles() const =0
Returns a vector of all particles in the container.
virtual std::vector< Particle >::const_iterator end() const =0
The end const iterator for the internal data structure.
virtual Particle & operator[](int i)=0
Overload of the [] operator to access the particles in the container.
virtual std::vector< Particle >::iterator end()=0
The end iterator for the internal data structure.
virtual void applySimpleForces(const std::vector< std::shared_ptr< SimpleForceSource >> &simple_force_sources)=0
Applies the given simple force sources to the particles.
virtual std::vector< Particle >::const_iterator begin() const =0
The begin const iterator for the internal data structure.
virtual ~ParticleContainer()=default
Virtual destructor for correct deconstruction of inheriting classes.
virtual void reserve(size_t n)=0
Reserves space for n particles.
virtual std::vector< Particle >::iterator begin()=0
The begin iterator for the internal data structure.
virtual void addParticle(Particle &&p)=0
Adds a particle to the container.
virtual void addParticle(const Particle &p)=0
Adds a particle to the container.
Class to represent a particle.