waLBerla 7.2
|
Namespaces | |
namespace | internal |
Classes | |
class | Iterator |
Iterator over all directions contained in a stencil. More... | |
Typedefs | |
using | $name = internal::$name<> |
Enumerations | |
enum | Direction { C = 0 , N = 1 , S = 2 , W = 3 , E = 4 , T = 5 , B = 6 , NW = 7 , NE = 8 , SW = 9 , SE = 10 , TN = 11 , TS = 12 , TW = 13 , TE = 14 , BN = 15 , BS = 16 , BW = 17 , BE = 18 , TNE = 19 , TNW = 20 , TSE = 21 , TSW = 22 , BNE = 23 , BNW = 24 , BSE = 25 , BSW = 26 , INVALID_DIR = 27 } |
enum | BinaryDirection { Bin_C = 1<<0 , Bin_N = 1<<1 , Bin_S = 1<<2 , Bin_W = 1<<3 , Bin_E = 1<<4 , Bin_T = 1<<5 , Bin_B = 1<<6 , Bin_NW = 1<<7 , Bin_NE = 1<<8 , Bin_SW = 1<<9 , Bin_SE = 1<<10 , Bin_TN = 1<<11 , Bin_TS = 1<<12 , Bin_TW = 1<<13 , Bin_TE = 1<<14 , Bin_BN = 1<<15 , Bin_BS = 1<<16 , Bin_BW = 1<<17 , Bin_BE = 1<<18 , Bin_TNE = 1<<19 , Bin_TNW = 1<<20 , Bin_TSE = 1<<21 , Bin_TSW = 1<<22 , Bin_BNE = 1<<23 , Bin_BNW = 1<<24 , Bin_BSE = 1<<25 , Bin_BSW = 1<<26 } |
Functions | |
template<typename U > | |
Direction | getQuadrant (const math::GenericAABB< U > &aabb, const typename math::GenericAABB< U >::vector_type &p) |
Determine sin which neighboring section of an AABB a point lies. | |
Direction | vectorToDirection (cell_idx_t x, cell_idx_t y, cell_idx_t z) |
Maps a (x,y,z) direction vector to its direction. | |
Direction | vectorToDirection (Vector3< cell_idx_t > vec) |
bool | isFaceDirection (Direction dir) |
bool | isEdgeDirection (Direction dir) |
bool | isCornerDirection (Direction dir) |
Direction | directionFromAxis (int axis, bool minOrMax) |
Maps (direction,axis) pair to direction. | |
Direction | directionFromAxis (uint_t axis, bool minOrMax) |
Maps (direction,axis) pair to direction. | |
Cell | operator+ (const Cell &cell, const Direction d) |
Computes neighbor from cell in direction d. | |
Cell | operator- (const Cell &cell, const Direction d) |
Computes neighbor from cell in direction inverseDir[d]. | |
Cell & | operator+= (Cell &cell, const Direction d) |
Shifts cell to its neighbor in direction d. | |
Cell & | operator-= (Cell &cell, const Direction d) |
Shifts cell to its neighbor in direction inverseDir[d]. | |
Variables | |
const uint_t | NR_OF_DIRECTIONS = 27 |
const std::array< int, NR_OF_DIRECTIONS > | cx |
The x component for each direction. | |
const std::array< int, NR_OF_DIRECTIONS > | cy |
The y component for each direction. | |
const std::array< int, NR_OF_DIRECTIONS > | cz |
The z component for each direction. | |
const std::array< std::array< int, NR_OF_DIRECTIONS >, 3 > | c |
The x,y,z component for each direction. | |
const std::array< std::array< real_t, NR_OF_DIRECTIONS >, 3 > | cNorm |
The x,y,z component for each normalized direction. | |
const std::array< std::string, NR_OF_DIRECTIONS > | dirToString |
String representation for each direction. | |
const std::array< BinaryDirection, NR_OF_DIRECTIONS > | dirToBinary |
Binary encoded direction for each direction. | |
const std::array< Direction, NR_OF_DIRECTIONS > | inverseDir |
Inverse directions. | |
const std::array< real_t, NR_OF_DIRECTIONS > | dirLength |
Length for each direction. | |
const std::array< real_t, NR_OF_DIRECTIONS > | gaussianWeights |
const std::array< uint_t, NR_OF_DIRECTIONS > | gaussianMultipliers |
const std::array< Direction, NR_OF_DIRECTIONS > | mirrorX |
The mirrored directions (flip W-E) | |
const std::array< Direction, NR_OF_DIRECTIONS > | mirrorY |
The mirrored directions (flip N-S) | |
const std::array< Direction, NR_OF_DIRECTIONS > | mirrorZ |
The mirrored directions (flip T-B) | |
const std::array< std::array< Direction, NR_OF_DIRECTIONS >, 3 > | map2Dto3D |
Maps from 2D directions (C, N, S, W, E, NW, NE, SW, SE) to 3D directions, by slicing through x,y or z coordinate The first array index represents the slice dimension ( 0 for x, 1 for y, 2 for z) Example: printing a slice through x coordinate (keeping x fixed) of a D3Q19 field: | |
using walberla::stencil::$name = internal::$name<> |
|
inline |
Maps (direction,axis) pair to direction.
axis | 0,1 or 2 standing for x,y,z |
minOrMax | if true, the direction pointing in the negative axis direction is returned, if false, the positive axis direction |
Maps (direction,axis) pair to direction.
axis | 0,1 or 2 standing for x,y,z |
minOrMax | if true, the direction pointing in the negative axis direction is returned, if false, the positive axis direction |
Direction walberla::stencil::getQuadrant | ( | const math::GenericAABB< U > & | aabb, |
const typename math::GenericAABB< U >::vector_type & | p ) |
Determine sin which neighboring section of an AABB a point lies.
If p lies within aabb returns C. Other it is determined in which of the 26 imaginary neighboring AABBs p is located. The direction of the from aabb to the determined neighboring aabb is returned
2D Example:
----------------------— Let aabb be the AABB marked with asterisks. The boxes surrounding aabb are the eight (in 2D) imaginary | | | | neighboring boxes. Let p be marked with x. The result of the function would be NE. | | | x |
| | | | -----—*********-----— | * * | | * * | | * * | -----—*********-----—
T | The scalar data type used for the AABB and the tested point |
aabb | The AABB |
p | The tested point |
|
inline |
|
inline |
|
inline |
Computes neighbor from cell in direction d.
cell | origin cell |
d | direction pointing towards the computed neighbor |
Shifts cell to its neighbor in direction d.
cell | shifted cell |
d | direction in which to shift the cell |
Computes neighbor from cell in direction inverseDir[d].
cell | origin cell |
d | direction pointing away from the computed neighbor |
Shifts cell to its neighbor in direction inverseDir[d].
cell | shifted cell |
d | direction opposite to which the cell gets shifted |
|
inline |
Maps a (x,y,z) direction vector to its direction.
|
inline |
const std::array< std::array< int, NR_OF_DIRECTIONS >, 3 > walberla::stencil::c |
The x,y,z component for each direction.
const std::array< std::array< real_t, NR_OF_DIRECTIONS >, 3 > walberla::stencil::cNorm |
The x,y,z component for each normalized direction.
const std::array< int, NR_OF_DIRECTIONS > walberla::stencil::cx |
The x component for each direction.
const std::array< int, NR_OF_DIRECTIONS > walberla::stencil::cy |
The y component for each direction.
const std::array< int, NR_OF_DIRECTIONS > walberla::stencil::cz |
The z component for each direction.
const std::array< real_t, NR_OF_DIRECTIONS > walberla::stencil::dirLength |
Length for each direction.
const std::array< BinaryDirection, NR_OF_DIRECTIONS > walberla::stencil::dirToBinary |
Binary encoded direction for each direction.
const std::array< std::string, NR_OF_DIRECTIONS > walberla::stencil::dirToString |
String representation for each direction.
const std::array< uint_t, NR_OF_DIRECTIONS > walberla::stencil::gaussianMultipliers |
const std::array< real_t, NR_OF_DIRECTIONS > walberla::stencil::gaussianWeights |
const std::array< Direction, NR_OF_DIRECTIONS > walberla::stencil::inverseDir |
Inverse directions.
const std::array< std::array< Direction, NR_OF_DIRECTIONS >, 3 > walberla::stencil::map2Dto3D |
Maps from 2D directions (C, N, S, W, E, NW, NE, SW, SE) to 3D directions, by slicing through x,y or z coordinate The first array index represents the slice dimension ( 0 for x, 1 for y, 2 for z) Example: printing a slice through x coordinate (keeping x fixed) of a D3Q19 field:
const std::array< Direction, NR_OF_DIRECTIONS > walberla::stencil::mirrorX |
const std::array< Direction, NR_OF_DIRECTIONS > walberla::stencil::mirrorY |
const std::array< Direction, NR_OF_DIRECTIONS > walberla::stencil::mirrorZ |
const uint_t walberla::stencil::NR_OF_DIRECTIONS = 27 |