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:

Public Member Functions

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)
 
Construction & Destruction
 UniformToNonUniformPackInfoAdapter (const shared_ptr< walberla::communication::UniformPackInfo > &uniformPackInfo)
 
virtual ~UniformToNonUniformPackInfoAdapter ()
 
- Public Member Functions inherited from walberla::blockforest::communication::NonUniformPackInfo
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 ()
 
 NonUniformPackInfo ()
 
virtual ~NonUniformPackInfo ()
 

Protected Member Functions

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
 

Protected Attributes

shared_ptr< walberla::communication::UniformPackInfouniformPackInfo_
 
- 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

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

Member Function Documentation

virtual void walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::communicateLocalCoarseToFine ( const Block ,
Block ,
stencil::Direction   
)
inlinevirtual
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.

virtual void walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::communicateLocalFineToCoarse ( const Block ,
Block ,
stencil::Direction   
)
inlinevirtual
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.

virtual void walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::packDataCoarseToFineImpl ( const Block ,
const BlockID ,
stencil::Direction  ,
mpi::SendBuffer  
) const
inlineprotectedvirtual
virtual void walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::packDataEqualLevelImpl ( const Block sender,
stencil::Direction  dir,
mpi::SendBuffer buffer 
) const
inlineprotectedvirtual
virtual void walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::packDataFineToCoarseImpl ( const Block ,
const BlockID ,
stencil::Direction  ,
mpi::SendBuffer  
) const
inlineprotectedvirtual
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.

virtual void walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter::unpackDataCoarseToFine ( Block ,
const BlockID ,
stencil::Direction  ,
mpi::RecvBuffer  
)
inlinevirtual
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.

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

Member Data Documentation

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

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