Particles are divided into clusters. More...
#include <VerletClusterLists.h>
Classes | |
struct | ClusterRange |
Defines a cluster range used in the static cluster-thread-partition. More... | |
Public Member Functions | |
VerletClusterLists (const std::array< double, 3 > &boxMin, const std::array< double, 3 > &boxMax, double cutoff, double skin, unsigned int rebuildFrequency, size_t clusterSize, LoadEstimatorOption loadEstimator=LoadEstimatorOption::none) | |
Constructor of the VerletClusterLists class. | |
CellType | getParticleCellTypeEnum () const override |
Get the ParticleCell type as an Enum. | |
ContainerOption | getContainerType () const override |
Get the ContainerType. | |
BalancedTraversal::EstimatorFunction | getLoadEstimatorFunction () |
Generates the load estimation function depending on _loadEstimator. | |
void | computeInteractions (TraversalInterface *traversal) override |
Iterates over all particle multiples (e.g. | |
void | reserve (size_t numParticles, size_t numParticlesHaloEstimate) override |
Reserve memory for a given number of particles in the container and logic layers. | |
void | addParticleImpl (const Particle_T &p) override |
Adds the given particle to the container. | |
void | addHaloParticleImpl (const Particle_T &haloParticle) override |
Adds a particle to the container that lies in the halo region of the container. | |
bool | updateHaloParticle (const Particle_T &haloParticle) override |
Update a halo particle of the container with the given haloParticle. | |
void | deleteHaloParticles () override |
Deletes all halo particles. | |
std::tuple< const Particle_T *, size_t, size_t > | getParticle (size_t cellIndex, size_t particleIndex, IteratorBehavior iteratorBehavior, const std::array< double, 3 > &boxMin, const std::array< double, 3 > &boxMax) const override |
Fetch the pointer to a particle, identified via a cell and particle index. | |
std::tuple< const Particle_T *, size_t, size_t > | getParticle (size_t cellIndex, size_t particleIndex, IteratorBehavior iteratorBehavior) const override |
Fetch the pointer to a particle, identified via a cell and particle index. | |
template<bool regionIter> | |
std::tuple< const Particle_T *, size_t, size_t > | getParticleImpl (size_t cellIndex, size_t particleIndex, IteratorBehavior iteratorBehavior, const std::array< double, 3 > &boxMin, const std::array< double, 3 > &boxMax) const |
Container specific implementation for getParticle. | |
bool | deleteParticle (Particle_T &particle) override |
Deletes the given particle as long as this does not compromise the validity of the container. | |
bool | deleteParticle (size_t cellIndex, size_t particleIndex) override |
Deletes the particle at the given index positions as long as this does not compromise the validity of the container. | |
std::vector< Particle_T > | updateContainer (bool keepNeighborListsValid) override |
Updates the container. | |
TraversalSelectorInfo | getTraversalSelectorInfo () const override |
Generates a traversal selector info for this container. | |
ContainerIterator< Particle_T, true, false > | begin (IteratorBehavior behavior=autopas::IteratorBehavior::ownedOrHalo, typename ContainerIterator< Particle_T, true, false >::ParticleVecType *additionalVectors=nullptr) override |
Iterate over all particles using for(auto iter = container.begin(); iter.isValid(); ++iter) . | |
ContainerIterator< Particle_T, false, false > | begin (IteratorBehavior behavior=autopas::IteratorBehavior::ownedOrHalo, typename ContainerIterator< Particle_T, false, false >::ParticleVecType *additionalVectors=nullptr) const override |
Iterate over all particles using for(auto iter = container.begin(); iter.isValid(); ++iter) . | |
template<typename Lambda > | |
void | forEach (Lambda forEachLambda, IteratorBehavior behavior=autopas::IteratorBehavior::ownedOrHalo) |
Execute code on all particles in this container as defined by a lambda function. | |
template<typename Lambda > | |
void | forEach (Lambda forEachLambda, IteratorBehavior behavior=autopas::IteratorBehavior::ownedOrHalo) const |
Execute code on all particles in this container as defined by a lambda function. | |
template<typename Lambda , typename A > | |
void | reduce (Lambda reduceLambda, A &result, IteratorBehavior behavior=autopas::IteratorBehavior::ownedOrHalo) |
Reduce properties of particles as defined by a lambda function. | |
template<typename Lambda , typename A > | |
void | reduce (Lambda reduceLambda, A &result, IteratorBehavior behavior=autopas::IteratorBehavior::ownedOrHalo) const |
Reduce properties of particles as defined by a lambda function. | |
ContainerIterator< Particle_T, true, true > | getRegionIterator (const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior, typename ContainerIterator< Particle_T, true, true >::ParticleVecType *additionalVectors=nullptr) override |
Iterate over all particles in a specified region for(auto iter = container.getRegionIterator(lowCorner, highCorner);iter.isValid();++iter) . | |
ContainerIterator< Particle_T, false, true > | getRegionIterator (const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior, typename ContainerIterator< Particle_T, false, true >::ParticleVecType *additionalVectors=nullptr) const override |
Iterate over all particles in a specified region for(auto iter = container.getRegionIterator(lowCorner, highCorner);iter.isValid();++iter) . | |
template<typename Lambda > | |
void | forEachInRegion (Lambda forEachLambda, const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior=autopas::IteratorBehavior::ownedOrHalo) |
Execute code on all particles in this container in a certain region as defined by a lambda function. | |
template<typename Lambda > | |
void | forEachInRegion (Lambda forEachLambda, const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior=autopas::IteratorBehavior::ownedOrHalo) const |
Execute code on all particles in this container in a certain region as defined by a lambda function. | |
template<typename Lambda , typename A > | |
void | reduceInRegion (Lambda reduceLambda, A &result, const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior=autopas::IteratorBehavior::ownedOrHalo) |
Execute code on all particles in this container in a certain region as defined by a lambda function. | |
template<typename Lambda , typename A > | |
void | reduceInRegion (Lambda reduceLambda, A &result, const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior=autopas::IteratorBehavior::ownedOrHalo) const |
Execute code on all particles in this container in a certain region as defined by a lambda function. | |
void | rebuildNeighborLists (TraversalInterface *traversal) override |
Rebuilds the neighbor lists for the next traversals. | |
template<bool inParallel, class LoopBody > | |
void | traverseClusters (LoopBody &&loopBody) |
Helper method to iterate over all clusters. | |
size_t | size () const override |
Get the number of all particles stored in this container (owned + halo + dummy). | |
size_t | getNumberOfParticles (IteratorBehavior behavior) const override |
Get the number of particles with respect to the specified IteratorBehavior. | |
const auto & | getClusterThreadPartition () const |
Returns the cluster-thread-partition. | |
auto | getNumClusters () const |
Returns the number of clusters in this container. | |
auto | getTowerSideLength () const |
Returns the grid side length of the grids in the container. | |
auto | getTowersPerDimension () const |
Returns the number of grids per dimension on the container. | |
auto | getClusterSize () const |
Returns the number of particles in each cluster. | |
auto | getNumTowersPerInteractionLength () const |
Returns the towers per interaction length. | |
template<class Functor > | |
void | loadParticlesIntoSoAs (Functor *functor) |
Loads all particles of the container in their correct SoA and generates the SoAViews for the clusters. | |
template<class Functor > | |
void | extractParticlesFromSoAs (Functor *functor) |
Extracts all SoAs of the container into the particles. | |
internal::ClusterTower< Particle_T > & | getTowerByIndex (size_t x, size_t y) |
Returns a reference to the tower for the given tower grid coordinates. | |
internal::ClusterTowerBlock2D< Particle_T > & | getTowerBlock () |
Getter for the cell block. | |
const std::array< double, 3 > & | getBoxMax () const override |
Get the upper corner of the container without halo. | |
const std::array< double, 3 > & | getHaloBoxMax () const |
Get the upper corner of the halo box. | |
const std::array< double, 3 > & | getBoxMin () const override |
Get the lower corner of the container without halo. | |
const std::array< double, 3 > & | getHaloBoxMin () const |
Get the lower corner of the halo box. | |
double | getCutoff () const override |
Return the cutoff of the container. | |
void | setCutoff (double cutoff) override |
Set the cutoff of the container. | |
double | getVerletSkin () const override |
Return the verletSkin of the container verletSkin. | |
void | setSkin (double skin) |
Set the verlet skin length for the container. | |
unsigned int | getRebuildFrequency () |
Get the rebuild Frequency value for the container. | |
void | setRebuildFrequency (unsigned int rebuildFrequency) |
Set the rebuild Frequency value for the container. | |
double | getInteractionLength () const override |
Return the interaction length (cutoff+skin) of the container. | |
void | deleteAllParticles () override |
Deletes all particles. | |
const internal::VerletClusterListsRebuilder< Particle_T >::NeighborListsBuffer_T & | getNeighborLists () const |
Get the neighbor lists buffer object. | |
void | rebuildTowersAndClusters (bool newton3) |
Initializes a new VerletClusterListsRebuilder and uses it to rebuild the towers and the clusters. | |
template<class LoopBody > | |
void | traverseClustersSequential (LoopBody &&loopBody) |
Helper method to sequentially iterate over all owned clusters. | |
template<class LoopBody > | |
void | traverseClustersParallel (LoopBody &&loopBody) |
Helper method to iterate over all clusters in parallel. | |
![]() | |
virtual CellType | getParticleCellTypeEnum () const =0 |
Get the ParticleCell type as an Enum. | |
ParticleContainerInterface (double skin) | |
Constructor. | |
virtual | ~ParticleContainerInterface ()=default |
Destructor of ParticleContainerInterface. | |
ParticleContainerInterface (const ParticleContainerInterface &obj)=delete | |
Delete the copy constructor to prevent unwanted copies. | |
ParticleContainerInterface & | operator= (const ParticleContainerInterface &other)=delete |
Delete the copy assignment operator to prevent unwanted copies. | |
virtual ContainerOption | getContainerType () const =0 |
Get the ContainerType. | |
virtual void | reserve (size_t numParticles, size_t numParticlesHaloEstimate)=0 |
Reserve memory for a given number of particles in the container and logic layers. | |
template<bool checkInBox = true> | |
void | addParticle (const Particle_T &p) |
Adds a particle to the container. | |
template<bool checkInBox = true> | |
void | addHaloParticle (const Particle_T &haloParticle) |
Adds a particle to the container that lies in the halo region of the container. | |
virtual bool | updateHaloParticle (const Particle_T &haloParticle)=0 |
Update a halo particle of the container with the given haloParticle. | |
virtual void | rebuildNeighborLists (TraversalInterface *traversal)=0 |
Rebuilds the neighbor lists for the next traversals. | |
virtual void | deleteHaloParticles ()=0 |
Deletes all halo particles. | |
virtual void | deleteAllParticles ()=0 |
Deletes all particles. | |
virtual size_t | getNumberOfParticles (IteratorBehavior behavior=IteratorBehavior::owned) const =0 |
Get the number of particles with respect to the specified IteratorBehavior. | |
virtual size_t | size () const =0 |
Get the total number of particles saved in the container (owned + halo + dummy). | |
virtual ContainerIterator< ParticleType, true, false > | begin (IteratorBehavior behavior=autopas::IteratorBehavior::ownedOrHalo, typename ContainerIterator< ParticleType, true, false >::ParticleVecType *additionalVectors=nullptr)=0 |
Iterate over all particles using for(auto iter = container.begin(); iter.isValid(); ++iter) . | |
virtual ContainerIterator< ParticleType, false, false > | begin (IteratorBehavior behavior=autopas::IteratorBehavior::ownedOrHalo, typename ContainerIterator< ParticleType, false, false >::ParticleVecType *additionalVectors=nullptr) const =0 |
Iterate over all particles using for(auto iter = container.begin(); iter.isValid(); ++iter) . | |
virtual ContainerIterator< ParticleType, false, false > | cbegin (IteratorBehavior behavior=autopas::IteratorBehavior::ownedOrHalo, typename ContainerIterator< ParticleType, false, false >::ParticleVecType *additionalVectors=nullptr) const final |
Iterate over all particles using for(auto iter = container.begin(); iter.isValid(); ++iter) . | |
virtual ContainerIterator< ParticleType, true, true > | getRegionIterator (const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior, typename ContainerIterator< ParticleType, true, true >::ParticleVecType *additionalVectors=nullptr)=0 |
Iterate over all particles in a specified region for(auto iter = container.getRegionIterator(lowCorner, highCorner);iter.isValid();++iter) . | |
virtual ContainerIterator< ParticleType, false, true > | getRegionIterator (const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior, typename ContainerIterator< ParticleType, false, true >::ParticleVecType *additionalVectors=nullptr) const =0 |
Iterate over all particles in a specified region for(auto iter = container.getRegionIterator(lowCorner, highCorner);iter.isValid();++iter) . | |
constexpr bool | end () const |
Dummy to make range-based for loops work. | |
virtual void | computeInteractions (TraversalInterface *traversal)=0 |
Iterates over all particle multiples (e.g. | |
virtual const std::array< double, 3 > & | getBoxMax () const =0 |
Get the upper corner of the container without halo. | |
virtual const std::array< double, 3 > & | getBoxMin () const =0 |
Get the lower corner of the container without halo. | |
virtual double | getCutoff () const =0 |
Return the cutoff of the container. | |
virtual void | setCutoff (double cutoff)=0 |
Set the cutoff of the container. | |
virtual double | getVerletSkin () const =0 |
Return the verletSkin of the container verletSkin. | |
virtual size_t | getStepsSinceLastRebuild () const |
Return the number of time-steps since last neighbor list rebuild. | |
virtual void | setStepsSinceLastRebuild (size_t stepsSinceLastRebuild) |
Set the number of time-steps since last neighbor list rebuild. | |
virtual double | getInteractionLength () const =0 |
Return the interaction length (cutoff+skin) of the container. | |
virtual std::vector< ParticleType > | updateContainer (bool keepNeighborListsValid)=0 |
Updates the container. | |
virtual TraversalSelectorInfo | getTraversalSelectorInfo () const =0 |
Generates a traversal selector info for this container. | |
std::set< TraversalOption > | getAllTraversals (const InteractionTypeOption interactionType) const |
Generates a list of all traversals that are theoretically applicable to this container. | |
virtual std::tuple< const Particle_T *, size_t, size_t > | getParticle (size_t cellIndex, size_t particleIndex, IteratorBehavior iteratorBehavior) const =0 |
Fetch the pointer to a particle, identified via a cell and particle index. | |
virtual std::tuple< const Particle_T *, size_t, size_t > | getParticle (size_t cellIndex, size_t particleIndex, IteratorBehavior iteratorBehavior, const std::array< double, 3 > &boxMin, const std::array< double, 3 > &boxMax) const =0 |
Fetch the pointer to a particle, identified via a cell and particle index. | |
std::tuple< Particle_T *, size_t, size_t > | getParticle (size_t cellIndex, size_t particleIndex, IteratorBehavior iteratorBehavior, const std::array< double, 3 > &boxMin, const std::array< double, 3 > &boxMax) |
Fetch the pointer to a particle, identified via a cell and particle index. | |
std::tuple< Particle_T *, size_t, size_t > | getParticle (size_t cellIndex, size_t particleIndex, IteratorBehavior iteratorBehavior) |
Fetch the pointer to a particle, identified via a cell and particle index. | |
virtual bool | deleteParticle (Particle_T &particle)=0 |
Deletes the given particle as long as this does not compromise the validity of the container. | |
virtual bool | deleteParticle (size_t cellIndex, size_t particleIndex)=0 |
Deletes the particle at the given index positions as long as this does not compromise the validity of the container. | |
virtual void | notifyParticleDeleted ()=0 |
This function is called when a particle is deleted. | |
Protected Member Functions | |
void | calculateClusterThreadPartition () |
Calculates a cluster thread partition that aims to give each thread about the same amount of cluster pair interactions, if each thread handles the neighbors of all clusters it gets assigned. | |
void | fillClusterRanges (size_t numClusterPairsPerThread, int numThreads) |
Fills in the cluster ranges of the cluster thread partition. | |
void | notifyParticleDeleted () override |
If a particle is deleted, we want _isValid to be set to invalid, as the tower structure is invalidated. | |
virtual void | addParticleImpl (const Particle_T &p)=0 |
Adds a particle to the container. | |
virtual void | addHaloParticleImpl (const Particle_T &haloParticle)=0 |
Adds a particle to the container that lies in the halo region of the container. | |
Additional Inherited Members | |
![]() | |
using | ParticleType = Particle_T |
Type of the Particle. | |
![]() | |
size_t | _stepsSinceLastRebuild {0} |
Stores the number of time-steps since last neighbor list rebuild. | |
double | _skin |
Skin distance a particle is allowed to move in one time-step. | |
Particles are divided into clusters.
The VerletClusterLists class uses neighborhood lists for each cluster to calculate pairwise interactions of particles. It is optimized for a constant, i.e. particle independent, cutoff radius of the interaction.
This Container does (currently?) not make use of the cellSizeFactor.
The _particlesToAdd buffer structure is (currently) still necessary, even if the LogicHandler basically holds the same buffer structure. In principle, moving the particles directly into one of the towers would be possible, since particles are moved from LogicHandler to VCL only in a rebuild iteration. However, storing the particles in a tower (e.g. tower0) is only possible very inefficiently, since several threads would write to this buffer at the same time. Even if we could add the particles to tower0 efficiently, there are still problems in getRegionIterator(), because this function is executed between the addition of particles and the actual rebuild. getRegionIterator() expects that all particles are already sorted correctly into the towers (if we do not use _particlesToAdd).
Particle_T |
|
inline |
Constructor of the VerletClusterLists class.
The neighbor lists are build using a estimated density. The box is divided into cuboids with roughly the same side length.
boxMin | The lower corner of the domain. |
boxMax | The upper corner of the domain. |
cutoff | The cutoff radius of the interaction. |
skin | The skin radius. |
rebuildFrequency | The rebuild Frequency. |
clusterSize | Number of particles per cluster. |
loadEstimator | load estimation algorithm for balanced traversals. |
|
inlineoverridevirtual |
Adds a particle to the container that lies in the halo region of the container.
This is an unsafe version of addParticle() and does not perform a boundary check.
haloParticle | Particle to be added. This particle is already checked to be outside of the bounding box. |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Adds the given particle to the container.
rebuildTowersAndClusters() has to be called to have it actually sorted in.
p | The particle to add. |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Iterate over all particles using for(auto iter = container.begin(); iter.isValid(); ++iter) .
behavior | Behavior of the iterator, see IteratorBehavior. |
additionalVectors | Vectors that should be included besides the container. |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Iterate over all particles using for(auto iter = container.begin(); iter.isValid(); ++iter) .
behavior | Behavior of the iterator, see IteratorBehavior. |
additionalVectors | Vectors that should be included besides the container. |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Iterates over all particle multiples (e.g.
pairs, triplets) in the container using the given traversal.
traversal | The traversal to use for the iteration. |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Deletes all particles.
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Deletes all halo particles.
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Deletes the given particle as long as this does not compromise the validity of the container.
If this is not possible the particle is just marked as deleted.
particle | Reference to the particle that is to be deleted. |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Deletes the particle at the given index positions as long as this does not compromise the validity of the container.
If this is not possible the particle is just marked as deleted. If the positions do not exist the behavior is undefined.
cellIndex | |
particleIndex |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inline |
|
inlineprotected |
Fills in the cluster ranges of the cluster thread partition.
It aims to assign each thread appropriately the same number of cluster pairs.
numClusterPairsPerThread | The approximate number of cluster pairs per thread. |
numThreads | The number of threads to use. |
|
inline |
Execute code on all particles in this container as defined by a lambda function.
Lambda | (Particle_T &p) -> void |
forEachLambda | code to be executed on all particles |
behavior |
|
inline |
Execute code on all particles in this container as defined by a lambda function.
Lambda | (Particle_T &p) -> void |
forEachLambda | code to be executed on all particles |
behavior |
|
inline |
Execute code on all particles in this container in a certain region as defined by a lambda function.
Lambda | (Particle_T &p) -> void |
forEachLambda | code to be executed on all particles |
lowerCorner | lower corner of bounding box |
higherCorner | higher corner of bounding box |
behavior |
|
inline |
Execute code on all particles in this container in a certain region as defined by a lambda function.
Lambda | (Particle_T &p) -> void |
forEachLambda | code to be executed on all particles |
lowerCorner | lower corner of bounding box |
higherCorner | higher corner of bounding box |
behavior |
|
inlineoverridevirtual |
Get the upper corner of the container without halo.
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Get the lower corner of the container without halo.
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inline |
Returns the number of particles in each cluster.
|
inline |
Returns the cluster-thread-partition.
|
inlineoverridevirtual |
Get the ContainerType.
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Return the cutoff of the container.
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inline |
Get the upper corner of the halo box.
|
inline |
Get the lower corner of the halo box.
|
inlineoverridevirtual |
Return the interaction length (cutoff+skin) of the container.
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inline |
Generates the load estimation function depending on _loadEstimator.
|
inline |
Get the neighbor lists buffer object.
|
inlineoverridevirtual |
Get the number of particles with respect to the specified IteratorBehavior.
behavior | Behavior of the iterator, see IteratorBehavior. |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inline |
Returns the number of clusters in this container.
|
inline |
Returns the towers per interaction length.
That is how many towers fit into one interaction length rounded up.
|
inlineoverridevirtual |
Fetch the pointer to a particle, identified via a cell and particle index.
These indices are only meaningful in the context of the current container at its current state. The same indices might (and probably will) yield different particles for different container types or might not even exist. The only guarantee is that the indices {0,0} yield the first particle in the container that satisfies the iterator requirements.
cellIndex | Index of the cell the particle is located in. |
particleIndex | Particle index within the cell. |
iteratorBehavior | Which ownership states should be considered for the next particle. |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Fetch the pointer to a particle, identified via a cell and particle index.
These indices are only meaningful in the context of the current container at its current state. The same indices might (and probably will) yield different particles for different container types or might not even exist. The only guarantee is that the indices {0,0} yield the first particle in the container that satisfies the iterator requirements.
cellIndex | Index of the cell the particle is located in. |
particleIndex | Particle index within the cell. |
iteratorBehavior | Which ownership states should be considered for the next particle. |
boxMin | start of region in which the next particle should be. The coordinates are expected to be within the domain. |
boxMax | end of region in which the next particle should be. The coordinates are expected to be within the domain. |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Get the ParticleCell type as an Enum.
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inline |
Container specific implementation for getParticle.
See ParticleContainerInterface::getParticle().
regionIter |
cellIndex | |
particleIndex | |
iteratorBehavior | |
boxMin | |
boxMax |
|
inline |
Get the rebuild Frequency value for the container.
|
inlineoverridevirtual |
Iterate over all particles in a specified region for(auto iter = container.getRegionIterator(lowCorner, highCorner);iter.isValid();++iter) .
lowerCorner | Lower corner of the region |
higherCorner | Higher corner of the region |
behavior | The behavior of the iterator (shall it iterate over halo particles as well?). |
additionalVectors | Vectors that should be included besides the container. |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Iterate over all particles in a specified region for(auto iter = container.getRegionIterator(lowCorner, highCorner);iter.isValid();++iter) .
lowerCorner | Lower corner of the region |
higherCorner | Higher corner of the region |
behavior | The behavior of the iterator (shall it iterate over halo particles as well?). |
additionalVectors | Vectors that should be included besides the container. |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inline |
Getter for the cell block.
|
inline |
Returns a reference to the tower for the given tower grid coordinates.
x | The x-th tower in x direction. |
y | The y-th tower in y direction. |
|
inline |
Returns the grid side length of the grids in the container.
|
inline |
Returns the number of grids per dimension on the container.
|
inlineoverridevirtual |
Generates a traversal selector info for this container.
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Return the verletSkin of the container verletSkin.
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inline |
|
inlineoverrideprotectedvirtual |
If a particle is deleted, we want _isValid to be set to invalid, as the tower structure is invalidated.
This function is not called, if a particle from the _particlesToAdd vector is deleted!
Implements autopas::internal::ParticleDeletedObserver.
|
inlineoverridevirtual |
Rebuilds the neighbor lists for the next traversals.
traversal | The used traversal. |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inline |
Initializes a new VerletClusterListsRebuilder and uses it to rebuild the towers and the clusters.
This function sets the container structure to valid.
newton3 | Indicate whether the VerletClusterRebuilder should consider newton3 or not. |
|
inline |
Reduce properties of particles as defined by a lambda function.
Lambda | (Particle_T p, A initialValue) -> void |
A | type of particle attribute to be reduced |
reduceLambda | code to reduce properties of particles |
result | reference to result of type A |
behavior |
|
inline |
Reduce properties of particles as defined by a lambda function.
Lambda | (Particle_T p, A initialValue) -> void |
A | type of particle attribute to be reduced |
reduceLambda | code to reduce properties of particles |
result | reference to result of type A |
behavior |
|
inline |
Execute code on all particles in this container in a certain region as defined by a lambda function.
Lambda | (Particle_T &p, A &result) -> void |
A | type of reduction Value |
reduceLambda | code to be executed on all particles |
result | reference to starting and final value for reduction |
lowerCorner | lower corner of bounding box |
higherCorner | higher corner of bounding box |
behavior |
|
inline |
Execute code on all particles in this container in a certain region as defined by a lambda function.
Lambda | (Particle_T &p, A &result) -> void |
A | type of reduction Value |
reduceLambda | code to be executed on all particles |
result | reference to starting and final value for reduction |
lowerCorner | lower corner of bounding box |
higherCorner | higher corner of bounding box |
behavior |
|
inlineoverridevirtual |
Reserve memory for a given number of particles in the container and logic layers.
This function assumes a uniform distribution of particles throughout the domain. For example, this means that in a LinkedCells Container in each cell vector.reserve(numParticles/numCells) is called.
numParticles | No buffer factor is applied. It is probably wise to slightly over-reserve to account for imbalance or particle movement. |
numParticlesHaloEstimate | Estimate for the number of halo particles. Reserves space in the container data structure. |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Set the cutoff of the container.
cutoff |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inline |
Set the rebuild Frequency value for the container.
rebuildFrequency |
|
inline |
Set the verlet skin length for the container.
skin |
|
inlineoverridevirtual |
Get the number of all particles stored in this container (owned + halo + dummy).
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inline |
Helper method to iterate over all clusters.
LoopBody | The type of the lambda to execute for all clusters. |
inParallel | If the iteration should be executed in parallel or sequential. See traverseClustersParallel() for thread safety. |
loopBody | The lambda to execute for all clusters. Parameters given is internal::Cluster& cluster. |
|
inline |
Helper method to iterate over all clusters in parallel.
It is always safe to modify the particles in the cluster that is passed to the given loop body. However, when modifying particles from other clusters, the caller has to make sure that no data races occur. Particles must not be added or removed during the traversal.
LoopBody | The type of the lambda to execute for all clusters. |
loopBody | The lambda to execute for all clusters. Parameters given is internal::Cluster& cluster. |
|
inline |
Helper method to sequentially iterate over all owned clusters.
LoopBody | The type of the lambda to execute for all clusters. |
loopBody | The lambda to execute for all clusters. Parameters given is internal::Cluster& cluster. |
|
inlineoverridevirtual |
Updates the container.
This deletes halo particles, resorts particles into appropriate cells and might remove particles from the container, if necessary.
keepNeighborListsValid | Defines whether the neighbor lists have to be kept valid. |
Implements autopas::ParticleContainerInterface< Particle_T >.
|
inlineoverridevirtual |
Update a halo particle of the container with the given haloParticle.
haloParticle | Particle to be updated. |
Implements autopas::ParticleContainerInterface< Particle_T >.