#include <NonuniformGeneratedPdfPackInfo.h>
Public Types | |
using | LatticeStorageSpecification_T = typename PdfField_T::LatticeStorageSpecification |
using | PackingKernels_T = typename LatticeStorageSpecification_T::PackKernels |
using | Stencil = typename LatticeStorageSpecification_T::Stencil |
using | CommunicationStencil = typename LatticeStorageSpecification_T::CommunicationStencil |
using | CommData_T = NonuniformCommData< LatticeStorageSpecification_T > |
Public Member Functions | |
NonuniformGeneratedPdfPackInfo (const BlockDataID pdfFieldID, const BlockDataID commDataID) | |
bool | constantDataExchange () const override |
Should return true if the amount of data that is packed for a given block in direction "dir" is guaranteed to remain constant over time. More... | |
bool | threadsafeReceiving () const override |
Must return false if calling unpackData and/or communicateLocal is not thread-safe. More... | |
void | unpackDataEqualLevel (Block *receiver, Direction dir, mpi::RecvBuffer &buffer) override |
Equal Level. More... | |
void | communicateLocalEqualLevel (const Block *sender, Block *receiver, stencil::Direction dir) override |
If NOT thread-safe, threadsafeReceiving must return false! More... | |
void | unpackDataCoarseToFine (Block *fineReceiver, const BlockID &coarseSender, stencil::Direction dir, mpi::RecvBuffer &buffer) override |
Coarse to Fine. More... | |
void | communicateLocalCoarseToFine (const Block *coarseSender, Block *fineReceiver, stencil::Direction dir) override |
void | prepareCoalescence (Block *coarseReceiver) |
Fine to Coarse. More... | |
void | unpackDataFineToCoarse (Block *coarseReceiver, const BlockID &fineSender, stencil::Direction dir, mpi::RecvBuffer &buffer) override |
void | communicateLocalFineToCoarse (const Block *fineSender, Block *coarseReceiver, stencil::Direction dir) override |
Public Member Functions inherited from walberla::blockforest::communication::NonUniformPackInfo | |
NonUniformPackInfo ()=default | |
virtual | ~NonUniformPackInfo ()=default |
void | packDataEqualLevel (const Block *sender, stencil::Direction dir, mpi::SendBuffer &buffer) const |
Must be thread-safe! Calls packDataImpl. More... | |
virtual void | unpackDataEqualLevel (Block *receiver, stencil::Direction dir, mpi::RecvBuffer &buffer)=0 |
If NOT thread-safe, threadsafeReceiving must return false! More... | |
void | packDataCoarseToFine (const Block *coarseSender, const BlockID &fineReceiver, stencil::Direction dir, mpi::SendBuffer &buffer) const |
void | packDataFineToCoarse (const Block *fineSender, const BlockID &coarseReceiver, stencil::Direction dir, mpi::SendBuffer &buffer) const |
void | clearBufferSizeCheckMap () |
Public Attributes | |
const BlockDataID | commDataID_ |
Protected Member Functions | |
void | packDataEqualLevelImpl (const Block *sender, stencil::Direction dir, mpi::SendBuffer &buffer) const override |
Must be thread-safe! More... | |
void | packDataCoarseToFineImpl (const Block *coarseSender, const BlockID &fineReceiver, stencil::Direction dir, mpi::SendBuffer &buffer) const override |
void | packDataFineToCoarseImpl (const Block *fineSender, const BlockID &coarseReceiver, stencil::Direction dir, mpi::SendBuffer &buffer) const override |
Protected Member Functions inherited from walberla::blockforest::communication::NonUniformPackInfo |
Private Member Functions | |
Vector3< cell_idx_t > | getNeighborShift (const BlockID &fineBlock, stencil::Direction dir) const |
Helper Functions As in PdfFieldPackInfo.h. More... | |
bool | areNeighborsInDirection (const Block *block, const BlockID &neighborID, const Vector3< cell_idx_t > dirVec) const |
Checks whether or not the block with ID neighborID is a neighbor of block in direction dir . More... | |
CellInterval | intervalHullInDirection (const CellInterval &ci, const Vector3< cell_idx_t > tangentialDir, cell_idx_t width) const |
Returns the part of a cell interval's hull of given width in direction dirVec. More... | |
bool | skipsThroughCoarseBlock (const Block *block, const Direction dir) const |
For edge or corner directions, checks if a coarser block is part of the respective edge or corner intersection. More... | |
void | getCoarseBlockCommIntervals (const BlockID &fineBlockID, const Direction dir, const PdfField_T *field, std::vector< std::pair< Direction, CellInterval > > &intervals) const |
For coarse-to-fine and fine-to-coarse communication, returns a list of pairs (Direction, CellInterval) mapping sub-directions of the communication direction to cell intervals on the coarse block interior whose data must be communicated as if communicating in those sub-directions. More... | |
void | getFineBlockCommIntervals (const BlockID &fineBlockID, const Direction dir, const PdfField_T *field, std::vector< std::pair< Direction, CellInterval > > &intervals) const |
For coarse-to-fine and fine-to-coarse communication, returns a list of pairs (Direction, CellInterval) mapping sub-directions of the communication direction to cell intervals on the fine block whose data must be communicated as if communicating in those sub-directions. More... | |
CellInterval | getCoarseBlockCoalescenceInterval (const Block *coarseBlock, const BlockID &fineBlockID, Direction dir, const PdfField_T *field) const |
Private Attributes | |
const BlockDataID | pdfFieldID_ |
internal::NonuniformPackingKernelsWrapper< PdfField_T, LatticeStorageSpecification_T::inplace > | kernels_ |
Additional Inherited Members | |
Protected Attributes inherited from walberla::blockforest::communication::NonUniformPackInfo | |
std::map< const Block *, std::map< stencil::Direction, std::map< uint_t, size_t > > > | bufferSize_ |
using walberla::lbm_generated::NonuniformGeneratedPdfPackInfo< PdfField_T >::CommData_T = NonuniformCommData< LatticeStorageSpecification_T > |
using walberla::lbm_generated::NonuniformGeneratedPdfPackInfo< PdfField_T >::CommunicationStencil = typename LatticeStorageSpecification_T::CommunicationStencil |
using walberla::lbm_generated::NonuniformGeneratedPdfPackInfo< PdfField_T >::LatticeStorageSpecification_T = typename PdfField_T::LatticeStorageSpecification |
using walberla::lbm_generated::NonuniformGeneratedPdfPackInfo< PdfField_T >::PackingKernels_T = typename LatticeStorageSpecification_T::PackKernels |
using walberla::lbm_generated::NonuniformGeneratedPdfPackInfo< PdfField_T >::Stencil = typename LatticeStorageSpecification_T::Stencil |
|
inline |
|
private |
Checks whether or not the block with ID neighborID
is a neighbor of block
in direction dir
.
|
overridevirtual |
|
overridevirtual |
If NOT thread-safe, threadsafeReceiving must return false!
Implements walberla::blockforest::communication::NonUniformPackInfo.
|
overridevirtual |
|
inlineoverridevirtual |
Should return true if the amount of data that is packed for a given block in direction "dir" is guaranteed to remain constant over time.
False otherwise. If you are not sure what to return, return false! Returning false is always save. Falsely return true will lead to errors! However, if the data can be guaranteed to remain constant over time, returning true enables performance optimizations during the communication.
Implements walberla::blockforest::communication::NonUniformPackInfo.
|
private |
|
inlineprivate |
For coarse-to-fine and fine-to-coarse communication, returns a list of pairs (Direction, CellInterval) mapping sub-directions of the communication direction to cell intervals on the coarse block interior whose data must be communicated as if communicating in those sub-directions.
fineBlockID | ID of the fine block |
dir | Direction from the coarse to the fine block |
field | Pointer to the PDF field on the coarse block |
intervals | Vector that will be filled with the computed intervals |
|
inlineprivate |
For coarse-to-fine and fine-to-coarse communication, returns a list of pairs (Direction, CellInterval) mapping sub-directions of the communication direction to cell intervals on the fine block whose data must be communicated as if communicating in those sub-directions.
fineBlockID | ID of the fine block |
dir | Direction from the fine to the coarse block |
field | Pointer to the PDF Field on the fine block |
intervals | Vector that will be filled with the computed intervals |
|
inlineprivate |
Helper Functions As in PdfFieldPackInfo.h.
|
inlineprivate |
Returns the part of a cell interval's hull of given width in direction dirVec.
ci | The original cell interval |
dirVec | Direction Vector |
width | Width of the hull |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
Must be thread-safe!
Implements walberla::blockforest::communication::NonUniformPackInfo.
|
overrideprotectedvirtual |
void walberla::lbm_generated::NonuniformGeneratedPdfPackInfo< PdfField_T >::prepareCoalescence | ( | Block * | coarseReceiver | ) |
Fine to Coarse.
|
inlineprivate |
For edge or corner directions, checks if a coarser block is part of the respective edge or corner intersection.
block | The local block |
dir | The direction to check |
true
if dir is an edge or corner direction skipping through a coarser block.
|
inlineoverridevirtual |
Must return false if calling unpackData and/or communicateLocal is not thread-safe.
True otherwise. If you are not sure what to return, return false! Returning false is always save. Falsely return true will most likely lead to errors! However, if both unpackData AND communicateLocal are thread-safe, returning true can lead to performance improvements.
Implements walberla::blockforest::communication::NonUniformPackInfo.
|
overridevirtual |
Coarse to Fine.
Implements walberla::blockforest::communication::NonUniformPackInfo.
|
override |
Equal Level.
|
overridevirtual |
const BlockDataID walberla::lbm_generated::NonuniformGeneratedPdfPackInfo< PdfField_T >::commDataID_ |
|
private |
|
private |