A simple implementation of a cloud of particles. More...
#include <dumux/particles/simpleparticlecloud.hh>
The simple particle cloud assumes that particles are independent of each other and can be updated in parallel.
It allows to add and remove particles from the cloud and modify particles in place.
Public Types | |
| using | Particle = P |
Public Member Functions | |
| SimpleParticleCloud ()=default | |
| void | resize (std::size_t numParticles) |
| Resize the cloud to contain numParticles particles. More... | |
| std::size_t | size (bool onlyActive=true) const |
| the number of particles in the cloud More... | |
| Particle & | spawnParticle () |
| Bring one inactive particle to life Activates one particle from the pool of inactive particles. More... | |
| void | deactivateParticle (const Particle &p) |
| Deactivate a given particle. More... | |
| template<class Func > | |
| void | forEachActiveParticle (const Func &func) |
| For each active particle apply a function. More... | |
| template<class Func > | |
| void | forEachParticle (const Func &func) |
| For each particle apply a function. More... | |
| using Dumux::Particles::SimpleParticleCloud< P >::Particle = P |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |