A cell functor. More...
#include <CellFunctor3B.h>
Public Member Functions | |
CellFunctor3B (ParticleFunctor *f, const double sortingCutoff, DataLayoutOption dataLayout, bool useNewton3) | |
The constructor of CellFunctor3B. | |
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. | |
void | processCellTriple (ParticleCell &cell1, ParticleCell &cell2, ParticleCell &cell3, const std::array< double, 3 > &sortingDirection={0., 0., 0.}) |
Process the interactions between 3 particles, all located in a different cell. | |
DataLayoutOption::Value | 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 three 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 up to three cells of particles.
ParticleCell | |
ParticleFunctor | the functor which is used for particle interactions |
bidirectional | if no newton3 is used, processCellPair(..) and processCellPair(..) should handle interactions for particles from all cells. |
|
inlineexplicit |
The constructor of CellFunctor3B.
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::CellFunctor3B< ParticleCell, ParticleFunctor, bidirectional >::processCell | ( | ParticleCell & | cell | ) |
Process the interactions inside one cell.
cell | All triwise interactions of particles inside this cell are calculated. |
void autopas::internal::CellFunctor3B< 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.
This includes both triwise interactions with 2 particles from cell1 and 1 particle from cell2 as well as 1 particle from cell1 and 2 particles from 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::CellFunctor3B< ParticleCell, ParticleFunctor, bidirectional >::processCellTriple | ( | ParticleCell & | cell1, |
ParticleCell & | cell2, | ||
ParticleCell & | cell3, | ||
const std::array< double, 3 > & | sortingDirection = {0., 0., 0.} |
||
) |
Process the interactions between 3 particles, all located in a different cell.
cell1 | |
cell2 | |
cell3 | |
sortingDirection | Normalized vector along which particles will be sorted.If no parameter or {0, 0, 0} is given, sorting will be disabled. |
void autopas::internal::CellFunctor3B< ParticleCell, ParticleFunctor, bidirectional >::setSortingThreshold | ( | size_t | sortingThreshold | ) |
Set the sorting-threshold If the sum of the number of particles in three 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 three cells from which sorting should be enabled. |