AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
autopas::internal::CellFunctor3B< ParticleCell, ParticleFunctor, bidirectional > Class Template Reference

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.
 

Detailed Description

template<class ParticleCell, class ParticleFunctor, bool bidirectional = true>
class autopas::internal::CellFunctor3B< ParticleCell, ParticleFunctor, bidirectional >

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.

Template Parameters
ParticleCell
ParticleFunctorthe functor which is used for particle interactions
bidirectionalif no newton3 is used, processCellPair(..) and processCellPair(..) should handle interactions for particles from all cells.

Constructor & Destructor Documentation

◆ CellFunctor3B()

template<class ParticleCell , class ParticleFunctor , bool bidirectional = true>
autopas::internal::CellFunctor3B< ParticleCell, ParticleFunctor, bidirectional >::CellFunctor3B ( ParticleFunctor *  f,
const double  sortingCutoff,
DataLayoutOption  dataLayout,
bool  useNewton3 
)
inlineexplicit

The constructor of CellFunctor3B.

Parameters
fThe ParticleFunctor which should be used for the interaction.
sortingCutoffThis 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.
dataLayoutThe data layout to be used.
useNewton3Parameter to specify whether newton3 is used or not.

Member Function Documentation

◆ getBidirectional()

template<class ParticleCell , class ParticleFunctor , bool bidirectional = true>
bool autopas::internal::CellFunctor3B< ParticleCell, ParticleFunctor, bidirectional >::getBidirectional ( ) const
inline

Getter.

Returns

◆ getDataLayout()

template<class ParticleCell , class ParticleFunctor , bool bidirectional = true>
DataLayoutOption::Value autopas::internal::CellFunctor3B< ParticleCell, ParticleFunctor, bidirectional >::getDataLayout ( ) const
inline

Getter.

Returns

◆ getNewton3()

template<class ParticleCell , class ParticleFunctor , bool bidirectional = true>
bool autopas::internal::CellFunctor3B< ParticleCell, ParticleFunctor, bidirectional >::getNewton3 ( ) const
inline

Getter.

Returns

◆ processCell()

template<class ParticleCell , class ParticleFunctor , bool bidirectional>
void autopas::internal::CellFunctor3B< ParticleCell, ParticleFunctor, bidirectional >::processCell ( ParticleCell cell)

Process the interactions inside one cell.

Parameters
cellAll triwise interactions of particles inside this cell are calculated.

◆ processCellPair()

template<class ParticleCell , class ParticleFunctor , bool bidirectional>
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.

Parameters
cell1
cell2
sortingDirectionNormalized vector connecting centers of cell1 and cell2. If no parameter or {0, 0, 0} is given, sorting will be disabled.

◆ processCellTriple()

template<class ParticleCell , class ParticleFunctor , bool bidirectional>
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.

Parameters
cell1
cell2
cell3
sortingDirectionNormalized vector along which particles will be sorted.If no parameter or {0, 0, 0} is given, sorting will be disabled.

◆ setSortingThreshold()

template<class ParticleCell , class ParticleFunctor , bool bidirectional>
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.

Parameters
sortingThresholdSum of the number of particles in three cells from which sorting should be enabled.

The documentation for this class was generated from the following file: