waLBerla 7.3
Loading...
Searching...
No Matches
walberla::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 (const weak_ptr< StructuredBlockForest > &bf, int baseTag=778)
 NonUniformBufferedScheme (const weak_ptr< StructuredBlockForest > &bf, const Set< SUID > &requiredBlockSelectors, const Set< SUID > &incompatibleBlockSelectors, int baseTag=778)
 ~NonUniformBufferedScheme ()
Pack Info Registration
void addPackInfo (const PackInfo &packInfo)
Synchronous Communication
void operator() ()
void communicate ()
void communicateEqualLevel ()
void communicateEqualLevel (uint_t level)
void communicateCoarseToFine ()
void communicateCoarseToFine (uint_t fineLevel)
void communicateFineToCoarse ()
void communicateFineToCoarse (uint_t fineLevel)
std::function< void()> communicateEqualLevelFunctor (const uint_t level)
std::function< void()> communicateCoarseToFineFunctor (const uint_t fineLevel)
std::function< void()> communicateFineToCoarseFunctor (const uint_t fineLevel)
LocalCommunicationMode localMode () const
void setLocalMode (const LocalCommunicationMode &mode)

Asynchronous Communication

weak_ptr< StructuredBlockForestblockForest_
uint_t forestModificationStamp_ {uint_c(0)}
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< SUIDrequiredBlockSelectors_
Set< SUIDincompatibleBlockSelectors_
void startCommunication ()
std::function< void()> getStartCommunicateFunctor ()
void startCommunicateEqualLevel ()
void startCommunicateEqualLevel (uint_t level)
void startCommunicateCoarseToFine ()
void startCommunicateCoarseToFine (uint_t fineLevel)
void startCommunicateFineToCoarse ()
void startCommunicateFineToCoarse (uint_t fineLevel)
void wait ()
std::function< void() > getWaitFunctor ()
void waitCommunicateEqualLevel ()
void waitCommunicateEqualLevel (uint_t level)
void waitCommunicateCoarseToFine ()
void waitCommunicateCoarseToFine (uint_t fineLevel)
void waitCommunicateFineToCoarse ()
void waitCommunicateFineToCoarse (uint_t fineLevel)
void wait (INDEX i, uint_t j)
void init ()
void refresh ()
void startCommunicationEqualLevel (uint_t index, std::set< uint_t > &participatingLevels)
void startCommunicationCoarseToFine (uint_t index, uint_t coarsestLevel, uint_t finestLevel)
void startCommunicationFineToCoarse (uint_t index, uint_t coarsestLevel, uint_t finestLevel)
void resetBufferSystem (shared_ptr< mpi::OpenMPBufferSystem > &bufferSystem)
void start (INDEX i, uint_t j)
void receive (RecvBuffer &buffer)
void localBufferPacking (INDEX i, uint_t j, uint_t bufferIndex, const PackInfo &packInfo, const Block *sender, const Block *receiver, const stencil::Direction &dir)
void localBufferUnpacking (INDEX i, uint_t j, 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, const std::vector< SendBufferFunction > &functions)

Member Typedef Documentation

◆ PackInfo

◆ RecvBuffer

template<typename Stencil>
using walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::RecvBuffer = mpi::RecvBuffer

◆ SendBuffer

template<typename Stencil>
using walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::SendBuffer = mpi::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 ( const weak_ptr< StructuredBlockForest > & bf,
int baseTag = 778 )
explicit

◆ NonUniformBufferedScheme() [2/2]

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

◆ ~NonUniformBufferedScheme()

Member Function Documentation

◆ addPackInfo()

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

◆ communicate()

template<typename Stencil>
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::communicate ( )
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 ( uint_t fineLevel)
inline

◆ communicateCoarseToFineFunctor()

template<typename Stencil>
std::function< void()> walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::communicateCoarseToFineFunctor ( 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 ( uint_t level)
inline

◆ communicateEqualLevelFunctor()

template<typename Stencil>
std::function< void()> walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::communicateEqualLevelFunctor ( 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 ( uint_t fineLevel)
inline

◆ communicateFineToCoarseFunctor()

template<typename Stencil>
std::function< void()> walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::communicateFineToCoarseFunctor ( 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 ( ) const
nodiscardprotected

◆ localBufferPacking()

template<typename Stencil>
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::localBufferPacking ( INDEX i,
uint_t j,
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 ( INDEX i,
uint_t j,
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
inlinenodiscard

◆ 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,
const 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 ( INDEX i,
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 ( 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 ( 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 ( 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 ( uint_t index,
uint_t coarsestLevel,
uint_t finestLevel )
protected

◆ startCommunicationEqualLevel()

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

◆ startCommunicationFineToCoarse()

template<typename Stencil>
void walberla::blockforest::communication::NonUniformBufferedScheme< Stencil >::startCommunicationFineToCoarse ( uint_t index,
uint_t coarsestLevel,
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 ( INDEX i,
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 ( 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 ( 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 ( 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_ {uint_c(0)}
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: