|
Molecular Dynamics
v0.4
Project for the Practical hosted by the Scientific Computing Chair
|
#include <ParticleContainer.h>


Public Member Functions | |
| virtual void | add (Particle &p)=0 |
| Add one particle to this container. More... | |
| virtual size_t | size () const =0 |
| Get the number of particles stored in this container. More... | |
| virtual void | applyToEachParticle (const std::function< void(Particle &)> &function)=0 |
| Iterate over all particles in this container and apply a lambda function to them. More... | |
| virtual void | applyToEachParticleInDomain (const std::function< void(Particle &)> &function)=0 |
| Iterate over all particles that are part of the domain and apply a lambda function to them. More... | |
| virtual void | applyToAllUniquePairsInDomain (const std::function< void(Particle &, Particle &)> &function)=0 |
| Iterate over all unique pairs of particles being part of the simulation domain and apply a lambda function to them. More... | |
| virtual | ~ParticleContainer ()=default |
| Virtual default constructor to guarantee appropriate memory clean up. More... | |
Abstract base class for a particle container. Each type of a particle container should extend this class.
|
virtualdefault |
Virtual default constructor to guarantee appropriate memory clean up.
|
pure virtual |
Add one particle to this container.
| p | Particle to be added to this container. |
Add one particle to this container. It will be appended.
Implemented in LinkedCellsContainer, and DefaultParticleContainer.

|
pure virtual |
Iterate over all unique pairs of particles being part of the simulation domain and apply a lambda function to them.
| function | Lambda function that is applied to each unique pair of particles. |
The purpose of this function is provide an easy way of calculating the force between all particles by using Newton's third law of motion.
Implemented in LinkedCellsContainer, and DefaultParticleContainer.

|
pure virtual |
Iterate over all particles in this container and apply a lambda function to them.
| function | Lambda function that is applied to each particle. |
Implemented in LinkedCellsContainer, and DefaultParticleContainer.

|
pure virtual |
Iterate over all particles that are part of the domain and apply a lambda function to them.
| function | Lambda function that is applied to each particle. |
Implemented in LinkedCellsContainer, and DefaultParticleContainer.

|
pure virtual |
Get the number of particles stored in this container.
Implemented in LinkedCellsContainer, and DefaultParticleContainer.
