AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ParticleVector< Particle_T > Class Template Reference

ParticleVector class. More...

#include <ParticleVector.h>

Inheritance diagram for ParticleVector< Particle_T >:
Inheritance graph
[legend]

Public Member Functions

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 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.
 

Detailed Description

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_Tof the Particle that is being stored

Member Function Documentation

◆ beginDirty()

template<class Particle_T >
auto ParticleVector< Particle_T >::beginDirty ( )
inline

Begin of the iterator over dirty Particles.

Returns
Start of the iterator

◆ dirtySize()

template<class Particle_T >
int ParticleVector< Particle_T >::dirtySize ( )
inline

Get the number of dirty Particles in the data structure.

Returns
Number of dirty Particles

◆ endDirty()

template<class Particle_T >
auto ParticleVector< Particle_T >::endDirty ( )
inline

End of the iterator over dirty Particles.

Returns
End of the iterator

◆ forEach()

template<class Particle_T >
template<typename Lambda >
void ParticleVector< Particle_T >::forEach ( Lambda  forEachLambda)
inline

Iterate over all particles and execute lambda function on them.

Parameters
forEachLambdalambda function that defines how to modify particles

◆ isDirty()

template<class Particle_T >
bool ParticleVector< Particle_T >::isDirty ( )
inline

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 >
void ParticleVector< Particle_T >::markAsClean ( )
inline

Marks the ParticleVector as clean.

Should be called after updating the references of dirty particles.

◆ needsRebuild()

template<class Particle_T >
bool ParticleVector< Particle_T >::needsRebuild ( )
inline

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
particleA 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
reduceLambdalambda function that defines how to modify particles
resultreference to variable where result will be stored after operation

◆ totalSize()

template<class Particle_T >
int ParticleVector< Particle_T >::totalSize ( )
inline

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: