ParticleVector class.
More...
#include <ParticleVector.h>
|
| bool | isDirty () |
| | Returns the dirty flag, indicating whether Particles exist in the vector that are not stored in a cell yet.
|
| |
| void | markAsClean () |
| | Marks the ParticleVector as clean.
|
| |
|
void | clearAllParticles () |
| | Remove all particles from the container and mark it as dirty.
|
| |
|
void | clearHaloParticles () |
| | Remove all halo particles from the container and mark it as dirty.
|
| |
|
void | deleteDummyParticles () |
| | Remove all dummy particles from the container and mark it as dirty.
|
| |
| void | push_back (const Particle_T &particle) |
| | Add a Particle to the data structure.
|
| |
| int | totalSize () |
| | Get the number of Particles in the data structure.
|
| |
| int | dirtySize () |
| | Get the number of dirty Particles in the data structure.
|
| |
| bool | needsRebuild () |
| | Indicates, whether References already stored in cells need to be updated.
|
| |
| auto | beginDirty () |
| | Begin of the iterator over dirty Particles.
|
| |
| auto | endDirty () |
| | End of the iterator over dirty Particles.
|
| |
| template<typename Lambda > |
| void | forEach (Lambda forEachLambda) |
| | Iterate over all particles and execute lambda function on them.
|
| |
| template<typename Lambda , typename A > |
| void | reduce (Lambda reduceLambda, A &result) |
| | Iterate over all particles and execute lambda function on them.
|
| |
template<class Particle_T>
class ParticleVector< Particle_T >
ParticleVector class.
This class uses a std::vector to store particles and allows access to its references. It also keeps track, which references are no longer valid, which happens when operations like delete and resize are performed.
- Template Parameters
-
| Particle_T | of the Particle that is being stored |
◆ beginDirty()
template<class Particle_T >
Begin of the iterator over dirty Particles.
- Returns
- Start of the iterator
◆ dirtySize()
template<class Particle_T >
Get the number of dirty Particles in the data structure.
- Returns
- Number of dirty Particles
◆ endDirty()
template<class Particle_T >
End of the iterator over dirty Particles.
- Returns
- End of the iterator
◆ forEach()
template<class Particle_T >
template<typename Lambda >
Iterate over all particles and execute lambda function on them.
- Parameters
-
| forEachLambda | lambda function that defines how to modify particles |
◆ isDirty()
template<class Particle_T >
Returns the dirty flag, indicating whether Particles exist in the vector that are not stored in a cell yet.
- Returns
- True if dirty, false otherwise
◆ markAsClean()
template<class Particle_T >
Marks the ParticleVector as clean.
Should be called after updating the references of dirty particles.
◆ needsRebuild()
template<class Particle_T >
Indicates, whether References already stored in cells need to be updated.
- Returns
- Boolean indicating the above
◆ push_back()
template<class Particle_T >
| void ParticleVector< Particle_T >::push_back |
( |
const Particle_T & |
particle | ) |
|
|
inline |
Add a Particle to the data structure.
- Parameters
-
| particle | A reference to the particle to be stored |
◆ reduce()
template<class Particle_T >
template<typename Lambda , typename A >
| void ParticleVector< Particle_T >::reduce |
( |
Lambda |
reduceLambda, |
|
|
A & |
result |
|
) |
| |
|
inline |
Iterate over all particles and execute lambda function on them.
- Parameters
-
| reduceLambda | lambda function that defines how to modify particles |
| result | reference to variable where result will be stored after operation |
◆ totalSize()
template<class Particle_T >
Get the number of Particles in the data structure.
- Returns
- Total number of Particles
The documentation for this class was generated from the following file: