template<typename
Stencil_T>
class walberla::blockforest::communication::UniformBufferedScheme< Stencil_T >
Communication scheme for buffered communication in uniform block grids.
Most common use case: Synchronize a set of GhostLayerFields with the neighboring processes
- when multiple fields have been changed they can be synchronized at once, using one MPI message per communication partner
scheme.
addPackInfo( make_shared<field::PackInfo<FieldType> >( idOfFirstField ) );
scheme.
addPackInfo( make_shared<field::PackInfo<FieldType> >( idOfSecondField ) );
scheme();
functionWhichDoesNotNeedCommunicatedValues();
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.
|
| weak_ptr< StructuredBlockForest > | blockForest_ |
| |
| uint_t | forestModificationStamp_ |
| |
| std::vector< PackInfo > | packInfos_ |
| |
| LocalCommunicationMode | localMode_ |
| |
| mpi::OpenMPBufferSystem | bufferSystem_ |
| |
| std::vector< VoidFunction > | localCommunication_ |
| |
| std::vector< VoidFunction > | threadsafeLocalCommunication_ |
| |
| std::vector< VoidFunction > | localCommunicationUnpack_ |
| |
| std::vector< VoidFunction > | threadsafeLocalCommunicationUnpack_ |
| |
| std::vector< SendBuffer > | localBuffers_ |
| |
| bool | setupBeforeNextCommunication_ |
| |
| bool | communicationInProgress_ |
| |
| Set< SUID > | requiredBlockSelectors_ |
| |
| Set< SUID > | incompatibleBlockSelectors_ |
| |
| void | startCommunication () |
| |
| void | wait () |
| |
| std::function< void()> | getCommunicateFunctor () |
| |
| std::function< void()> | getStartCommunicateFunctor () |
| |
| std::function< void()> | getWaitFunctor () |
| |
| static void | writeHeader (SendBuffer &buffer, const BlockID &id, const stencil::Direction &dir) |
| |
| static void | readHeader (RecvBuffer &buffer, BlockID &id, stencil::Direction &dir) |
| |
| static void | send (SendBuffer &buffer, const std::vector< SendBufferFunction > &functions) |
| |
| void | receive (RecvBuffer &buffer) |
| |
| void | localBufferPacking (const uint_t index, const PackInfo &packInfo, const Block *sender, const stencil::Direction &dir) |
| |
| void | localBufferUnpacking (const uint_t index, const PackInfo &packInfo, Block *receiver, const stencil::Direction &dir) |
| |