AutoPas  3.0.0
Loading...
Searching...
No Matches
CellTraversal.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <array>
11#include <vector>
12
13namespace autopas {
14
22template <class ParticleCell>
24 public:
29 explicit CellTraversal(const std::array<unsigned long, 3> &dims) : _cellsPerDimension(dims), _cells(nullptr) {}
30
34 virtual ~CellTraversal() = default;
35
40 virtual void setCellsToTraverse(std::vector<ParticleCell> &cells) { _cells = &cells; }
41
48 virtual void setAoSSortingThreshold(size_t aosSortingThreshold) = 0;
49
56 virtual void setSoASortingThreshold(size_t soaSortingThreshold) = 0;
57
58 protected:
63 std::array<unsigned long, 3> _cellsPerDimension;
64
68 std::vector<ParticleCell> *_cells;
69};
70
71} // namespace autopas
A cell pair traversal.
Definition: CellTraversal.h:23
std::vector< ParticleCell > * _cells
The cells to traverse.
Definition: CellTraversal.h:68
virtual void setCellsToTraverse(std::vector< ParticleCell > &cells)
Sets the cells to iterate over.
Definition: CellTraversal.h:40
std::array< unsigned long, 3 > _cellsPerDimension
The dimensions of the cellblock.
Definition: CellTraversal.h:63
virtual void setAoSSortingThreshold(size_t aosSortingThreshold)=0
Set the aos-sorting-threshold for traversals that use the CellFunctor If the sum of the number of par...
CellTraversal(const std::array< unsigned long, 3 > &dims)
Constructor of CellTraversal.
Definition: CellTraversal.h:29
virtual ~CellTraversal()=default
Destructor of CellTraversal.
virtual void setSoASortingThreshold(size_t soaSortingThreshold)=0
Set the SoA sorting-threshold for traversals that use the CellFunctor.
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:34