walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter Class Reference

Detailed Description

Adapter to use a UniformPackInfo in a NonUniformBufferedScheme.

No communication between coarse <-> fine blocks happens.

#include <UniformToNonUniformPackInfoAdapter.h>

+ Inheritance diagram for walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter:

Construction & Destruction

shared_ptr< walberla::communication::UniformPackInfouniformPackInfo_
 
 UniformToNonUniformPackInfoAdapter (const shared_ptr< walberla::communication::UniformPackInfo > &uniformPackInfo)
 
virtual ~UniformToNonUniformPackInfoAdapter ()
 
virtual bool constantDataExchange () const
 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. More...
 
virtual bool threadsafeReceiving () const
 Must return false if calling unpackData and/or communicateLocal is not thread-safe. More...
 
virtual void unpackDataEqualLevel (Block *receiver, stencil::Direction dir, mpi::RecvBuffer &buffer)
 If NOT thread-safe, threadsafeReceiving must return false! More...
 
virtual void communicateLocalEqualLevel (const Block *sender, Block *receiver, stencil::Direction dir)
 If NOT thread-safe, threadsafeReceiving must return false! More...
 
virtual void unpackDataCoarseToFine (Block *, const BlockID &, stencil::Direction, mpi::RecvBuffer &)
 
virtual void communicateLocalCoarseToFine (const Block *, Block *, stencil::Direction)
 
virtual void unpackDataFineToCoarse (Block *, const BlockID &, stencil::Direction, mpi::RecvBuffer &)
 
virtual void communicateLocalFineToCoarse (const Block *, Block *, stencil::Direction)
 
virtual void packDataEqualLevelImpl (const Block *sender, stencil::Direction dir, mpi::SendBuffer &buffer) const
 Must be thread-safe! More...
 
virtual void packDataCoarseToFineImpl (const Block *, const BlockID &, stencil::Direction, mpi::SendBuffer &) const
 
virtual void packDataFineToCoarseImpl (const Block *, const BlockID &, stencil::Direction, mpi::SendBuffer &) const
 

Additional Inherited Members

- Public Member Functions inherited from walberla::blockforest::communication::NonUniformPackInfo
 NonUniformPackInfo ()=default
 
virtual ~NonUniformPackInfo ()=default
 
void packDataEqualLevel (const Block *sender, stencil::Direction dir, mpi::SendBuffer &buffer) const
 Must be thread-safe! Calls packDataImpl. More...
 
void packDataCoarseToFine (const Block *coarseSender, const BlockID &fineReceiver, stencil::Direction dir, mpi::SendBuffer &buffer) const
 
void packDataFineToCoarse (const Block *fineSender, const BlockID &coarseReceiver, stencil::Direction dir, mpi::SendBuffer &buffer) const
 
void clearBufferSizeCheckMap ()
 
- Protected Member Functions inherited from walberla::blockforest::communication::NonUniformPackInfo
- Protected Attributes inherited from walberla::blockforest::communication::NonUniformPackInfo
std::map< const Block *, std::map< stencil::Direction, std::map< uint_t, size_t > > > bufferSize_
 

Constructor & Destructor Documentation

◆ UniformToNonUniformPackInfoAdapter()

walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::UniformToNonUniformPackInfoAdapter ( const shared_ptr< walberla::communication::UniformPackInfo > &  uniformPackInfo)
inline

◆ ~UniformToNonUniformPackInfoAdapter()

virtual walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::~UniformToNonUniformPackInfoAdapter ( )
inlinevirtual

Member Function Documentation

◆ communicateLocalCoarseToFine()

virtual void walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::communicateLocalCoarseToFine ( const Block ,
Block ,
stencil::Direction   
)
inlinevirtual

◆ communicateLocalEqualLevel()

virtual void walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::communicateLocalEqualLevel ( const Block sender,
Block receiver,
stencil::Direction  dir 
)
inlinevirtual

If NOT thread-safe, threadsafeReceiving must return false!

Implements walberla::blockforest::communication::NonUniformPackInfo.

◆ communicateLocalFineToCoarse()

virtual void walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::communicateLocalFineToCoarse ( const Block ,
Block ,
stencil::Direction   
)
inlinevirtual

◆ constantDataExchange()

virtual bool walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::constantDataExchange ( ) const
inlinevirtual

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.

False otherwise. If you are not sure what to return, return false! Returning false is always save. Falsely return true will lead to errors! However, if the data can be guaranteed to remain constant over time, returning true enables performance optimizations during the communication.

Implements walberla::blockforest::communication::NonUniformPackInfo.

◆ packDataCoarseToFineImpl()

virtual void walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::packDataCoarseToFineImpl ( const Block ,
const BlockID ,
stencil::Direction  ,
mpi::SendBuffer  
) const
inlineprotectedvirtual

◆ packDataEqualLevelImpl()

virtual void walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::packDataEqualLevelImpl ( const Block sender,
stencil::Direction  dir,
mpi::SendBuffer buffer 
) const
inlineprotectedvirtual

◆ packDataFineToCoarseImpl()

virtual void walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::packDataFineToCoarseImpl ( const Block ,
const BlockID ,
stencil::Direction  ,
mpi::SendBuffer  
) const
inlineprotectedvirtual

◆ threadsafeReceiving()

virtual bool walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::threadsafeReceiving ( ) const
inlinevirtual

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 save. Falsely return 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::blockforest::communication::NonUniformPackInfo.

◆ unpackDataCoarseToFine()

virtual void walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::unpackDataCoarseToFine ( Block ,
const BlockID ,
stencil::Direction  ,
mpi::RecvBuffer  
)
inlinevirtual

◆ unpackDataEqualLevel()

virtual void walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::unpackDataEqualLevel ( Block receiver,
stencil::Direction  dir,
mpi::RecvBuffer buffer 
)
inlinevirtual

If NOT thread-safe, threadsafeReceiving must return false!

Implements walberla::blockforest::communication::NonUniformPackInfo.

◆ unpackDataFineToCoarse()

virtual void walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::unpackDataFineToCoarse ( Block ,
const BlockID ,
stencil::Direction  ,
mpi::RecvBuffer  
)
inlinevirtual

Member Data Documentation

◆ uniformPackInfo_

shared_ptr<walberla::communication::UniformPackInfo> walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::uniformPackInfo_
protected

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