Packs data in cells given by a CellContainter ( CellInterval, CellVector..)
Template Parameters:
#include <CellGatherPackInfo.h>
Classes | |
struct | Compare |
Helper class for sorting the receivedData array according to t-value. More... | |
struct | Samples |
Public Member Functions | |
CellGatherPackInfo (const shared_ptr< StructuredBlockStorage > &bs, ConstBlockDataID fieldID, const CellContainer &containerOfGlobalCells, const shared_ptr< DataProcessor > &dp) | |
Constructor. More... | |
Public Member Functions inherited from walberla::gather::GatherPackInfo | |
virtual | ~GatherPackInfo ()=default |
Protected Attributes | |
Members for Receiving | |
| |
std::vector< std::vector< real_t > > | receivedData |
Two dimensional array of received data: the outer vector has one entry for every sample point the inner vector represents one sample point. More... | |
shared_ptr< DataProcessor > | dataProcessor_ |
Channel for output of gathered data. More... | |
Packing Interface | |
shared_ptr< StructuredBlockStorage > | blocks_ |
ConstBlockDataID | fieldID_ |
DataInterpolator acting as source, for the data that has to be packed. More... | |
std::map< const IBlock *, Samples > | localSamplePoints_ |
For every LOCAL block, where data has to be packed, a vector of local cell coordinates is stored. More... | |
void | packData (const IBlock *sender, mpi::SendBuffer &outBuffer) override |
Packs all data to be gathered into the given buffer. More... | |
void | unpackData (mpi::RecvBuffer &buffer) override |
Unpacks the data, packed by the packData() function. More... | |
void | gatherFinished () override |
Called after a timestep has finished, and unpackData was called for each sending block. More... | |
walberla::gather::CellGatherPackInfo< Field_T, CC >::CellGatherPackInfo | ( | const shared_ptr< StructuredBlockStorage > & | bs, |
ConstBlockDataID | fieldID, | ||
const CellContainer & | containerOfGlobalCells, | ||
const shared_ptr< DataProcessor > & | dp | ||
) |
Constructor.
This PackInfo packs data of a field in all cells that are provided by the CellContainer. The output to the DataProcessor contains in first column the cellNr in the container, then the field value(s) in the following columns.
Example: Collect Data along a line through the domain
bs | StructuredBlockStorage containing the field |
fieldID | BlockDataID of the field that should be collected |
containerOfGlobalCells | Container of cells in global coordinates, order of cells is important for output |
dp | data processor where gathered data is delivered to |
|
overridevirtual |
Called after a timestep has finished, and unpackData was called for each sending block.
Reimplemented from walberla::gather::GatherPackInfo.
|
overridevirtual |
Packs all data to be gathered into the given buffer.
Restrictions:
Implements walberla::gather::GatherPackInfo.
|
overridevirtual |
Unpacks the data, packed by the packData() function.
Implements walberla::gather::GatherPackInfo.
|
protected |
|
protected |
Channel for output of gathered data.
|
protected |
DataInterpolator acting as source, for the data that has to be packed.
|
protected |
For every LOCAL block, where data has to be packed, a vector of local cell coordinates is stored.
|
protected |
Two dimensional array of received data: the outer vector has one entry for every sample point the inner vector represents one sample point.