Internal namespace of LCC08CellHandlerUtility containing private functions.
More...
|
constexpr std::pair< int, int > | toMaskXY (const C08CellDirection &direction) |
| Helper function for autopas::LCC08CellHandlerUtility::computePairwiseCellOffsetsC08.
|
|
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, y, z) and overlap needs to be included into the pairwise cell offsets.
|
|
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 indices of the cells while incoperating the cellLength (required in case of less regular cuboid cells)
|
|
Internal namespace of LCC08CellHandlerUtility containing private functions.
◆ C08CellDirection
Represents the interaction directions between cell pairs in the C08 base step.
Enumerator |
---|
frontLeft | The origin or the base cell in the four-cell-square.
|
backLeft | The cell to the back from the origin.
|
frontRight | The cell to the right from the origin.
|
backRight | The cell diagonally to the origin.
|
◆ computeSortingDirection()
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 incoperating the cellLength (required in case of less regular cuboid cells)
- Parameters
-
offset1Vector | the cartesianOffset of cell1 |
offset2Vector | the cartesianOffset of cell2 |
cellLength | the cell length in all three dimensions |
- Returns
- normalized vector containing the sorting direction, i.e. the vector from cell1 to cell2
◆ includeCellPair()
constexpr bool autopas::LCC08CellHandlerUtility::internal::includeCellPair |
( |
const C08CellDirection & |
direction, |
|
|
const std::array< int, 3 > & |
overlap, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
z |
|
) |
| |
|
constexpr |
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.
This function basically masks certain cell combinations, which do not need to be included given their relative position/ or given that another pair already includes the interaction.
- Parameters
-
direction | the direction from base cell to inetracting cell |
overlap | the overlap (calculated from interactionLength divided by cellLength) |
x | the x offset of the base cell |
y | the y offset of the base cell |
z | the z offset of the base cell |
- Returns
- true if the pair needs to be included
◆ toMaskXY()
constexpr std::pair< int, int > autopas::LCC08CellHandlerUtility::internal::toMaskXY |
( |
const C08CellDirection & |
direction | ) |
|
|
constexpr |
Helper function for autopas::LCC08CellHandlerUtility::computePairwiseCellOffsetsC08.
This function basically translates a direction, like backLeft to the corresponding vector pointing towards this cell relativly starting from the base cell. We treat frontLeft as base cell So, e.g. frontLeft --> (0, 0) since we are good Alternativley, e.g. backLeft --> (0, 1) pointing in positive y direction
The values might need to be scaled given the overlap (so e.g. pointing over multiple cells into a direction)
- Parameters
-
direction | one of the four directions |
- Returns
- pair of multipliers: first one for x dimension, second one for y dimension
◆ ALL_DIRECTIONS
constexpr std::array<C08CellDirection, 4> autopas::LCC08CellHandlerUtility::internal::ALL_DIRECTIONS |
|
inlineconstexpr |
Initial value:{
{C08CellDirection::frontLeft, C08CellDirection::backLeft, C08CellDirection::frontRight,
C08CellDirection::backRight}}
Array containing all four enum values of C08CellDirection
.
◆ ENUM_EXTENSION_EXCEPTION
constexpr char autopas::LCC08CellHandlerUtility::internal::ENUM_EXTENSION_EXCEPTION[] |
|
inlineconstexpr |
Initial value:{
"Enum C08CellDirection was extended, but its assciated switch-case statements was not!"}
Error message thrown in case C08CellDirection was extended but the extension was not included in the switch-statement.
- Todo:
- c++20: make this an std::string