41using OffsetPair = std::pair<unsigned long, unsigned long>;
67template <C08OffsetMode Mode>
70 std::conditional_t<Mode == C08OffsetMode::c04CellPairs, OffsetPairVector, OffsetPair>>>;
100 "Enum C08CellDirection was extended, but its assciated switch-case statements was not!"};
139 const std::array<double, 3> &offset2Vector,
140 const std::array<double, 3> &cellLength);
156template <C08OffsetMode Mode>
158 const std::array<double, 3> &cellLength,
double interactionLength);
constexpr std::array< C08CellDirection, 4 > ALL_DIRECTIONS
Array containing all four enum values of C08CellDirection.
Definition: LCC08CellHandlerUtility.h:91
constexpr char ENUM_EXTENSION_EXCEPTION[]
Error message thrown in case C08CellDirection was extended but the extension was not included in the ...
Definition: LCC08CellHandlerUtility.h:99
C08CellDirection
Represents the interaction directions between cell pairs in the C08 base step.
Definition: LCC08CellHandlerUtility.h:77
@ frontRight
The cell to the right from the origin.
@ backRight
The cell diagonally to the origin.
@ backLeft
The cell to the back from the origin.
@ frontLeft
The origin or the base cell in the four-cell-square.
constexpr std::pair< int, int > toMaskXY(const C08CellDirection &direction)
Helper function for autopas::LCC08CellHandlerUtility::computePairwiseCellOffsetsC08.
Definition: LCC08CellHandlerUtility.cpp:13
constexpr bool 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,...
Definition: LCC08CellHandlerUtility.cpp:27
std::array< double, 3 > 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...
Definition: LCC08CellHandlerUtility.cpp:42
Helper function and type aliases for the C08 base step traversal.
Definition: LCC08CellHandlerUtility.cpp:9
std::pair< unsigned long, unsigned long > OffsetPair
An offset is the distance from a base cell to another cell in one dimensional coordinates.
Definition: LCC08CellHandlerUtility.h:41
std::vector< std::conditional_t< Mode==C08OffsetMode::c08CellPairsSorting, OffsetPairSorting, std::conditional_t< Mode==C08OffsetMode::c04CellPairs, OffsetPairVector, OffsetPair > > > OffsetPairType
Template Magic Parameter Alias which links the types OffsetPairSorting, OffsetPair and OffsetPairVect...
Definition: LCC08CellHandlerUtility.h:70
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-c...
Definition: LCC08CellHandlerUtility.cpp:59
std::tuple< unsigned long, unsigned long, std::array< double, 3 > > OffsetPairSorting
Type Alias for the C08 base step containg cell offsets.
Definition: LCC08CellHandlerUtility.h:33
std::vector< OffsetPair > OffsetPairVector
A vector of OffsetPairs.
Definition: LCC08CellHandlerUtility.h:46
C08OffsetMode
Compile Time Modes for the function autopas::LCC08CellHandlerUtility::computePairwiseCellOffsetsC08.
Definition: LCC08CellHandlerUtility.h:54
@ c04CellPairs
Returns the C08 base step cell pairs adapted to C04, i.e.
@ c08CellPairsSorting
Returns the C08 base step cell pairs with sorting directions (for SortedView projection)
@ c08CellPairs
Returns the C08 base step cell pairs without sorting.