Molecular Dynamics Simulation
1.0
|
Interface for particle containers. More...
#include <ParticleContainer.h>
Public Member Functions | |
virtual | ~ParticleContainer ()=default |
Virtual destructor for correct deconstruction of inheriting classes. More... | |
virtual void | addParticle (const Particle &p)=0 |
Adds a particle to the container. More... | |
virtual void | addParticle (Particle &&p)=0 |
Adds a particle to the container. More... | |
virtual void | prepareForceCalculation ()=0 |
Prepares everything for the force calculations (must be called before applySimpleForces and applyPairwiseForces) More... | |
virtual void | applySimpleForces (const std::vector< std::shared_ptr< SimpleForceSource >> &simple_force_sources)=0 |
Applies the given simple force sources to the particles. More... | |
virtual void | applyPairwiseForces (const std::vector< std::shared_ptr< PairwiseForceSource >> &pairwise_force_sources)=0 |
Applies the given pairwise force sources to the particles. More... | |
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. More... | |
virtual void | reserve (size_t n)=0 |
Reserves space for n particles. More... | |
virtual size_t | size () const =0 |
Returns the number of particles in the container. More... | |
virtual Particle & | operator[] (int i)=0 |
Overload of the [] operator to access the particles in the container. More... | |
virtual std::vector< Particle >::iterator | begin ()=0 |
The begin iterator for the internal data structure. More... | |
virtual std::vector< Particle >::iterator | end ()=0 |
The end iterator for the internal data structure. More... | |
virtual std::vector< Particle >::const_iterator | begin () const =0 |
The begin const iterator for the internal data structure. More... | |
virtual std::vector< Particle >::const_iterator | end () const =0 |
The end const iterator for the internal data structure. More... | |
virtual const std::vector< Particle > & | getParticles () const =0 |
Returns a vector of all particles in the container. More... | |
Interface for particle containers.
This class defines the interface for particle containers. Further information about the implementation can be found in Particle Containers
Definition at line 17 of file ParticleContainer.h.
|
virtualdefault |
Virtual destructor for correct deconstruction of inheriting classes.
|
pure virtual |
Adds a particle to the container.
p | Particle to be added |
Adds a particle to the container.
Implemented in LinkedCellsContainer, and DirectSumContainer.
|
pure virtual |
Adds a particle to the container.
p | Particle to be added |
Adds a particle to the container.
Implemented in LinkedCellsContainer, and DirectSumContainer.
|
pure virtual |
Applies the given pairwise force sources to the particles.
pairwise_force_sources | List of pairwise force sources to be applied |
Applies the given pairwise force sources to the particles in the container. Uses newton's third law to calculate the forces between the particles in an optimized way.
Implemented in DirectSumContainer, and LinkedCellsContainer.
|
pure virtual |
Applies the given simple force sources to the particles.
simple_force_sources | List of simple force sources to be applied |
Applies the given simple force sources to the particles in the container.
Implemented in LinkedCellsContainer, and DirectSumContainer.
|
pure virtual |
Applies the given targetted force sources to the particles.
targetted_force_sources | List of targetted force sources to be applied |
curr_simulation_time | Current simulation time |
Applies the given targetted force sources to the particles in the container.
Implemented in LinkedCellsContainer, and DirectSumContainer.
|
pure virtual |
The begin const iterator for the internal data structure.
Implemented in LinkedCellsContainer, and DirectSumContainer.
|
pure virtual |
The begin iterator for the internal data structure.
Implemented in LinkedCellsContainer, and DirectSumContainer.
|
pure virtual |
The end const iterator for the internal data structure.
Implemented in LinkedCellsContainer, and DirectSumContainer.
|
pure virtual |
The end iterator for the internal data structure.
Implemented in LinkedCellsContainer, and DirectSumContainer.
|
pure virtual |
Returns a vector of all particles in the container.
Implemented in LinkedCellsContainer, and DirectSumContainer.
|
pure virtual |
Overload of the [] operator to access the particles in the container.
i |
Implemented in LinkedCellsContainer, and DirectSumContainer.
|
pure virtual |
Prepares everything for the force calculations (must be called before applySimpleForces and applyPairwiseForces)
Implemented in LinkedCellsContainer, and DirectSumContainer.
|
pure virtual |
Reserves space for n particles.
n | Amount of particles to store in the container |
Implemented in LinkedCellsContainer, and DirectSumContainer.
|
pure virtual |
Returns the number of particles in the container.
Implemented in LinkedCellsContainer, and DirectSumContainer.