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

A policy for managing neighbor lists in an Array of Structures (AoS) layout. More...

#include <NeighborIdentificationFunctor.h>

Public Member Functions

 AoSNeighborListPolicy (std::unordered_map< Particle_T *, std::vector< Particle_T * > > &neighborListAoS)
 Constructor.
 
template<class ParticleIterator_T >
void initializeNeighborList (ParticleIterator_T particlesBegin)
 Initializes the neighbor list map for the given range of particles: clears any previous contents and inserts an empty neighbor list for every particle.
 
void add (Particle_T *i, Particle_T *j)
 Adds a neighbor j to the neighbor list of particle i.
 

Detailed Description

template<class Particle_T>
class autopas::AoSNeighborListPolicy< Particle_T >

A policy for managing neighbor lists in an Array of Structures (AoS) layout.

This is needed for the NeighborIdentificationFunctor.

Template Parameters
Particle_TThe type of Particle class used.

Constructor & Destructor Documentation

◆ AoSNeighborListPolicy()

template<class Particle_T >
autopas::AoSNeighborListPolicy< Particle_T >::AoSNeighborListPolicy ( std::unordered_map< Particle_T *, std::vector< Particle_T * > > &  neighborListAoS)
inlineexplicit

Constructor.

Parameters
neighborListAoSneighbor list map to be filled by the functor.

Member Function Documentation

◆ add()

template<class Particle_T >
void autopas::AoSNeighborListPolicy< Particle_T >::add ( Particle_T *  i,
Particle_T *  j 
)
inline

Adds a neighbor j to the neighbor list of particle i.

Parameters
iThe first particle.
jThe neighbor particle.

◆ initializeNeighborList()

template<class Particle_T >
template<class ParticleIterator_T >
void autopas::AoSNeighborListPolicy< Particle_T >::initializeNeighborList ( ParticleIterator_T  particlesBegin)
inline

Initializes the neighbor list map for the given range of particles: clears any previous contents and inserts an empty neighbor list for every particle.

This must happen before the functor is applied, and it must also happen after any particle rearrangement in memory.

Template Parameters
ParticleIterator_TType of the particle iterator
Parameters
particlesBeginIterator to the first particle. Iterated until no longer valid.

The documentation for this class was generated from the following file: