AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Attributes | List of all members
autopas::LCC08CellHandler< ParticleCell_T, Functor_T > 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_T, Functor_T >:
Inheritance graph
[legend]

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.
 

Detailed Description

template<class ParticleCell_T, class Functor_T>
class autopas::LCC08CellHandler< ParticleCell_T, Functor_T >

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.

Template Parameters
ParticleCell_Tthe type of cells
Functor_TThe functor that defines the interaction of two or three particles.

Constructor & Destructor Documentation

◆ LCC08CellHandler()

template<class ParticleCell_T , class Functor_T >
autopas::LCC08CellHandler< ParticleCell_T, Functor_T >::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 
)
inlineexplicit

Constructor of the LCC08CellHandler.

Parameters
functorThe 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_T , class Functor_T >
void autopas::LCC08CellHandler< ParticleCell_T, Functor_T >::processBaseCell ( std::vector< ParticleCell_T > &  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.

◆ processBaseCellPairwise()

template<class ParticleCell_T , class Functor_T >
void autopas::LCC08CellHandler< ParticleCell_T, Functor_T >::processBaseCellPairwise ( std::vector< ParticleCell_T > &  cells,
unsigned long  baseIndex 
)
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.

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

◆ processBaseCellTriwise()

template<class ParticleCell_T , class Functor_T >
void autopas::LCC08CellHandler< ParticleCell_T, Functor_T >::processBaseCellTriwise ( std::vector< ParticleCell_T > &  cells,
unsigned long  baseIndex 
)
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.

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

◆ setSortingThreshold()

template<class ParticleCell_T , class Functor_T >
void autopas::LCC08CellHandler< ParticleCell_T, Functor_T >::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

◆ _cellOffsets

template<class ParticleCell_T , class Functor_T >
std::vector<CellOffsetType> autopas::LCC08CellHandler< ParticleCell_T, Functor_T >::_cellOffsets
protected

Pair sets for processBaseCell().

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

◆ _overlap

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

Overlap of interacting cells.

Array allows asymmetric cell sizes.


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