A cell functor. More...
#include <CellFunctor.h>
Public Member Functions | |
CellFunctor (ParticleFunctor *f, const double sortingCutoff, DataLayoutOption dataLayout, bool useNewton3) | |
The constructor of CellFunctor. | |
void | processCell (ParticleCell &cell) |
Process the interactions inside one cell. | |
void | processCellPair (ParticleCell &cell1, ParticleCell &cell2, const std::array< double, 3 > &sortingDirection={0., 0., 0.}) |
Process the interactions between the particles of cell1 with particles of cell2. | |
DataLayoutOption | getDataLayout () const |
Getter. | |
bool | getNewton3 () const |
Getter. | |
bool | getBidirectional () const |
Getter. | |
void | setSortingThreshold (size_t sortingThreshold) |
Set the sorting-threshold 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. | |
A cell functor.
This functor is built from the normal Functor of the template type ParticleFunctor. It is an internal object to handle interactions between two cells of particles.
ParticleCell | |
ParticleFunctor | the functor which |
bidirectional | if no newton3 is used processCellPair(cell1, cell2) should also handle processCellPair(cell2, cell1) |
|
inlineexplicit |
The constructor of CellFunctor.
f | The ParticleFunctor which should be used for the interaction. |
sortingCutoff | This parameter indicates the maximal distance the sorted particles are to interact. This parameter is only relevant for optimization (sorting). This parameter normally should be the cutoff, for building verlet lists, this should be cutoff+skin. |
dataLayout | The data layout to be used. |
useNewton3 | Parameter to specify whether newton3 is used or not. |
|
inline |
Getter.
|
inline |
Getter.
|
inline |
Getter.
void autopas::internal::CellFunctor< ParticleCell, ParticleFunctor, bidirectional >::processCell | ( | ParticleCell & | cell | ) |
Process the interactions inside one cell.
cell | All pairwise interactions of particles inside this cell are calculated. |
void autopas::internal::CellFunctor< ParticleCell, ParticleFunctor, bidirectional >::processCellPair | ( | ParticleCell & | cell1, |
ParticleCell & | cell2, | ||
const std::array< double, 3 > & | sortingDirection = {0., 0., 0.} |
||
) |
Process the interactions between the particles of cell1 with particles of cell2.
cell1 | |
cell2 | |
sortingDirection | Normalized vector connecting centers of cell1 and cell2. If no parameter or {0, 0, 0} is given, sorting will be disabled. |
void autopas::internal::CellFunctor< ParticleCell, ParticleFunctor, bidirectional >::setSortingThreshold | ( | size_t | sortingThreshold | ) |
Set the sorting-threshold 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. |