walberla::blockforest::communication::NonUniformBufferedScheme< Stencil > Class Template Reference

#include <NonUniformBufferedScheme.h>

Public Types

enum  INDEX { EQUAL_LEVEL = 0, COARSE_TO_FINE = 1, FINE_TO_COARSE = 2 }
 
using SendBuffer = mpi::SendBuffer
 
using RecvBuffer = mpi::RecvBuffer
 
using PackInfo = shared_ptr< blockforest::communication::NonUniformPackInfo >
 
using VoidFunction = std::function< void()>
 
using SendBufferFunction = std::function< void(SendBuffer &)>
 

Public Member Functions

Construction & Destruction
 NonUniformBufferedScheme (weak_ptr< StructuredBlockForest > bf, const int baseTag=778)
 
 NonUniformBufferedScheme (weak_ptr< StructuredBlockForest > bf, const Set< SUID > &requiredBlockSelectors, const Set< SUID > &incompatibleBlockSelectors, const int baseTag=778)
 
 ~NonUniformBufferedScheme ()
 
Pack Info Registration
void addPackInfo (const PackInfo &packInfo)
 
Synchronous Communication
void operator() ()
 
void communicateEqualLevel ()
 
void communicateCoarseToFine ()
 
void communicateFineToCoarse ()
 
void communicateEqualLevel (const uint_t level)
 
void communicateCoarseToFine (const uint_t fineLevel)
 
void communicateFineToCoarse (const uint_t fineLevel)
 
LocalCommunicationMode localMode () const
 
void setLocalMode (const LocalCommunicationMode &mode)
 

Asynchronous Communication

weak_ptr< StructuredBlockForestblockForest_
 
uint_t forestModificationStamp_
 
std::vector< PackInfopackInfos_
 
LocalCommunicationMode localMode_
 
int baseTag_
 
std::vector< std::vector< shared_ptr< mpi::OpenMPBufferSystem > > > bufferSystem_
 
std::vector< std::vector< std::vector< VoidFunction > > > localCommunication_
 
std::vector< std::vector< std::vector< VoidFunction > > > threadsafeLocalCommunication_
 
std::vector< std::vector< std::vector< VoidFunction > > > localCommunicationUnpack_
 
std::vector< std::vector< std::vector< VoidFunction > > > threadsafeLocalCommunicationUnpack_
 
std::vector< std::vector< std::vector< SendBuffer > > > localBuffers_
 
std::vector< std::vector< char > > setupBeforeNextCommunication_
 
std::vector< std::vector< bool > > communicationInProgress_
 
Set< SUID > requiredBlockSelectors_
 
Set< SUID > incompatibleBlockSelectors_
 
void startCommunication ()
 
std::function< void()> getStartCommunicateFunctor ()
 
void startCommunicateEqualLevel ()
 
void startCommunicateCoarseToFine ()
 
void startCommunicateFineToCoarse ()
 
void startCommunicateEqualLevel (const uint_t level)
 
void startCommunicateCoarseToFine (const uint_t fineLevel)
 
void startCommunicateFineToCoarse (const uint_t fineLevel)
 
void wait ()
 
std::function< void() > getWaitFunctor ()
 
void waitCommunicateEqualLevel ()
 
void waitCommunicateCoarseToFine ()
 
void waitCommunicateFineToCoarse ()
 
void waitCommunicateEqualLevel (const uint_t level)
 
void waitCommunicateCoarseToFine (const uint_t fineLevel)
 
void waitCommunicateFineToCoarse (const uint_t fineLevel)
 
void init ()
 
void refresh ()
 
void startCommunicationEqualLevel (const uint_t index, std::set< uint_t > &participatingLevels)
 
void startCommunicationCoarseToFine (const uint_t index, const uint_t coarsestLevel, const uint_t finestLevel)
 
void startCommunicationFineToCoarse (const uint_t index, const uint_t coarsestLevel, const uint_t finestLevel)
 
void resetBufferSystem (shared_ptr< mpi::OpenMPBufferSystem > &bufferSystem)
 
void start (const INDEX i, const uint_t j)
 
void wait (const INDEX i, const uint_t j)
 
void receive (RecvBuffer &buffer)
 
void localBufferPacking (const INDEX i, const uint_t j, const uint_t bufferIndex, const PackInfo &packInfo, const Block *sender, const Block *receiver, const stencil::Direction &dir)
 
void localBufferUnpacking (const INDEX i, const uint_t j, const uint_t bufferIndex, const PackInfo &packInfo, Block *receiver, const Block *sender, const stencil::Direction &dir)
 
bool isAnyCommunicationInProgress () const
 
static void writeHeader (SendBuffer &buffer, const BlockID &sender, const BlockID &receiver, const stencil::Direction &dir)
 
static void readHeader (RecvBuffer &buffer, BlockID &sender, BlockID &receiver, stencil::Direction &dir)
 
static void send (SendBuffer &buffer, std::vector< SendBufferFunction > &functions)
 

Member Typedef Documentation

◆ PackInfo

◆ RecvBuffer

◆ SendBuffer

◆ SendBufferFunction

template<typename Stencil >
using walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::SendBufferFunction = std::function<void (SendBuffer &)>

◆ VoidFunction

template<typename Stencil >
using walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::VoidFunction = std::function<void ()>

Member Enumeration Documentation

◆ INDEX

Enumerator
EQUAL_LEVEL 
COARSE_TO_FINE 
FINE_TO_COARSE 

Constructor & Destructor Documentation

◆ NonUniformBufferedScheme() [1/2]

template<typename Stencil >
walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::NonUniformBufferedScheme ( weak_ptr< StructuredBlockForest bf,
const int  baseTag = 778 
)
explicit

◆ NonUniformBufferedScheme() [2/2]

template<typename Stencil >
walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::NonUniformBufferedScheme ( weak_ptr< StructuredBlockForest bf,
const Set< SUID > &  requiredBlockSelectors,
const Set< SUID > &  incompatibleBlockSelectors,
const int  baseTag = 778 
)

◆ ~NonUniformBufferedScheme()

Member Function Documentation

◆ addPackInfo()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::addPackInfo ( const PackInfo packInfo)
inline

◆ communicateCoarseToFine() [1/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::communicateCoarseToFine
inline

◆ communicateCoarseToFine() [2/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::communicateCoarseToFine ( const uint_t  fineLevel)
inline

◆ communicateEqualLevel() [1/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::communicateEqualLevel
inline

◆ communicateEqualLevel() [2/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::communicateEqualLevel ( const uint_t  level)
inline

◆ communicateFineToCoarse() [1/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::communicateFineToCoarse
inline

◆ communicateFineToCoarse() [2/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::communicateFineToCoarse ( const uint_t  fineLevel)
inline

◆ getStartCommunicateFunctor()

template<typename Stencil >
std::function<void()> walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::getStartCommunicateFunctor ( )
inline

◆ getWaitFunctor()

template<typename Stencil >
std::function<void() > walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::getWaitFunctor ( )
inline

◆ init()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::init
protected

◆ isAnyCommunicationInProgress()

template<typename Stencil >
bool walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::isAnyCommunicationInProgress
protected

◆ localBufferPacking()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::localBufferPacking ( const INDEX  i,
const uint_t  j,
const uint_t  bufferIndex,
const PackInfo packInfo,
const Block sender,
const Block receiver,
const stencil::Direction dir 
)
protected

◆ localBufferUnpacking()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::localBufferUnpacking ( const INDEX  i,
const uint_t  j,
const uint_t  bufferIndex,
const PackInfo packInfo,
Block receiver,
const Block sender,
const stencil::Direction dir 
)
protected

◆ localMode()

template<typename Stencil >
LocalCommunicationMode walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::localMode ( ) const
inline

◆ operator()()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::operator() ( )
inline

◆ readHeader()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::readHeader ( RecvBuffer buffer,
BlockID sender,
BlockID receiver,
stencil::Direction dir 
)
staticprotected

◆ receive()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::receive ( RecvBuffer buffer)
protected

◆ refresh()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::refresh
protected

◆ resetBufferSystem()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::resetBufferSystem ( shared_ptr< mpi::OpenMPBufferSystem > &  bufferSystem)
protected

◆ send()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::send ( SendBuffer buffer,
std::vector< SendBufferFunction > &  functions 
)
staticprotected

◆ setLocalMode()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::setLocalMode ( const LocalCommunicationMode mode)
inline

◆ start()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::start ( const INDEX  i,
const uint_t  j 
)
protected

◆ startCommunicateCoarseToFine() [1/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::startCommunicateCoarseToFine
inline

◆ startCommunicateCoarseToFine() [2/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::startCommunicateCoarseToFine ( const uint_t  fineLevel)
inline

◆ startCommunicateEqualLevel() [1/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::startCommunicateEqualLevel
inline

◆ startCommunicateEqualLevel() [2/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::startCommunicateEqualLevel ( const uint_t  level)
inline

◆ startCommunicateFineToCoarse() [1/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::startCommunicateFineToCoarse
inline

◆ startCommunicateFineToCoarse() [2/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::startCommunicateFineToCoarse ( const uint_t  fineLevel)
inline

◆ startCommunication()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::startCommunication ( )
inline

◆ startCommunicationCoarseToFine()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::startCommunicationCoarseToFine ( const uint_t  index,
const uint_t  coarsestLevel,
const uint_t  finestLevel 
)
protected

◆ startCommunicationEqualLevel()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::startCommunicationEqualLevel ( const uint_t  index,
std::set< uint_t > &  participatingLevels 
)
protected

◆ startCommunicationFineToCoarse()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::startCommunicationFineToCoarse ( const uint_t  index,
const uint_t  coarsestLevel,
const uint_t  finestLevel 
)
protected

◆ wait() [1/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::wait ( )
inline

◆ wait() [2/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::wait ( const INDEX  i,
const uint_t  j 
)
protected

◆ waitCommunicateCoarseToFine() [1/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::waitCommunicateCoarseToFine
inline

◆ waitCommunicateCoarseToFine() [2/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::waitCommunicateCoarseToFine ( const uint_t  fineLevel)
inline

◆ waitCommunicateEqualLevel() [1/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::waitCommunicateEqualLevel
inline

◆ waitCommunicateEqualLevel() [2/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::waitCommunicateEqualLevel ( const uint_t  level)
inline

◆ waitCommunicateFineToCoarse() [1/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::waitCommunicateFineToCoarse
inline

◆ waitCommunicateFineToCoarse() [2/2]

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::waitCommunicateFineToCoarse ( const uint_t  fineLevel)
inline

◆ writeHeader()

template<typename Stencil >
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::writeHeader ( SendBuffer buffer,
const BlockID sender,
const BlockID receiver,
const stencil::Direction dir 
)
staticprotected

Member Data Documentation

◆ baseTag_

template<typename Stencil >
int walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::baseTag_
protected

◆ blockForest_

template<typename Stencil >
weak_ptr<StructuredBlockForest> walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::blockForest_
protected

◆ bufferSystem_

template<typename Stencil >
std::vector< std::vector< shared_ptr< mpi::OpenMPBufferSystem > > > walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::bufferSystem_
protected

◆ communicationInProgress_

template<typename Stencil >
std::vector< std::vector< bool > > walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::communicationInProgress_
protected

◆ forestModificationStamp_

template<typename Stencil >
uint_t walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::forestModificationStamp_
protected

◆ incompatibleBlockSelectors_

template<typename Stencil >
Set<SUID> walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::incompatibleBlockSelectors_
protected

◆ localBuffers_

template<typename Stencil >
std::vector< std::vector< std::vector< SendBuffer > > > walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::localBuffers_
protected

◆ localCommunication_

template<typename Stencil >
std::vector< std::vector< std::vector< VoidFunction > > > walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::localCommunication_
protected

◆ localCommunicationUnpack_

template<typename Stencil >
std::vector< std::vector< std::vector< VoidFunction > > > walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::localCommunicationUnpack_
protected

◆ localMode_

template<typename Stencil >
LocalCommunicationMode walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::localMode_
protected

◆ packInfos_

template<typename Stencil >
std::vector< PackInfo > walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::packInfos_
protected

◆ requiredBlockSelectors_

template<typename Stencil >
Set<SUID> walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::requiredBlockSelectors_
protected

◆ setupBeforeNextCommunication_

template<typename Stencil >
std::vector< std::vector< char > > walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::setupBeforeNextCommunication_
protected

◆ threadsafeLocalCommunication_

template<typename Stencil >
std::vector< std::vector< std::vector< VoidFunction > > > walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::threadsafeLocalCommunication_
protected

◆ threadsafeLocalCommunicationUnpack_

template<typename Stencil >
std::vector< std::vector< std::vector< VoidFunction > > > walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::threadsafeLocalCommunicationUnpack_
protected

The documentation for this class was generated from the following file: