AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
autopas::LCC08CellHandler< ParticleCell, PairwiseFunctor > Class Template Reference

This class provides the base for traversals using the c08 base step. More...

#include <LCC08CellHandler.h>

Inheritance diagram for autopas::LCC08CellHandler< ParticleCell, PairwiseFunctor >:
Inheritance graph
[legend]

Public Member Functions

 LCC08CellHandler (PairwiseFunctor *pairwiseFunctor, 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 > &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 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 Attributes

std::vector< LCC08CellHandlerUtility::OffsetPairSorting_cellPairOffsets
 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.
 

Detailed Description

template<class ParticleCell, class PairwiseFunctor>
class autopas::LCC08CellHandler< ParticleCell, PairwiseFunctor >

This class provides the base for traversals using the c08 base step.

The base step processBaseCell() computes one set of pairwise interactions between two cells for each spatial direction based on the baseIndex. After executing the base step on all cells all pairwise interactions for all cells are done.

Template Parameters
ParticleCellthe type of cells
PairwiseFunctorThe functor that defines the interaction of two particles.

Constructor & Destructor Documentation

◆ LCC08CellHandler()

template<class ParticleCell , class PairwiseFunctor >
autopas::LCC08CellHandler< ParticleCell, PairwiseFunctor >::LCC08CellHandler ( PairwiseFunctor pairwiseFunctor,
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 
)
inlineexplicit

Constructor of the LCC08CellHandler.

Parameters
pairwiseFunctorThe functor that defines the interaction of two particles.
cellsPerDimensionThe number of cells per dimension.
interactionLengthInteraction length (cutoff + skin).
cellLengthcell length.
overlapnumber of overlapping cells in each direction as result from cutoff and cellLength.
dataLayoutThe data layout with which this traversal should be initialized.
useNewton3Parameter to specify whether the traversal makes use of newton3 or not.
Todo:
Pass cutoff to _cellFunctor instead of interactionLength, unless this functor is used to build verlet-lists, in that case the interactionLength is needed!

Member Function Documentation

◆ processBaseCell()

template<class ParticleCell , class PairwiseFunctor >
void autopas::LCC08CellHandler< ParticleCell, PairwiseFunctor >::processBaseCell ( std::vector< ParticleCell > &  cells,
unsigned long  baseIndex 
)
inline

Computes one interaction for each spacial direction based on the lower left frontal corner (=base index) of a 2x2x2 block of cells.

Parameters
cellsvector of all cells.
baseIndexIndex respective to which box is constructed.

◆ setSortingThreshold()

template<class ParticleCell , class PairwiseFunctor >
void autopas::LCC08CellHandler< ParticleCell, PairwiseFunctor >::setSortingThreshold ( size_t  sortingThreshold)
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.

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

Member Data Documentation

◆ _cellPairOffsets

Pair sets for processBaseCell().

Values are: offset of first cell, offset of second cell, sorting direction.

◆ _overlap

template<class ParticleCell , class PairwiseFunctor >
const std::array<unsigned long, 3> autopas::LCC08CellHandler< ParticleCell, PairwiseFunctor >::_overlap
protected

Overlap of interacting cells.

Array allows asymmetric cell sizes.


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