AutoPas  3.0.0
Loading...
Searching...
No Matches
C18BasedTraversal.h
Go to the documentation of this file.
1
7#pragma once
8
11
12namespace autopas {
13
22template <class ParticleCell, class Functor>
23class C18BasedTraversal : public ColorBasedTraversal<ParticleCell, Functor> {
24 public:
35 explicit C18BasedTraversal(const std::array<unsigned long, 3> &dims, Functor *functor, const double interactionLength,
36 const std::array<double, 3> &cellLength, DataLayoutOption dataLayout, bool useNewton3)
37 : ColorBasedTraversal<ParticleCell, Functor>(dims, functor, interactionLength, cellLength, dataLayout,
38 useNewton3) {}
39
40 protected:
53 template <bool allCells, typename LoopBody>
54 inline void c18Traversal(LoopBody &&loopBody);
55};
56
57template <class ParticleCell, class Functor>
58template <bool allCells, typename LoopBody>
60 const std::array<unsigned long, 3> stride = {
61 2ul * this->_overlap[0] + 1ul,
62 2ul * this->_overlap[1] + 1ul,
63 this->_overlap[2] + 1ul,
64 };
65 auto end(this->_cellsPerDimension);
66 if (not allCells) {
67 end[2] -= this->_overlap[2];
68 }
69 this->colorTraversal(std::forward<LoopBody>(loopBody), end, stride);
70}
71
72} // namespace autopas
This class provides the base for traversals using the c18 base step.
Definition: C18BasedTraversal.h:23
void c18Traversal(LoopBody &&loopBody)
The main traversal of the C18Traversal.
Definition: C18BasedTraversal.h:59
C18BasedTraversal(const std::array< unsigned long, 3 > &dims, Functor *functor, const double interactionLength, const std::array< double, 3 > &cellLength, DataLayoutOption dataLayout, bool useNewton3)
Constructor of the lc_c18 traversal.
Definition: C18BasedTraversal.h:35
This class provides the base for traversals using base steps based on cell coloring.
Definition: ColorBasedTraversal.h:27
Functor base class.
Definition: Functor.h:40
Class for Cells of Particles.
Definition: ParticleCell.h:51
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:32