This functor generates lists of particles within interactionLength of each other: can be used internally for Verlet list generation and provides a base for a public-facing externally used version, provided in the applicationLibrary. More...
#include <InteractionListGeneratorFunctor.h>


Public Types | |
| using | SoAArraysType = Particle_T::SoAArraysType |
| Structure of the SoAs defined by the particle. | |
Public Types inherited from autopas::PairwiseFunctor< Particle_T, InteractionListGeneratorFunctor< Particle_T, NeighborListPolicy_T > > | |
| using | SoAArraysType = typename Particle_T::SoAArraysType |
| Structure of the SoAs defined by the particle. | |
Public Types inherited from autopas::Functor< Particle_T, CRTP_T > | |
| using | SoAArraysType = typename Particle_T::SoAArraysType |
| Structure of the SoAs defined by the particle. | |
| using | Functor_T = CRTP_T |
| Make the Implementation type template publicly available. | |
Public Member Functions | |
| InteractionListGeneratorFunctor (NeighborListPolicy_T &neighborListPolicy, double interactionLength, const bool gatherNewton3Lists) | |
| Constructor. | |
| std::string | getName () override |
| bool | isRelevantForTuning () override |
| The InteractionListGeneratorFunctor is meant to be used internally and as such is not tuning relevant. | |
| bool | allowsNewton3 () override |
| Whether InteractionListGeneratorFunctor allows Newton3. | |
| bool | allowsNonNewton3 () override |
| Whether InteractionListGeneratorFunctor allows non-newton3. | |
| void | AoSFunctor (Particle_T &i, Particle_T &j, bool newton3) override |
| AoSFunctor for interaction list generation. | |
| void | SoAFunctorSingle (SoAView< SoAArraysType > soa, bool) override |
| SoAFunctor for verlet list generation. | |
| void | SoAFunctorPair (SoAView< SoAArraysType > soa1, SoAView< SoAArraysType > soa2, bool newton3) override |
| SoAFunctor for the verlet list generation. | |
| void | SoAFunctorVerlet (SoAView< SoAArraysType > soa, const size_t indexFirst, std::span< const size_t > neighborList, bool newton3) override |
| SoAFunctorVerlet for interaction list generation. | |
Public Member Functions inherited from autopas::PairwiseFunctor< Particle_T, InteractionListGeneratorFunctor< Particle_T, NeighborListPolicy_T > > | |
| PairwiseFunctor (double cutoff) | |
| Constructor. | |
| virtual void | AoSFunctor (Particle_T &i, Particle_T &j, bool newton3) |
| PairwiseFunctor for arrays of structures (AoS). | |
| virtual void | SoAFunctorSingle (SoAView< SoAArraysType > soa, bool newton3) |
| PairwiseFunctor for structure of arrays (SoA) | |
| virtual void | SoAFunctorVerlet (SoAView< SoAArraysType > soa, const size_t indexFirst, std::span< const size_t > neighborList, bool newton3) |
| PairwiseFunctor for structure of arrays (SoA) for neighbor lists. | |
| virtual void | SoAFunctorPair (SoAView< SoAArraysType > soa1, SoAView< SoAArraysType > soa2, bool newton3) |
| PairwiseFunctor for structure of arrays (SoA) | |
| virtual void | SoAFunctorPairSorted (SoAView< SoAArraysType > soa1, SoAView< SoAArraysType > soa2, const SoASortingData &sortingData, bool newton3) |
| SoAFunctorPair on pre-sorted, pre-packed SoA views. | |
| bool | isVecPatternAllowed (const VectorizationPatternOption::Value vecPattern) override |
| Specifies whether the functor is capable of using the specified Vectorization Pattern in the SoA functor. | |
Public Member Functions inherited from autopas::Functor< Particle_T, CRTP_T > | |
| Functor (double cutoff) | |
| Constructor. | |
| virtual void | initTraversal () |
| This function is called at the start of each traversal. | |
| virtual void | endTraversal (bool newton3) |
| This function is called at the end of each traversal. | |
| template<class ParticleCell > | |
| void | SoALoader (ParticleCell &cell, SoA< SoAArraysType > &soa, size_t offset, bool skipSoAResize) |
| Copies the AoS data of the given cell in the given soa. | |
| template<typename ParticleCell > | |
| void | SoAExtractor (ParticleCell &cell, SoA< SoAArraysType > &soa, size_t offset) |
| Copies the data stored in the soa back into the cell. | |
| virtual bool | allowsNewton3 ()=0 |
| Specifies whether the functor is capable of Newton3-like functors. | |
| virtual bool | allowsNonNewton3 ()=0 |
| Specifies whether the functor is capable of non-Newton3-like functors. | |
| virtual bool | isVecPatternAllowed (const VectorizationPatternOption::Value vecPattern)=0 |
| Specifies whether the functor is capable of using the specified Vectorization Pattern in the SoA functor. | |
| virtual bool | isRelevantForTuning ()=0 |
| Specifies whether the functor should be considered for the auto-tuning process. | |
| virtual std::string | getName ()=0 |
| Returns name of functor. | |
| double | getCutoff () const |
| Getter for the functor's cutoff. | |
| virtual void | setVecPattern (const VectorizationPatternOption::Value vecPattern) |
| Setter for the vectorization pattern to be used. | |
| virtual size_t | getNumFLOPs () const |
| Get the number of FLOPs. | |
| virtual double | getHitRate () const |
| Get the hit rate. | |
Static Public Member Functions | |
| static constexpr std::array< typename Particle_T::AttributeNames, 5 > | getNeededAttr () |
| Get attributes needed for computation. | |
| static constexpr std::array< typename Particle_T::AttributeNames, 5 > | getNeededAttr (std::false_type) |
| Get attributes needed for computation without N3 optimization. | |
| static constexpr std::array< typename Particle_T::AttributeNames, 0 > | getComputedAttr () |
| Get attributes computed by this functor. | |
Static Public Member Functions inherited from autopas::Functor< Particle_T, CRTP_T > | |
| static constexpr std::array< typename Particle_T::AttributeNames, 0 > | getNeededAttr () |
| Get attributes needed for computation. | |
| static constexpr std::array< typename Particle_T::AttributeNames, 0 > | getNeededAttr (std::false_type) |
| Get attributes needed for computation without N3 optimization. | |
| static constexpr std::array< typename Particle_T::AttributeNames, 0 > | getComputedAttr () |
| Get attributes computed by this functor. | |
Additional Inherited Members | |
Static Public Attributes inherited from autopas::Functor< Particle_T, CRTP_T > | |
| static constexpr bool | supportsSoASorting = false |
| Whether this functor supports the SortedSoAView optimization path (SoAFunctorPairSorted). | |
This functor generates lists of particles within interactionLength of each other: can be used internally for Verlet list generation and provides a base for a public-facing externally used version, provided in the applicationLibrary.
The functor passes valid pairs of particles to the neighbor list policy via policy.add(p1, p2). The policy itself can then determine how to build up the neighbor lists from the particle pointer pairs.
| Particle_T | The type of Particle class used. |
| NeighborListPolicy_T | Policy that defines how particle pointers are added to a neighbor list. |
|
inline |
Constructor.
| neighborListPolicy | Policy that defines how particle pointers are added to a neighbor list. |
| interactionLength | The distance between particles within which particle pairs get added to the neighbor lists. |
| gatherNewton3Lists | If false, for a particle pair i, j that are neighbors, both particle j will be in particle i's list and particle i will be in particle j's list. If true, for a particle pair i, j that are neighbors, either particle j will be in particle i's list or particle i will be in particle j's list. The latter can be used more easily to reduce calculations by applying forces to both particles in the pair, but care should be taken to avoid race conditions. If true, we make no guarantee which of particle i or j will be in the other's list. If true, this functor will only allow functor calls with newton3 enabled. |
|
inlineoverridevirtual |
Whether InteractionListGeneratorFunctor allows Newton3.
Is always allowed.
Implements autopas::Functor< Particle_T, CRTP_T >.
|
inlineoverridevirtual |
Whether InteractionListGeneratorFunctor allows non-newton3.
This is not allowed if gathering N3 lists. (Not a fundamental issue but messy implementation and not really needed).
Implements autopas::Functor< Particle_T, CRTP_T >.
|
inlineoverridevirtual |
AoSFunctor for interaction list generation.
| i | |
| j | |
| newton3 | Whether AutoPas is using N3 or not for list generation. This is regardless of whether the user requests N3 lists or not. If this and gatherNewton3Lists match, the handling is trivial. If newton3=true and gatherNewton3Lists=false, we just add each particle to each other's list. We do not allow newton3=false with gatherNewton3Lists=true - there are no fundamental issues with this but messy to implement and probably not too needed. |
Reimplemented from autopas::PairwiseFunctor< Particle_T, InteractionListGeneratorFunctor< Particle_T, NeighborListPolicy_T > >.
|
inlinestaticconstexpr |
Get attributes computed by this functor.
|
inlineoverridevirtual |
Implements autopas::Functor< Particle_T, CRTP_T >.
|
inlinestaticconstexpr |
Get attributes needed for computation.
|
inlinestaticconstexpr |
Get attributes needed for computation without N3 optimization.
|
inlineoverridevirtual |
The InteractionListGeneratorFunctor is meant to be used internally and as such is not tuning relevant.
Implements autopas::Functor< Particle_T, CRTP_T >.
|
inlineoverridevirtual |
SoAFunctor for the verlet list generation.
(two cell version)
| soa1 | soa of first cell |
| soa2 | soa of second cell |
| newton3 | Whether AutoPas is using N3 or not for list generation. This is regardless of whether the user requests N3 lists or not. If this and gatherNewton3Lists match, the handling is trivial. If newton3=true and gatherNewton3Lists=false, we just add each particle to each other's list. We do not allow newton3=false with gatherNewton3Lists=true - there are no fundamental issues with this but messy to implement and probably not too needed. |
Reimplemented from autopas::PairwiseFunctor< Particle_T, InteractionListGeneratorFunctor< Particle_T, NeighborListPolicy_T > >.
|
inlineoverridevirtual |
SoAFunctor for verlet list generation.
(single cell version)
| soa | the soa |
Reimplemented from autopas::PairwiseFunctor< Particle_T, InteractionListGeneratorFunctor< Particle_T, NeighborListPolicy_T > >.
|
inlineoverridevirtual |
SoAFunctorVerlet for interaction list generation.
Generates interaction list entries for the particle at index indexFirst in soa and every potential neighbor given by the Verlet list.
| soa | the soa |
| indexFirst | index of the particle whose neighbors are given in neighborList |
| neighborList | indices of the potential neighbors of indexFirst |
| newton3 | Whether AutoPas is using N3 or not for list generation. This is regardless of whether the user requests N3 lists or not. If this and gatherNewton3Lists match, the handling is trivial. If newton3=true and gatherNewton3Lists=false, we just add each particle to each other's list. We do not allow newton3=false with gatherNewton3Lists=true - there are no fundamental issues with this but messy to implement and probably not too needed. |
Reimplemented from autopas::PairwiseFunctor< Particle_T, InteractionListGeneratorFunctor< Particle_T, NeighborListPolicy_T > >.