waLBerla 7.2
|
#include <BubbleIDFieldPackInfo.h>
Public Types | |
using | CommunicationStencil_T |
using | field_t = GhostLayerField< BubbleID, 1 > |
![]() | |
using | T |
Public Member Functions | |
BubbleIDFieldPackInfo (const BlockDataID &bdId, MergeInformation *mergeInfo) | |
bool | threadsafeReceiving () const override |
Must return false if calling unpackData and/or communicateLocal is not thread-safe. | |
void | unpackData (IBlock *receiver, stencil::Direction dir, mpi::RecvBuffer &buffer) override |
Unpack received Data. | |
void | communicateLocal (const IBlock *sender, IBlock *receiver, stencil::Direction dir) override |
Copy data from one local block to another local block. | |
![]() | |
PackInfo (const BlockDataID &bdId) | |
PackInfo (const BlockDataID &bdId, const uint_t numberOfGhostLayers) | |
~PackInfo () override=default | |
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. | |
bool | threadsafeReceiving () const override |
Must return false if calling unpackData and/or communicateLocal is not thread-safe. | |
void | unpackData (IBlock *receiver, stencil::Direction dir, mpi::RecvBuffer &buffer) override |
Unpack received Data. | |
void | communicateLocal (const IBlock *sender, IBlock *receiver, stencil::Direction dir) override |
Copy data from one local block to another local block. | |
![]() | |
UniformPackInfo ()=default | |
virtual | ~UniformPackInfo ()=default |
void | packData (const IBlock *sender, stencil::Direction dir, mpi::SendBuffer &buffer) const |
Pack data from a block into a send buffer. | |
virtual void | beforeStartCommunication () |
This function is called once before the communication is started by the UniformBufferedScheme. | |
virtual void | afterStartCommunication () |
This function is called once after the communication has been started by the UniformBufferedScheme. | |
virtual void | beforeWait () |
This function is called once before the UniformBufferedScheme waits for the communication to finish. | |
virtual void | afterWait () |
This function is called once after the communication has been finished by the UniformBufferedScheme. | |
Protected Member Functions | |
void | lookForMerges (const field_t::iterator &i, stencil::Direction dir, const field_t *field) |
![]() | |
void | packDataImpl (const IBlock *sender, stencil::Direction dir, mpi::SendBuffer &outBuffer) const override |
Pack data from a block into a send buffer. | |
uint_t | numberOfGhostLayersToCommunicate (const GhostLayerField< BubbleID, 1 > *const field) const |
![]() |
Protected Attributes | |
MergeInformation * | mergeInfo_ |
![]() | |
const BlockDataID | bdId_ |
bool | communicateAllGhostLayers_ |
uint_t | numberOfGhostLayers_ |
![]() | |
std::map< const IBlock *, std::map< stencil::Direction, size_t > > | bufferSize_ |
using walberla::free_surface::bubble_model::BubbleIDFieldPackInfo< Stencil_T >::CommunicationStencil_T |
using walberla::free_surface::bubble_model::BubbleIDFieldPackInfo< Stencil_T >::field_t = GhostLayerField< BubbleID, 1 > |
|
inline |
|
inlineoverridevirtual |
Copy data from one local block to another local block.
Both blocks are allocated on the current process. If NOT thread-safe, threadsafeReceiving must return false!
sender | id of block where the data should be copied from |
receiver | id of block where the data should be copied to |
dir | the direction of the communication ( from sender to receiver ) |
Implements walberla::communication::UniformPackInfo.
|
inlineprotected |
|
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 safe. Falsely returning 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::communication::UniformPackInfo.
|
inlineoverridevirtual |
Unpack received Data.
If NOT thread-safe, threadsafeReceiving must return false!
Implementations must reserve extra space and advance the send buffer pointer according to the alignment of the ghost layer data type! The buffer is char-aligned.
receiver | the block where the unpacked data should be stored into |
dir | receive data from neighbor in this direction |
buffer | buffer for reading the data from |
Implements walberla::communication::UniformPackInfo.
|
protected |