23template <
class Particle_T>
24class VLCAllCellsNeighborList;
26template <
class Particle_T>
27class VLCCellPairNeighborList;
37template <
class Particle_T,
class NeighborList>
64 template <
class PairwiseFunctor>
66 DataLayoutOption dataLayout,
bool useNewton3) {
67 processCellListsImpl<PairwiseFunctor>(neighborLists, cellIndex, pairwiseFunctor, dataLayout, useNewton3);
76 template <
class PairwiseFunctor>
79 _soa = neighborLists.loadSoA(pairwiseFunctor);
88 template <
class PairwiseFunctor>
91 neighborLists.extractSoA(pairwiseFunctor);
120 template <
class PairwiseFunctor>
122 PairwiseFunctor *pairwiseFunctor, DataLayoutOption dataLayout,
bool useNewton3) {
123 if (dataLayout == DataLayoutOption::aos) {
125 for (
auto &[particlePtr, neighbors] : aosList[cellIndex]) {
126 Particle_T &particle = *particlePtr;
127 for (
auto neighborPtr : neighbors) {
128 Particle_T &neighbor = *neighborPtr;
129 pairwiseFunctor->
AoSFunctor(particle, neighbor, useNewton3);
134 else if (dataLayout == DataLayoutOption::soa) {
136 for (
auto &[particleIndex, neighbors] : soaList[cellIndex]) {
137 if (not neighbors.empty()) {
153 template <
class PairwiseFunctor>
155 PairwiseFunctor *pairwiseFunctor, DataLayoutOption dataLayout,
bool useNewton3) {
156 if (dataLayout == DataLayoutOption::aos) {
158 for (
auto &cellPair : aosList[cellIndex]) {
159 for (
auto &[particlePtr, neighbors] : cellPair) {
160 Particle_T &particle = *particlePtr;
161 for (
auto neighborPtr : neighbors) {
162 Particle_T &neighbor = *neighborPtr;
163 pairwiseFunctor->
AoSFunctor(particle, neighbor, useNewton3);
169 else if (dataLayout == DataLayoutOption::soa) {
172 for (
auto &cellPair : soaList[cellIndex]) {
173 for (
auto &[particleIndex, neighbors] : cellPair) {
174 if (not neighbors.empty()) {
PairwiseFunctor class.
Definition: PairwiseFunctor.h:31
virtual void AoSFunctor(Particle_T &i, Particle_T &j, bool newton3)
PairwiseFunctor for arrays of structures (AoS).
Definition: PairwiseFunctor.h:56
virtual void SoAFunctorVerlet(SoAView< SoAArraysType > soa, const size_t indexFirst, const std::vector< size_t, AlignedAllocator< size_t > > &neighborList, bool newton3)
PairwiseFunctor for structure of arrays (SoA) for neighbor lists.
Definition: PairwiseFunctor.h:86
Structur of the array class.
Definition: SoA.h:28
Neighbor list to be used with VerletListsCells container.
Definition: VLCAllCellsNeighborList.h:27
VerletListsCellsHelpers::AllCellsNeighborListsType< Particle_T > & getAoSNeighborList()
Returns the neighbor list in AoS layout.
Definition: VLCAllCellsNeighborList.h:274
auto & getSoANeighborList()
Returns the neighbor list in SoA layout.
Definition: VLCAllCellsNeighborList.h:282
Neighbor list to be used with VerletListsCells container.
Definition: VLCCellPairNeighborList.h:23
auto & getSoANeighborList()
Returns the neighbor list in SoA layout.
Definition: VLCCellPairNeighborList.h:81
VerletListsCellsHelpers::PairwiseNeighborListsType< Particle_T > & getAoSNeighborList()
Returns the neighbor list in AoS layout.
Definition: VLCCellPairNeighborList.h:73
This class provides the Traversal Interface for the verlet lists cells container.
Definition: VLCTraversalInterface.h:38
VLCTraversalInterface(ContainerOption typeOfList)
Constructor of the VLCTraversalInterface.
Definition: VLCTraversalInterface.h:46
NeighborList * _verletList
The verlet list to iterate over.
Definition: VLCTraversalInterface.h:98
ContainerOption _typeOfList
The type of neighbor list as an enum value.
Definition: VLCTraversalInterface.h:108
void extractSoA(PairwiseFunctor *pairwiseFunctor, NeighborList &neighborLists)
Extract the SoA from the respective neighbor list.
Definition: VLCTraversalInterface.h:89
void processCellLists(NeighborList &neighborLists, unsigned long cellIndex, PairwiseFunctor *pairwiseFunctor, DataLayoutOption dataLayout, bool useNewton3)
Iterate over all neighbor lists list of a given cell.
Definition: VLCTraversalInterface.h:65
virtual void setVerletList(NeighborList &verlet)
Sets the verlet list for the traversal to iterate over.
Definition: VLCTraversalInterface.h:52
void loadSoA(PairwiseFunctor *pairwiseFunctor, NeighborList &neighborLists)
Load the SoA from the respective neighbor list.
Definition: VLCTraversalInterface.h:77
SoA< typename Particle_T::SoAArraysType > * _soa
Structure of arrays to be used if the data layout is SoA.
Definition: VLCTraversalInterface.h:103
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:32