AutoPas  3.0.0
Loading...
Searching...
No Matches
Namespaces | Typedefs | Enumerations | Functions | Variables
LCC08CellHandlerUtility.h File Reference
#include <array>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
Include dependency graph for LCC08CellHandlerUtility.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  autopas
 This is the main namespace of AutoPas.
 
namespace  autopas::LCC08CellHandlerUtility
 Helper function and type aliases for the C08 base step traversal.
 
namespace  autopas::LCC08CellHandlerUtility::internal
 Internal namespace of LCC08CellHandlerUtility containing private functions.
 

Typedefs

using autopas::LCC08CellHandlerUtility::OffsetPairSorting = std::tuple< unsigned long, unsigned long, std::array< double, 3 > >
 Type Alias for the C08 base step containing cell offsets.
 
using autopas::LCC08CellHandlerUtility::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 autopas::LCC08CellHandlerUtility::OffsetPair = std::pair< unsigned long, unsigned long >
 An offset is the distance from a base cell to another cell in one dimensional coordinates.
 
using autopas::LCC08CellHandlerUtility::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 autopas::LCC08CellHandlerUtility::OffsetPairVector = std::vector< OffsetPair >
 A vector of OffsetPairs.
 
using autopas::LCC08CellHandlerUtility::OffsetTripletVector = std::vector< OffsetTriplet >
 A vector of OffsetTriplets.
 
template<C08OffsetMode Mode>
using autopas::LCC08CellHandlerUtility::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 autopas::LCC08CellHandlerUtility::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  autopas::LCC08CellHandlerUtility::C08OffsetMode { autopas::LCC08CellHandlerUtility::noSorting = 0 , autopas::LCC08CellHandlerUtility::sorting = 1 , autopas::LCC08CellHandlerUtility::c04NoSorting = 2 }
 Compile Time Modes for the function autopas::LCC08CellHandlerUtility::computePairwiseCellOffsetsC08. More...
 
enum class  autopas::LCC08CellHandlerUtility::internal::C08CellDirection : int { autopas::LCC08CellHandlerUtility::internal::frontLeft , autopas::LCC08CellHandlerUtility::internal::backLeft , autopas::LCC08CellHandlerUtility::internal::frontRight , autopas::LCC08CellHandlerUtility::internal::backRight }
 Represents the interaction directions between cell pairs in the C08 base step. More...
 

Functions

constexpr std::pair< int, int > autopas::LCC08CellHandlerUtility::internal::toMaskXY (const C08CellDirection &direction)
 Helper function for autopas::LCC08CellHandlerUtility::computePairwiseCellOffsetsC08.
 
constexpr bool autopas::LCC08CellHandlerUtility::internal::includeCellPair (const C08CellDirection &direction, const std::array< int, 3 > &overlap, int x, int y, int z)
 Returns true if the cell-interaction in the given direction, with the given base cell coordinates (x, y, z) and overlap needs to be included into the pairwise cell offsets.
 
std::array< double, 3 > autopas::LCC08CellHandlerUtility::internal::computeSortingDirection (const std::array< double, 3 > &offset1Vector, const std::array< double, 3 > &offset2Vector, const std::array< double, 3 > &cellLength)
 Computes the sorting direction between two cells from center of cell1 to center of cell2 using the 3D indices of the cells while incorporating the cellLength (required in case of less regular cuboid cells)
 
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<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.
 

Variables

constexpr std::array< C08CellDirection, 4 > autopas::LCC08CellHandlerUtility::internal::ALL_DIRECTIONS
 Array containing all four enum values of C08CellDirection.
 
constexpr char autopas::LCC08CellHandlerUtility::internal::ENUM_EXTENSION_EXCEPTION []
 Error message thrown in case C08CellDirection was extended but the extension was not included in the switch-statement.
 

Detailed Description

Author
J. Schuhmacher
Date
11.07.2024