walberla::blockforest::communication::NonUniformPackInfo Class Referenceabstract

#include <NonUniformPackInfo.h>

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

Construction & Destruction

std::map< const Block *, std::map< stencil::Direction, std::map< uint_t, size_t > > > bufferSize_
 
 NonUniformPackInfo ()=default
 
virtual ~NonUniformPackInfo ()=default
 
virtual bool constantDataExchange () const =0
 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 =0
 Must return false if calling unpackData and/or communicateLocal is not thread-safe. More...
 
void packDataEqualLevel (const Block *sender, stencil::Direction dir, mpi::SendBuffer &buffer) const
 Must be thread-safe! Calls packDataImpl. More...
 
virtual void unpackDataEqualLevel (Block *receiver, stencil::Direction dir, mpi::RecvBuffer &buffer)=0
 If NOT thread-safe, threadsafeReceiving must return false! More...
 
virtual void communicateLocalEqualLevel (const Block *sender, Block *receiver, stencil::Direction dir)=0
 If NOT thread-safe, threadsafeReceiving must return false! More...
 
void packDataCoarseToFine (const Block *coarseSender, const BlockID &fineReceiver, stencil::Direction dir, mpi::SendBuffer &buffer) const
 
virtual void unpackDataCoarseToFine (Block *fineReceiver, const BlockID &coarseSender, stencil::Direction dir, mpi::RecvBuffer &buffer)=0
 
virtual void communicateLocalCoarseToFine (const Block *coarseSender, Block *fineReceiver, stencil::Direction dir)=0
 
void packDataFineToCoarse (const Block *fineSender, const BlockID &coarseReceiver, stencil::Direction dir, mpi::SendBuffer &buffer) const
 
virtual void unpackDataFineToCoarse (Block *coarseReceiver, const BlockID &fineSender, stencil::Direction dir, mpi::RecvBuffer &buffer)=0
 
virtual void communicateLocalFineToCoarse (const Block *fineSender, Block *coarseReceiver, stencil::Direction dir)=0
 
void clearBufferSizeCheckMap ()
 
virtual void packDataEqualLevelImpl (const Block *sender, stencil::Direction dir, mpi::SendBuffer &buffer) const =0
 Must be thread-safe! More...
 
virtual void packDataCoarseToFineImpl (const Block *coarseSender, const BlockID &fineReceiver, stencil::Direction dir, mpi::SendBuffer &buffer) const =0
 
virtual void packDataFineToCoarseImpl (const Block *fineSender, const BlockID &coarseReceiver, stencil::Direction dir, mpi::SendBuffer &buffer) const =0
 

Constructor & Destructor Documentation

◆ NonUniformPackInfo()

walberla::blockforest::communication::NonUniformPackInfo::NonUniformPackInfo ( )
default

◆ ~NonUniformPackInfo()

virtual walberla::blockforest::communication::NonUniformPackInfo::~NonUniformPackInfo ( )
virtualdefault

Member Function Documentation

◆ clearBufferSizeCheckMap()

void walberla::blockforest::communication::NonUniformPackInfo::clearBufferSizeCheckMap ( )
inline

◆ communicateLocalCoarseToFine()

◆ communicateLocalEqualLevel()

◆ communicateLocalFineToCoarse()

◆ constantDataExchange()

virtual bool walberla::blockforest::communication::NonUniformPackInfo::constantDataExchange ( ) const
pure virtual

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.

Implemented in walberla::lbm_generated::NonuniformGeneratedPdfPackInfo< PdfField_T >, walberla::lbm::refinement::PdfFieldPackInfo< LatticeModel_T, BoundaryHandling_T >, walberla::field::refinement::PackInfo< Field_T, Stencil >, and walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter.

◆ packDataCoarseToFine()

void walberla::blockforest::communication::NonUniformPackInfo::packDataCoarseToFine ( const Block coarseSender,
const BlockID fineReceiver,
stencil::Direction  dir,
mpi::SendBuffer buffer 
) const
inline

◆ packDataCoarseToFineImpl()

◆ packDataEqualLevel()

void walberla::blockforest::communication::NonUniformPackInfo::packDataEqualLevel ( const Block sender,
stencil::Direction  dir,
mpi::SendBuffer buffer 
) const
inline

Must be thread-safe! Calls packDataImpl.

◆ packDataEqualLevelImpl()

◆ packDataFineToCoarse()

void walberla::blockforest::communication::NonUniformPackInfo::packDataFineToCoarse ( const Block fineSender,
const BlockID coarseReceiver,
stencil::Direction  dir,
mpi::SendBuffer buffer 
) const
inline

◆ packDataFineToCoarseImpl()

◆ threadsafeReceiving()

virtual bool walberla::blockforest::communication::NonUniformPackInfo::threadsafeReceiving ( ) const
pure virtual

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.

Implemented in walberla::lbm_generated::NonuniformGeneratedPdfPackInfo< PdfField_T >, walberla::lbm::refinement::PdfFieldPackInfo< LatticeModel_T, BoundaryHandling_T >, walberla::field::refinement::PackInfo< Field_T, Stencil >, and walberla::blockforest::communication::UniformToNonUniformPackInfoAdapter.

◆ unpackDataCoarseToFine()

◆ unpackDataEqualLevel()

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

◆ unpackDataFineToCoarse()

Member Data Documentation

◆ bufferSize_

std::map< const Block *, std::map< stencil::Direction, std::map< uint_t, size_t > > > walberla::blockforest::communication::NonUniformPackInfo::bufferSize_
mutableprotected

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