10#include <unordered_map>
22template <
class Particle_T>
30 : _neighborListsAoS(neighborListAoS) {}
40 template <
class ParticleIterator_T>
42 _neighborListsAoS.clear();
43 for (
auto iter = particlesBegin; iter.isValid(); ++iter) {
44 _neighborListsAoS[&(*iter)];
53 void add(Particle_T *i, Particle_T *j) { _neighborListsAoS[i].push_back(j); }
56 std::unordered_map<Particle_T *, std::vector<Particle_T *>> &_neighborListsAoS;
79template <
class Particle_T>
97 const bool gatherNewton3Lists)
102 std::string
getName()
override {
return "NeighborIdentificationFunctor"; }
114 template <
class ParticleIterator_T>
116 _policy.initializeNeighborList(particlesBegin);
A policy for managing neighbor lists in an Array of Structures (AoS) layout.
Definition: NeighborIdentificationFunctor.h:23
AoSNeighborListPolicy(std::unordered_map< Particle_T *, std::vector< Particle_T * > > &neighborListAoS)
Constructor.
Definition: NeighborIdentificationFunctor.h:29
void add(Particle_T *i, Particle_T *j)
Adds a neighbor j to the neighbor list of particle i.
Definition: NeighborIdentificationFunctor.h:53
void initializeNeighborList(ParticleIterator_T particlesBegin)
Initializes the neighbor list map for the given range of particles: clears any previous contents and ...
Definition: NeighborIdentificationFunctor.h:41
This functor generates lists of particles within interactionLength of each other: can be used interna...
Definition: InteractionListGeneratorFunctor.h:39
This functor generates lists of particles within interactionLength of each other, which could be used...
Definition: NeighborIdentificationFunctor.h:81
std::string getName() override
Returns name of functor.
Definition: NeighborIdentificationFunctor.h:102
NeighborIdentificationFunctor(AoSNeighborListPolicy< Particle_T > &policy, double interactionLength, const bool gatherNewton3Lists)
Constructor.
Definition: NeighborIdentificationFunctor.h:96
void initializeNeighborList(ParticleIterator_T particlesBegin)
Initializes the neighbor list map for the given range of particles: clears any previous contents and ...
Definition: NeighborIdentificationFunctor.h:115
bool isRelevantForTuning() override
Whether the functor is relevant for tuning.
Definition: NeighborIdentificationFunctor.h:123
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:34