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 containing cell offsets.
 
using OffsetTripletSorting = std::tuple< unsigned long, unsigned long, unsigned long, std::array< double, 3 > >
 Type Alias for the C08 base step containing cell offsets for cell triplets.
 
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 OffsetTriplet = std::tuple< unsigned long, 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.
 
using OffsetTripletVector = std::vector< OffsetTriplet >
 A vector of OffsetTriplets.
 
template<C08OffsetMode Mode>
using OffsetPairType = std::vector< std::conditional_t< Mode==C08OffsetMode::sorting, OffsetPairSorting, std::conditional_t< Mode==C08OffsetMode::c04NoSorting, OffsetPairVector, OffsetPair > > >
 Template Magic Parameter Alias, which links the types OffsetPairSorting, OffsetPair and OffsetPairVector.
 
template<C08OffsetMode Mode>
using OffsetTripletType = std::vector< std::conditional_t< Mode==C08OffsetMode::sorting, OffsetTripletSorting, std::conditional_t< Mode==C08OffsetMode::c04NoSorting, OffsetTripletVector, OffsetTriplet > > >
 Template Magic Parameter Alias, which links the types OffsetTripletSorting, OffsetTriplet and OffsetTripletVector.
 

Enumerations

enum class  C08OffsetMode { noSorting = 0 , sorting = 1 , c04NoSorting = 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 the 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<C08OffsetMode Mode>
OffsetTripletType< Mode > computeTriwiseCellOffsetsC08 (const std::array< unsigned long, 3 > &cellsPerDimension, const std::array< double, 3 > &cellLength, double interactionLength)
 Computes the cell triplet offsets for the C08 base step.
 

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 containing 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, ultimately in autopas::SortedCellView for building a projection order of particles to early stop the processing.

◆ OffsetTriplet

using autopas::LCC08CellHandlerUtility::OffsetTriplet = typedef std::tuple<unsigned long, unsigned long, unsigned long>

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

Hence, this is a triplet consisting of.

  • offset of the first cell
  • offset of the second cell
  • offset of the third cell

◆ OffsetTripletSorting

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

Type Alias for the C08 base step containing cell offsets for cell triplets.

An offset is the distance from a base cell to another cell in one-dimensional coordinates. It is a tuple consisting of:

  • offset of the first cell
  • offset of the second cell
  • offset of the third 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 Triplets, ultimately 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 explicit instantiation of the new template in LCC08CellHandlerUtility.cpp and a modification to OffsetPairType
Enumerator
noSorting 

Returns the C08 base step cell pairs without sorting.

sorting 

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

c04NoSorting 

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 the 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 concrete 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 containing cell offsets + sorting/ vector between cell centers triplets
  • vector of vector containing cell offsets (pre-sorted after X dimension)

◆ computeTriwiseCellOffsetsC08()

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

Computes the cell triplet offsets for the C08 base step.

The offsets include unique triplets {a, b, c}, pairs as {a, b, b} (not {a, a, b}) and the base cell only {0, 0, 0}. If the Mode is sorting, a normalized vector connecting the base cell and the second cell is additionally returned.

Template Parameters
ModeDetermines the concrete 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 triplets
  • vector containing cell offsets + sorting/vector between cell centers of the base cell and second cell
  • vector of vector containing cell offsets (pre-sorted after X dimension)