This class provides the base for traversals using base steps based on cell coloring. More...
#include <ColorBasedTraversal.h>


Public Member Functions | |
| void | initTraversal () override |
| load Data Layouts required for this Traversal if cells have been set through setCellsToTraverse(). | |
| void | endTraversal () override |
| write Data to AoS if cells have been set through setCellsToTraverse(). | |
Public Member Functions inherited from autopas::CellTraversal< ParticleCell > | |
| CellTraversal (const std::array< unsigned long, 3 > &dims) | |
| Constructor of CellTraversal. | |
| virtual | ~CellTraversal ()=default |
| Destructor of CellTraversal. | |
| virtual void | setCellsToTraverse (std::vector< ParticleCell > &cells) |
| Sets the cells to iterate over. | |
| virtual void | setAoSSortingThresholds (const SortingThresholdInfoInterface &aosSortingThreshold)=0 |
| Set the aos-sorting-threshold for traversals that use the CellFunctor. | |
| virtual void | setSoASortingThresholds (const SortingThresholdInfoInterface &soaSortingThreshold)=0 |
| Set the SoA sorting-threshold for traversals that use the CellFunctor. | |
Public Member Functions inherited from autopas::TraversalInterface | |
| virtual | ~TraversalInterface ()=default |
| Destructor of TraversalInterface. | |
| TraversalInterface (DataLayoutOption dataLayout, bool useNewton3) | |
| Constructor of the TraversalInterface. | |
| virtual TraversalOption | getTraversalType () const =0 |
| Return a enum representing the name of the traversal class. | |
| virtual bool | isApplicableToDomain () const =0 |
| Checks if the traversal is applicable to the current state of the domain. | |
| virtual void | initTraversal ()=0 |
| Initializes the traversal. | |
| virtual void | traverseParticles ()=0 |
| Traverse the particles by pairs, triplets etc. | |
| virtual void | endTraversal ()=0 |
| Finalizes the traversal. | |
| bool | getUseNewton3 () const |
| Return whether the traversal uses newton 3. | |
| DataLayoutOption | getDataLayout () const |
| Return the data layout option. | |
Protected Member Functions | |
| ColorBasedTraversal (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 ColorBasedTraversal. | |
| ~ColorBasedTraversal () override=default | |
| Destructor of ColorBasedTraversal. | |
| template<typename LoopBody > | |
| void | colorTraversal (LoopBody &&loopBody, const std::array< unsigned long, 3 > &end, const std::array< unsigned long, 3 > &stride, const std::array< unsigned long, 3 > &offset={0ul, 0ul, 0ul}) |
| The main traversal of the ColorBasedTraversal. | |
| virtual void | notifyColorChange (unsigned long newColor) |
| This method is called when the color during the traversal has changed. | |
Protected Attributes | |
| const double | _interactionLength |
| Interaction length (cutoff + skin). | |
| const std::array< double, 3 > | _cellLength |
| cell length in CellBlock3D. | |
| std::array< unsigned long, 3 > | _overlap |
| overlap of interacting cells. | |
Protected Attributes inherited from autopas::CellTraversal< ParticleCell > | |
| std::array< unsigned long, 3 > | _cellsPerDimension |
| The dimensions of the cellblock. | |
| std::vector< ParticleCell > * | _cells |
| The cells to traverse. | |
Protected Attributes inherited from autopas::TraversalInterface | |
| DataLayoutOption | _dataLayout |
| The datalayout used by this traversal. | |
| bool | _useNewton3 |
| If this traversal makes use of newton3. | |
This class provides the base for traversals using base steps based on cell coloring.
| ParticleCell | the type of cells |
| Functor | The functor that defines the interaction between particles. |
| collapseDepth | Set the depth of loop collapsion for OpenMP. Loop variables from outer to inner loop: z,y,x |
|
inlineexplicitprotected |
Constructor of the ColorBasedTraversal.
| dims | The dimensions of the cellblock, i.e. the number of cells in x, y and z direction. |
| functor | The functor that defines the interaction between particles. |
| interactionLength | Interaction length (cutoff + skin). |
| cellLength | cell length. |
| dataLayout | The data layout with which this traversal should be initialized. |
| useNewton3 | Parameter to specify whether the traversal makes use of newton3 or not. |
|
inlineprotected |
The main traversal of the ColorBasedTraversal.
| LoopBody | type of the loop body |
| loopBody | The body of the loop as a function. Normally a lambda function, that takes as parameters (x,y,z). If you need additional input from outside, please use captures (by reference). |
| end | 3D index until interactions are processed (exclusive). |
| stride | Distance (in cells) to the next cell of the same color. |
| offset | initial offset (in cells) in which cell to start the traversal. |
|
inlineoverridevirtual |
write Data to AoS if cells have been set through setCellsToTraverse().
Implements autopas::TraversalInterface.
|
inlineoverridevirtual |
load Data Layouts required for this Traversal if cells have been set through setCellsToTraverse().
Implements autopas::TraversalInterface.
|
inlineprotectedvirtual |
This method is called when the color during the traversal has changed.
| newColor | The new current color. |
Reimplemented in autopas::C08TraversalColorChangeNotify< ParticleCell, PairwiseFunctor >.
|
protected |
overlap of interacting cells.
Array allows asymmetric cell sizes.