24template <
class ParticleCell,
class PairwiseFunctor>
33 void processBaseStep(
unsigned long x,
unsigned long y) {
35 auto ¤tTower = clusterList.getTowerByIndex(x, y);
37 for (
auto clusterIter =
38 (this->
_useNewton3 ? currentTower.getClusters().begin() : currentTower.getFirstOwnedCluster());
39 clusterIter < (this->
_useNewton3 ? currentTower.getClusters().end() : currentTower.getFirstTailHaloCluster());
41 const auto isHaloCluster =
42 clusterIter < currentTower.getFirstOwnedCluster() or clusterIter >= currentTower.getFirstTailHaloCluster();
60 double interactionLength,
const std::array<double, 3> &cellLength,
61 size_t clusterSize, DataLayoutOption dataLayout,
bool useNewton3)
63 cellLength, dataLayout, useNewton3, false),
64 _functor(pairwiseFunctor),
65 _clusterFunctor(pairwiseFunctor, clusterSize, dataLayout, useNewton3) {}
67 [[nodiscard]] TraversalOption
getTraversalType()
const override {
return TraversalOption::vcl_sliced_balanced; }
82 this->
slicedTraversal([&](
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 a load balanced version of the base sliced traversal.
Definition: SlicedBalancedBasedTraversal.h:30
void slicedTraversal(LoopBody &&loopBody)
The main traversal of the sliced traversal.
Definition: SlicedLockBasedTraversal.h:62
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: VCLSlicedBalancedTraversal.h:26
void loadDataLayout() override
Load Data Layouts required for this Traversal if cells have been set through setCellsToTraverse().
Definition: VCLSlicedBalancedTraversal.h:69
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: VCLSlicedBalancedTraversal.h:89
TraversalOption getTraversalType() const override
Return a enum representing the name of the traversal class.
Definition: VCLSlicedBalancedTraversal.h:67
VCLSlicedBalancedTraversal(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 VCLSlicedBalancedTraversal.
Definition: VCLSlicedBalancedTraversal.h:59
void endTraversal() override
Write Data to AoS if cells have been set through setCellsToTraverse().
Definition: VCLSlicedBalancedTraversal.h:75
void traverseParticles() override
Traverse the particles by pairs, triplets etc.
Definition: VCLSlicedBalancedTraversal.h:81
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