template<typename Derived_T, typename Field_T>
class walberla::boundary::ShiftedPeriodicityBase< Derived_T, Field_T >
A periodicity boundary condition that adds a user-defined spatial shift to the field when applied.
This shift can prevent the locking of large-scale turbulent features in the flow direction, see e.g., Munters et al. (https://doi.org/10.1063/1.4941912).
Periodicity defined in the blockforest must be turned off in the normal-direction. Only uniform grids are supported for the moment. Normal direction and shift direction must not coincide. Moreover, this boundary condition is only applied at the minimum and maximum of the domain in a given direction, but cannot be applied in the interior of the domain for now.
This base class handles the logistics of splitting the field and communication.
- Template Parameters
-
Field_T | Type of the ghost-layer field that is shifted periodically |
|
void | processDoubleAABB (const AABB &originalAABB, const std::shared_ptr< StructuredBlockForest > &sbf, const real_t nGL, const BlockID &blockID, const int normalShift) |
| Creates send and receive information (source, target rank, source / target blocks, source and destination CI (here in form of an AABB), and unique communication tag) per block if the shift does not coincide with the block size.
|
|
void | processSingleAABB (const AABB &originalAABB, const std::shared_ptr< StructuredBlockForest > &sbf, const real_t nGL, const BlockID &blockID, const int normalShift) |
| Does the same things as processDoubleAABB but assuming that the shift is a multiple of the block size, i.e., every field slice is shifted one or several entire blocks.
|
|
void | setupPeriodicity () |
| Determines which blocks are participating in the boundary condition / communication, and calls the appropriate functions to extract and save the communication information.
|
|
Vector3< cell_idx_t > | toCellVector (const Vector3< real_t > &point) |
|
CellInterval | globalAABBToLocalCI (const AABB &aabb, const std::shared_ptr< StructuredBlockForest > &sbf, IBlock *const block) |
|
template<typename tMap > |
second_t< typename tMap::value_type > | second (const tMap &) |
|
template<typename Derived_T , typename Field_T >
Creates send and receive information (source, target rank, source / target blocks, source and destination CI (here in form of an AABB), and unique communication tag) per block if the shift does not coincide with the block size.
If the shift does not coincide with the block size, each block is split into two send sub-blocks and two receive sub-blocks whose source / target block will differ (maybe also the rank). Afterwards, all the information necessary for the communication is determined and saved in the corresponding data structure.