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
14
15namespace autopas {
16
24template <class ParticleCell>
26 public:
31 explicit CellTraversal(const std::array<unsigned long, 3> &dims) : _cellsPerDimension(dims), _cells(nullptr) {}
32
36 virtual ~CellTraversal() = default;
37
42 virtual void setCellsToTraverse(std::vector<ParticleCell> &cells) { _cells = &cells; }
43
53 virtual void setAoSSortingThresholds(const SortingThresholdInfoInterface &aosSortingThreshold) = 0;
54
63 virtual void setSoASortingThresholds(const SortingThresholdInfoInterface &soaSortingThreshold) = 0;
64
65 protected:
70 std::array<unsigned long, 3> _cellsPerDimension;
71
75 std::vector<ParticleCell> *_cells;
76};
77
78} // namespace autopas
A cell pair traversal.
Definition: CellTraversal.h:25
std::vector< ParticleCell > * _cells
The cells to traverse.
Definition: CellTraversal.h:75
virtual void setSoASortingThresholds(const SortingThresholdInfoInterface &soaSortingThreshold)=0
Set the SoA sorting-threshold for traversals that use the CellFunctor.
virtual void setCellsToTraverse(std::vector< ParticleCell > &cells)
Sets the cells to iterate over.
Definition: CellTraversal.h:42
std::array< unsigned long, 3 > _cellsPerDimension
The dimensions of the cellblock.
Definition: CellTraversal.h:70
CellTraversal(const std::array< unsigned long, 3 > &dims)
Constructor of CellTraversal.
Definition: CellTraversal.h:31
virtual ~CellTraversal()=default
Destructor of CellTraversal.
virtual void setAoSSortingThresholds(const SortingThresholdInfoInterface &aosSortingThreshold)=0
Set the aos-sorting-threshold for traversals that use the CellFunctor.
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:34
Polymorphic base for sorting-threshold storage.
Definition: SortingThresholdInfoInterface.h:18