walberla::lbm::D3Q27StorageSpecification::PackKernels Class Reference

#include <D3Q27StorageSpecification.h>

Public Types

using PdfField_T = field::GhostLayerField< double, 27 >
 
using value_type = typename PdfField_T::value_type
 

Public Member Functions

void packAll (PdfField_T *pdfs_src, CellInterval &ci, unsigned char *outBuffer) const
 Packs all pdfs from the given cell interval to the send buffer. More...
 
void unpackAll (PdfField_T *pdfs_dst, CellInterval &ci, unsigned char *inBuffer) const
 Unpacks all pdfs from the send buffer to the given cell interval. More...
 
void localCopyAll (PdfField_T *pdfs_src, CellInterval &srcInterval, PdfField_T *pdfs_dst, CellInterval &dstInterval) const
 Copies data between two blocks on the same process. More...
 
void packDirection (PdfField_T *pdfs_src, CellInterval &ci, unsigned char *outBuffer, stencil::Direction dir) const
 Packs only those populations streaming in directions aligned with the sending direction dir from the given cell interval. More...
 
void unpackDirection (PdfField_T *pdfs_dst, CellInterval &ci, unsigned char *inBuffer, stencil::Direction dir) const
 Unpacks only those populations streaming in directions aligned with the sending direction dir to the given cell interval. More...
 
void localCopyDirection (PdfField_T *pdfs_src, CellInterval &srcInterval, PdfField_T *pdfs_dst, CellInterval &dstInterval, stencil::Direction dir) const
 Copies data between two blocks on the same process. More...
 
uint_t size (CellInterval &ci, stencil::Direction dir) const
 Returns the number of bytes that will be packed from / unpacked to the cell interval when using packDirection / unpackDirection. More...
 
uint_t size (CellInterval &ci) const
 Returns the number of bytes that will be packed from / unpacked to the cell interval when using packAll / unpackAll. More...
 

Static Public Attributes

static const bool inplace = false
 

Private Attributes

const uint_t sizes [27] { 0, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1 }
 

Member Typedef Documentation

◆ PdfField_T

◆ value_type

Member Function Documentation

◆ localCopyAll()

void walberla::lbm::D3Q27StorageSpecification::PackKernels::localCopyAll ( PdfField_T pdfs_src,
CellInterval srcInterval,
PdfField_T pdfs_dst,
CellInterval dstInterval 
) const

Copies data between two blocks on the same process.

All pdfs from the sending interval are copied onto the receiving interval.

◆ localCopyDirection()

void walberla::lbm::D3Q27StorageSpecification::PackKernels::localCopyDirection ( PdfField_T pdfs_src,
CellInterval srcInterval,
PdfField_T pdfs_dst,
CellInterval dstInterval,
stencil::Direction  dir 
) const

Copies data between two blocks on the same process.

PDFs streaming aligned with the direction dir are copied from the sending interval onto the receiving interval.

◆ packAll()

void walberla::lbm::D3Q27StorageSpecification::PackKernels::packAll ( PdfField_T pdfs_src,
CellInterval ci,
unsigned char *  outBuffer 
) const

Packs all pdfs from the given cell interval to the send buffer.

◆ packDirection()

void walberla::lbm::D3Q27StorageSpecification::PackKernels::packDirection ( PdfField_T pdfs_src,
CellInterval ci,
unsigned char *  outBuffer,
stencil::Direction  dir 
) const

Packs only those populations streaming in directions aligned with the sending direction dir from the given cell interval.

For example, in 2D, if dir == N, the pdfs streaming in directions NW, N, NE are packed.

◆ size() [1/2]

uint_t walberla::lbm::D3Q27StorageSpecification::PackKernels::size ( CellInterval ci) const
inline

Returns the number of bytes that will be packed from / unpacked to the cell interval when using packAll / unpackAll.

Parameters
ciThe cell interval
Returns
The required size of the buffer, in bytes

◆ size() [2/2]

uint_t walberla::lbm::D3Q27StorageSpecification::PackKernels::size ( CellInterval ci,
stencil::Direction  dir 
) const
inline

Returns the number of bytes that will be packed from / unpacked to the cell interval when using packDirection / unpackDirection.

Parameters
ciThe cell interval
dirThe communication direction
Returns
The required size of the buffer, in bytes

◆ unpackAll()

void walberla::lbm::D3Q27StorageSpecification::PackKernels::unpackAll ( PdfField_T pdfs_dst,
CellInterval ci,
unsigned char *  inBuffer 
) const

Unpacks all pdfs from the send buffer to the given cell interval.

◆ unpackDirection()

void walberla::lbm::D3Q27StorageSpecification::PackKernels::unpackDirection ( PdfField_T pdfs_dst,
CellInterval ci,
unsigned char *  inBuffer,
stencil::Direction  dir 
) const

Unpacks only those populations streaming in directions aligned with the sending direction dir to the given cell interval.

For example, in 2D, if dir == N, the pdfs streaming in directions NW, N, NE are unpacked.

Member Data Documentation

◆ inplace

const bool walberla::lbm::D3Q27StorageSpecification::PackKernels::inplace = false
static

◆ sizes

const uint_t walberla::lbm::D3Q27StorageSpecification::PackKernels::sizes[27] { 0, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1 }
private

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