AutoPas  3.0.0
Loading...
Searching...
No Matches
LCC04CombinedSoATraversal.h
Go to the documentation of this file.
1
7#pragma once
8
13
14namespace autopas {
15
25template <class ParticleCell, class PairwiseFunctor>
26class LCC04CombinedSoATraversal : public C04BasedTraversal<ParticleCell, PairwiseFunctor, 2>,
28 public:
39 explicit LCC04CombinedSoATraversal(const std::array<unsigned long, 3> &dims, PairwiseFunctor &pairwiseFunctor,
40 const double interactionLength, const std::array<double, 3> &cellLength,
41 DataLayoutOption dataLayout, bool useNewton3)
42 : C04BasedTraversal<ParticleCell, PairwiseFunctor, 2>(dims, pairwiseFunctor, interactionLength, cellLength,
43 dataLayout, useNewton3),
44 _cellHandler(pairwiseFunctor, this->_cellsPerDimension, interactionLength, cellLength, dataLayout, useNewton3,
45 this->_overlap) {}
46
47 void traverseParticles() override;
48
49 [[nodiscard]] TraversalOption getTraversalType() const override { return TraversalOption::lc_c04_combined_SoA; }
50
58 [[nodiscard]] bool isApplicableToDomain() const override {
59 return this->_overlap[0] == 1 and this->_overlap[1] == 1 and this->_overlap[2] == 1;
60 }
61
66 void setSortingThreshold(size_t sortingThreshold) override {}
67
68 private:
70};
71
72template <class ParticleCell, class PairwiseFunctor>
74 _cellHandler.resizeBuffers();
75 auto &cells = *(this->_cells);
76 this->c04Traversal(
77 [&](unsigned long x, unsigned long y, unsigned long z) { _cellHandler.processBaseCell(cells, x, y, z); });
78}
79
80} // namespace autopas
This class provides the base for traversals using the c04 base step.
Definition: C04BasedTraversal.h:26
std::array< unsigned long, 3 > _cellsPerDimension
The dimensions of the cellblock.
Definition: CellTraversal.h:55
std::array< unsigned long, 3 > _overlap
overlap of interacting cells.
Definition: ColorBasedTraversal.h:121
This class provides the c04 traversal.
Definition: LCC04CombinedSoATraversal.h:27
bool isApplicableToDomain() const override
lc_c04_combined_SoA in theory have no domain-related applicability requirements.
Definition: LCC04CombinedSoATraversal.h:58
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: LCC04CombinedSoATraversal.h:66
LCC04CombinedSoATraversal(const std::array< unsigned long, 3 > &dims, PairwiseFunctor &pairwiseFunctor, const double interactionLength, const std::array< double, 3 > &cellLength, DataLayoutOption dataLayout, bool useNewton3)
Constructor of the c04 traversal.
Definition: LCC04CombinedSoATraversal.h:39
TraversalOption getTraversalType() const override
Return a enum representing the name of the traversal class.
Definition: LCC04CombinedSoATraversal.h:49
void traverseParticles() override
Traverse the particles by pairs, triplets etc.
Definition: LCC04CombinedSoATraversal.h:73
This class provides the base for traversals using the c08 base step, but rather use 4 instead of 8 co...
Definition: LCC04SoACellHandler.h:31
Interface for traversals used by the LinkedCell class.
Definition: LCTraversalInterface.h:18
PairwiseFunctor class.
Definition: PairwiseFunctor.h:31
Class for Cells of Particles.
Definition: ParticleCell.h:49
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:34