24template <
class ParticleCell,
class PairwiseFunctor>
33 void processBaseStep(
unsigned long x,
unsigned long y) {
35 auto ¤tTower = clusterList.getTowerByIndex(x, y);
36 for (
auto clusterIter =
37 (this->
_useNewton3 ? currentTower.getClusters().begin() : currentTower.getFirstOwnedCluster());
38 clusterIter < (this->
_useNewton3 ? currentTower.getClusters().end() : currentTower.getFirstTailHaloCluster());
40 const auto isHaloCluster =
41 clusterIter < currentTower.getFirstOwnedCluster() or clusterIter >= currentTower.getFirstTailHaloCluster();
59 double interactionLength,
const std::array<double, 3> &cellLength,
size_t clusterSize,
60 DataLayoutOption dataLayout,
bool useNewton3)
62 dataLayout, useNewton3, false),
63 _functor(pairwiseFunctor),
64 _clusterFunctor(pairwiseFunctor, clusterSize, dataLayout, useNewton3) {}
66 [[nodiscard]] TraversalOption
getTraversalType()
const override {
return TraversalOption::vcl_sliced_c02; }
81 this->
cSlicedTraversal([&](
unsigned long x,
unsigned long y,
unsigned long z) { processBaseStep(x, y); });
PairwiseFunctor class.
Definition: PairwiseFunctor.h:31
Class for Cells of Particles.
Definition: ParticleCell.h:51
Particle_T ParticleType
The particle type for this cell.
Definition: ParticleCell.h:56
This class provides the colored sliced traversal.
Definition: SlicedC02BasedTraversal.h:33
void cSlicedTraversal(LoopBody &&loopBody)
The main traversal of the colored sliced traversal.
Definition: SlicedC02BasedTraversal.h:76
DataLayoutOption _dataLayout
The datalayout used by this traversal.
Definition: TraversalInterface.h:75
bool _useNewton3
If this traversal makes use of newton3.
Definition: TraversalInterface.h:80
This traversal splits the domain into slices along the longer dimension among x and y.
Definition: VCLSlicedC02Traversal.h:26
void loadDataLayout() override
Load Data Layouts required for this Traversal if cells have been set through setCellsToTraverse().
Definition: VCLSlicedC02Traversal.h:68
VCLSlicedC02Traversal(const std::array< unsigned long, 3 > &dims, PairwiseFunctor *pairwiseFunctor, double interactionLength, const std::array< double, 3 > &cellLength, size_t clusterSize, DataLayoutOption dataLayout, bool useNewton3)
Constructor of the VCLSlicedC02Traversal.
Definition: VCLSlicedC02Traversal.h:58
TraversalOption getTraversalType() const override
Return a enum representing the name of the traversal class.
Definition: VCLSlicedC02Traversal.h:66
void endTraversal() override
Write Data to AoS if cells have been set through setCellsToTraverse().
Definition: VCLSlicedC02Traversal.h:74
void setSortingThreshold(size_t sortingThreshold) override
Set the sorting-threshold for traversals that use the CellFunctor If the sum of the number of particl...
Definition: VCLSlicedC02Traversal.h:88
void traverseParticles() override
Traverse the particles by pairs, triplets etc.
Definition: VCLSlicedC02Traversal.h:80
Interface for traversals of the VerletClusterLists container.
Definition: VCLTraversalInterface.h:20
Provides methods to traverse a single cluster and a pair of clusters.
Definition: VCLClusterFunctor.h:21
void processCluster(internal::Cluster< Particle_T > &cluster, bool isHaloCluster)
Invokes the calculations of all interactions within the cluster and, if they exist,...
Definition: VCLClusterFunctor.h:38
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:32