This class provides the base for traversals using the c08 base step. More...
#include <LCC08CellHandler.h>

Public Member Functions | |
| LCC08CellHandler (Functor_T &functor, const std::array< unsigned long, 3 > &cellsPerDimension, double interactionLength, const std::array< double, 3 > &cellLength, const std::array< unsigned long, 3 > &overlap, DataLayoutOption dataLayout, bool useNewton3) | |
| Constructor of the LCC08CellHandler. | |
| void | processBaseCell (std::vector< ParticleCell_T > &cells, unsigned long baseIndex) |
| Computes one interaction for each spacial direction based on the lower left frontal corner (=base index) of a 2x2x2 block of cells. | |
| void | processBaseCellPairwise (std::vector< ParticleCell_T > &cells, unsigned long baseIndex) |
| Pairwise implementation of processBaseCell(). | |
| void | processBaseCellTriwise (std::vector< ParticleCell_T > &cells, unsigned long baseIndex) |
| Triwise implementation of processBaseCell(). | |
| void | setSortingThreshold (size_t sortingThreshold) |
| Set the sorting-threshold for traversals that use the CellFunctor If the sum of the number of particles in two cells is greater or equal to that value, the CellFunctor creates a sorted view of the particles to avoid unnecessary distance checks. | |
Protected Types | |
| using | CellOffsetType = std::conditional_t< decltype(utils::isPairwiseFunctor< Functor_T >())::value, LCC08CellHandlerUtility::OffsetPairSorting, LCC08CellHandlerUtility::OffsetTripletSorting > |
| CellOffset needs to store interaction pairs or triplets depending on the Functor type. | |
Protected Attributes | |
| std::vector< CellOffsetType > | _cellOffsets |
| Pair sets for processBaseCell(). | |
| const std::array< unsigned long, 3 > | _overlap |
| Overlap of interacting cells. | |
| DataLayoutOption | _dataLayout |
| The datalayout to be used. | |
| bool | _useNewton3 |
| If newton3 should be used or not. | |
This class provides the base for traversals using the c08 base step.
The base step processBaseCell() computes the full set of pairwise (or triwise) interactions between two (or three) cells for each spatial direction based on the baseIndex. After executing the base step on all cells, all pairwise (or triwise) interactions for all cells are done.
| ParticleCell_T | the type of cells |
| Functor_T | The functor that defines the interaction of two or three particles. |
|
inlineexplicit |
Constructor of the LCC08CellHandler.
| functor | The functor that defines the interaction of two particles. |
| cellsPerDimension | The number of cells per dimension. |
| interactionLength | Interaction length (cutoff + skin). |
| cellLength | cell length. |
| overlap | number of overlapping cells in each direction as result from cutoff and cellLength. |
| dataLayout | The data layout with which this traversal should be initialized. |
| useNewton3 | Parameter to specify whether the traversal makes use of newton3 or not. |
|
inline |
Computes one interaction for each spacial direction based on the lower left frontal corner (=base index) of a 2x2x2 block of cells.
| cells | vector of all cells. |
| baseIndex | Index respective to which box is constructed. |
|
inline |
Pairwise implementation of processBaseCell().
Computes one interaction for each spacial direction based on the lower left frontal corner (=base index) of a 2x2x2 block of cells.
| cells | vector of all cells. |
| baseIndex | Index respective to which box is constructed. |
|
inline |
Triwise implementation of processBaseCell().
Computes one interaction for each spacial direction based on the lower left frontal corner (=base index) of a 2x2x2 block of cells.
| cells | vector of all cells. |
| baseIndex | Index respective to which box is constructed. |
|
inline |
Set the sorting-threshold for traversals that use the CellFunctor If the sum of the number of particles in two cells is greater or equal to that value, the CellFunctor creates a sorted view of the particles to avoid unnecessary distance checks.
| sortingThreshold | Sum of the number of particles in two cells from which sorting should be enabled |
|
protected |
Pair sets for processBaseCell().
Values are: offset of first cell, offset of second cell, sorting direction.
|
protected |
Overlap of interacting cells.
Array allows asymmetric cell sizes.