AutoPas  3.0.0
Loading...
Searching...
No Matches
Namespaces | Typedefs | Enumerations | Functions
autopas::LCC08CellHandlerUtility Namespace Reference

Helper function and type aliases for the C08 base step traversal. More...

Namespaces

namespace  internal
 Internal namespace of LCC08CellHandlerUtility containing private functions.
 

Typedefs

using OffsetPairSorting = std::tuple< unsigned long, unsigned long, std::array< double, 3 > >
 Type Alias for the C08 base step containg cell offsets.
 
using OffsetPair = std::pair< unsigned long, unsigned long >
 An offset is the distance from a base cell to another cell in one dimensional coordinates.
 
using OffsetPairVector = std::vector< OffsetPair >
 A vector of OffsetPairs.
 
template<C08OffsetMode Mode>
using OffsetPairType = std::vector< std::conditional_t< Mode==C08OffsetMode::c08CellPairsSorting, OffsetPairSorting, std::conditional_t< Mode==C08OffsetMode::c04CellPairs, OffsetPairVector, OffsetPair > > >
 Template Magic Parameter Alias which links the types OffsetPairSorting, OffsetPair and OffsetPairVector.
 

Enumerations

enum class  C08OffsetMode { c08CellPairs = 0 , c08CellPairsSorting = 1 , c04CellPairs = 2 }
 Compile Time Modes for the function autopas::LCC08CellHandlerUtility::computePairwiseCellOffsetsC08. More...
 

Functions

template<C08OffsetMode Mode>
OffsetPairType< Mode > computePairwiseCellOffsetsC08 (const std::array< unsigned long, 3 > &cellsPerDimension, const std::array< double, 3 > &cellLength, double interactionLength)
 Computes the cell pair offsets for the C08 base step and the normalized vector between pair of cell-centers, which is later used for early stopping the evaluation of the pairwise cell interactions due to being out-of-reach.
 

Detailed Description

Helper function and type aliases for the C08 base step traversal.

Typedef Documentation

◆ OffsetPair

using autopas::LCC08CellHandlerUtility::OffsetPair = typedef std::pair<unsigned long, unsigned long>

An offset is the distance from a base cell to another cell in one dimensional coordinates.

Hence, this is a pair consisting of.

  • offset of first cell
  • offset of second cell

◆ OffsetPairSorting

using autopas::LCC08CellHandlerUtility::OffsetPairSorting = typedef std::tuple<unsigned long, unsigned long, std::array<double, 3> >

Type Alias for the C08 base step containg cell offsets.

An offset is the distance from a base cell to another cell in one dimensional coordinates. A triplet consisting of:

  • offset of first cell
  • offset of second cell
  • sorting direction a.k.a. the normalized vector between cell1 and cell2 connecting their centers. This is used in the CellFunctor for AoS processing of Cell Pairs, ultimatley in autopas::SortedCellView for building a projection order of particles to early stop the processing.

Enumeration Type Documentation

◆ C08OffsetMode

Compile Time Modes for the function autopas::LCC08CellHandlerUtility::computePairwiseCellOffsetsC08.

Note
In case of a new mode, this also requires the explciit instantation of the new template in LCC08CellHandlerUtility.cpp and a modificaqtion to OffsetPairType
Enumerator
c08CellPairs 

Returns the C08 base step cell pairs without sorting.

c08CellPairsSorting 

Returns the C08 base step cell pairs with sorting directions (for SortedView projection)

c04CellPairs 

Returns the C08 base step cell pairs adapted to C04, i.e.

two-dimensions resolved on X-axis

Function Documentation

◆ computePairwiseCellOffsetsC08()

template<C08OffsetMode Mode>
OffsetPairType< Mode > autopas::LCC08CellHandlerUtility::computePairwiseCellOffsetsC08 ( const std::array< unsigned long, 3 > &  cellsPerDimension,
const std::array< double, 3 > &  cellLength,
double  interactionLength 
)

Computes the cell pair offsets for the C08 base step and the normalized vector between pair of cell-centers, which is later used for early stopping the evaluation of the pairwise cell interactions due to being out-of-reach.

Template Parameters
ModeDetermines the concret return type (see C08OffsetMode
Parameters
cellsPerDimensionthe number of cells per dimension
cellLengththe length of a cell in CellBlock3D.
interactionLengththe interaction length consisting of cutoff + skin
Returns
depending on template parameters a
  • vector containing cell offset pairs
  • vector containg cell offsets + sorting/ vector between cell centers triplets
  • vector of vector containing cell offsets (pre-sorted after X dimension)