26template <
class Particle_T,
class NeighborList>
53 template <
class PairwiseFunctor>
55 DataLayoutOption dataLayout,
bool useNewton3) {
56 processCellListsImpl<PairwiseFunctor>(neighborLists, cellIndex, pairwiseFunctor, dataLayout, useNewton3);
65 template <
class PairwiseFunctor>
68 _soa = neighborLists.loadSoA(pairwiseFunctor);
77 template <
class PairwiseFunctor>
80 neighborLists.extractSoA(pairwiseFunctor);
109 template <
class PairwiseFunctor>
111 PairwiseFunctor *pairwiseFunctor, DataLayoutOption dataLayout,
bool useNewton3) {
112 if (dataLayout == DataLayoutOption::aos) {
114 for (
auto &[particlePtr, neighbors] : aosList[cellIndex]) {
115 Particle_T &particle = *particlePtr;
116 for (
auto neighborPtr : neighbors) {
117 Particle_T &neighbor = *neighborPtr;
118 pairwiseFunctor->
AoSFunctor(particle, neighbor, useNewton3);
123 else if (dataLayout == DataLayoutOption::soa) {
125 for (
auto &[particleIndex, neighbors] : soaList[cellIndex]) {
126 if (not neighbors.empty()) {
142 template <
class PairwiseFunctor>
144 PairwiseFunctor *pairwiseFunctor, DataLayoutOption dataLayout,
bool useNewton3) {
145 if (dataLayout == DataLayoutOption::aos) {
147 for (
auto &cellPair : aosList[cellIndex]) {
148 for (
auto &[particlePtr, neighbors] : cellPair) {
149 Particle_T &particle = *particlePtr;
150 for (
auto neighborPtr : neighbors) {
151 Particle_T &neighbor = *neighborPtr;
152 pairwiseFunctor->
AoSFunctor(particle, neighbor, useNewton3);
158 else if (dataLayout == DataLayoutOption::soa) {
161 for (
auto &cellPair : soaList[cellIndex]) {
162 for (
auto &[particleIndex, neighbors] : cellPair) {
163 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:38
VerletListsCellsHelpers::AllCellsNeighborListsType< Particle_T > & getAoSNeighborList()
Returns the neighbor list in AoS layout.
Definition: VLCAllCellsNeighborList.h:162
auto & getSoANeighborList()
Returns the neighbor list in SoA layout.
Definition: VLCAllCellsNeighborList.h:170
Neighbor list to be used with VerletListsCells container.
Definition: VLCCellPairNeighborList.h:31
auto & getSoANeighborList()
Returns the neighbor list in SoA layout.
Definition: VLCCellPairNeighborList.h:80
VerletListsCellsHelpers::PairwiseNeighborListsType< Particle_T > & getAoSNeighborList()
Returns the neighbor list in AoS layout.
Definition: VLCCellPairNeighborList.h:64
This class provides the Traversal Interface for the verlet lists cells container.
Definition: VLCTraversalInterface.h:27
VLCTraversalInterface(ContainerOption typeOfList)
Constructor of the VLCTraversalInterface.
Definition: VLCTraversalInterface.h:35
NeighborList * _verletList
The verlet list to iterate over.
Definition: VLCTraversalInterface.h:87
ContainerOption _typeOfList
The type of neighbor list as an enum value.
Definition: VLCTraversalInterface.h:97
void extractSoA(PairwiseFunctor *pairwiseFunctor, NeighborList &neighborLists)
Extract the SoA from the respective neighbor list.
Definition: VLCTraversalInterface.h:78
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:54
virtual void setVerletList(NeighborList &verlet)
Sets the verlet list for the traversal to iterate over.
Definition: VLCTraversalInterface.h:41
void loadSoA(PairwiseFunctor *pairwiseFunctor, NeighborList &neighborLists)
Load the SoA from the respective neighbor list.
Definition: VLCTraversalInterface.h:66
SoA< typename Particle_T::SoAArraysType > * _soa
Structure of arrays to be used if the data layout is SoA.
Definition: VLCTraversalInterface.h:92
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:32