walberla::gather::GatherPackInfo Class Referenceabstract

Detailed Description

Interface for packing & unpacking of data to be gathered.

Implement this interface, and register your object at MPIGatherScheme

#include <GatherPackInfo.h>

+ Inheritance diagram for walberla::gather::GatherPackInfo:

Public Member Functions

virtual ~GatherPackInfo ()=default
 
virtual void packData (const IBlock *sender, mpi::SendBuffer &outBuffer)=0
 Packs all data to be gathered into the given buffer. More...
 
virtual void unpackData (mpi::RecvBuffer &buffer)=0
 Unpacks the data, packed by the packData() function. More...
 
virtual void gatherFinished ()
 Called after a timestep has finished, and unpackData was called for each sending block. More...
 

Constructor & Destructor Documentation

◆ ~GatherPackInfo()

virtual walberla::gather::GatherPackInfo::~GatherPackInfo ( )
virtualdefault

Member Function Documentation

◆ gatherFinished()

virtual void walberla::gather::GatherPackInfo::gatherFinished ( )
inlinevirtual

Called after a timestep has finished, and unpackData was called for each sending block.

Reimplemented in walberla::gather::CurveGatherPackInfo< GhostLayerField_T, Interpolator >, and walberla::gather::CellGatherPackInfo< Field_T, CellContainer >.

◆ packData()

virtual void walberla::gather::GatherPackInfo::packData ( const IBlock sender,
mpi::SendBuffer outBuffer 
)
pure virtual

Packs all data to be gathered into the given buffer.

Restrictions:

  • The packed amount of data for a given block has to stay constant
  • The packed amount of data for a given block has to be constant for all timesteps (i.e. for all calls of this function)

Implemented in walberla::gather::CurveGatherPackInfo< GhostLayerField_T, Interpolator >, and walberla::gather::CellGatherPackInfo< Field_T, CellContainer >.

◆ unpackData()

virtual void walberla::gather::GatherPackInfo::unpackData ( mpi::RecvBuffer buffer)
pure virtual

Unpacks the data, packed by the packData() function.

  • function is called on gathering process multiple times per timestep, once for each block that packed a non-zero message. It has to read the same amount as packData() has written. Therefore is usually necessary that packData inserts a header describing how much data the block packed

Implemented in walberla::gather::CurveGatherPackInfo< GhostLayerField_T, Interpolator >, and walberla::gather::CellGatherPackInfo< Field_T, CellContainer >.


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