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 setSortingThreshold(size_t sortingThreshold) = 0;
49
50 protected:
55 std::array<unsigned long, 3> _cellsPerDimension;
56
60 std::vector<ParticleCell> *_cells;
61};
62
63} // namespace autopas
A cell pair traversal.
Definition: CellTraversal.h:23
std::vector< ParticleCell > * _cells
The cells to traverse.
Definition: CellTraversal.h:60
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:55
CellTraversal(const std::array< unsigned long, 3 > &dims)
Constructor of CellTraversal.
Definition: CellTraversal.h:29
virtual ~CellTraversal()=default
Destructor of CellTraversal.
virtual void setSortingThreshold(size_t sortingThreshold)=0
Set the sorting-threshold for traversals that use the CellFunctor If the sum of the number of particl...
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:32