Communication scheme for buffered communication in uniform block grids.
Most common use case: Synchronize a set of GhostLayerFields with the neighboring processes
This scheme sends one message per communication step and neighbor process. Therefore all contents that have to be sent, are packed into a buffer before. Multiple PackInfos can be registered to send their contents in a single step. Another option is to omit the buffering step and send multiple messages. This strategy is implemented in blockforest::communication::UniformDirectScheme
When running multiple Schemes concurrently different MPI tags have to be used for the schemes: the tag can be passed in the constructor.
#include <UniformBufferedScheme.h>
Public Types | |
using | Stencil = Stencil_T |
using | SendBuffer = mpi::SendBuffer |
using | RecvBuffer = mpi::RecvBuffer |
using | PackInfo = shared_ptr< walberla::communication::UniformPackInfo > |
using | VoidFunction = std::function< void()> |
using | SendBufferFunction = std::function< void(SendBuffer &)> |
using | CommunicationItemInfo = walberla::communication::UniformPackInfo |
Public Member Functions | |
Construction & Destruction | |
UniformBufferedScheme (weak_ptr< StructuredBlockForest > bf, const int tag=778) | |
UniformBufferedScheme (weak_ptr< StructuredBlockForest > bf, const Set< SUID > &requiredBlockSelectors, const Set< SUID > &incompatibleBlockSelectors, const int tag=778) | |
~UniformBufferedScheme () | |
Pack Info Registration | |
void | addPackInfo (const PackInfo &packInfo) |
void | addDataToCommunicate (const PackInfo &packInfo) |
Synchronous Communication | |
void | operator() () |
void | communicate () |
LocalCommunicationMode | localMode () const |
void | setLocalMode (const LocalCommunicationMode &mode) |
using walberla::blockforest::communication::UniformBufferedScheme< Stencil_T >::CommunicationItemInfo = walberla::communication::UniformPackInfo |
using walberla::blockforest::communication::UniformBufferedScheme< Stencil_T >::PackInfo = shared_ptr<walberla::communication::UniformPackInfo> |
using walberla::blockforest::communication::UniformBufferedScheme< Stencil_T >::RecvBuffer = mpi::RecvBuffer |
using walberla::blockforest::communication::UniformBufferedScheme< Stencil_T >::SendBuffer = mpi::SendBuffer |
using walberla::blockforest::communication::UniformBufferedScheme< Stencil_T >::SendBufferFunction = std::function<void (SendBuffer &)> |
using walberla::blockforest::communication::UniformBufferedScheme< Stencil_T >::Stencil = Stencil_T |
using walberla::blockforest::communication::UniformBufferedScheme< Stencil_T >::VoidFunction = std::function<void ()> |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
std::function< void()> walberla::blockforest::communication::UniformBufferedScheme< Stencil >::getCommunicateFunctor |
std::function< void()> walberla::blockforest::communication::UniformBufferedScheme< Stencil >::getStartCommunicateFunctor |
std::function< void()> walberla::blockforest::communication::UniformBufferedScheme< Stencil >::getWaitFunctor |
|
protected |
|
protected |
|
inline |
|
inline |
|
staticprotected |
|
protected |
|
staticprotected |
|
inline |
void walberla::blockforest::communication::UniformBufferedScheme< Stencil >::startCommunication |
void walberla::blockforest::communication::UniformBufferedScheme< Stencil >::wait |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |