walberla::field::communication Namespace Reference

Classes

class  PackInfo
 Data packing/unpacking for ghost layer based communication of a single walberla::field::Field. More...
 
class  ReducePackInfo
 Data packing/unpacking for reduce operations This class can be used, when multiple data sets from different senders should be reduced at the receiver. More...
 
class  StencilRestrictedMPIDatatypeInfo
 
class  StencilRestrictedPackInfo
 PackInfo that packs only the components that point to the neighbor. More...
 
class  UniformMPIDatatypeInfo
 
class  UniformPullReductionPackInfo
 Data packing/unpacking for ghost layer based communication of a single walberla::field::Field. More...
 

Functions

template<typename Field_T >
MPI_Datatype mpiDatatype (const Field_T &field)
 Creates a MPI datatype to communicate the contents of a whole Field. More...
 
template<typename Field_T >
MPI_Datatype mpiDatatypeSlice (const Field_T &field, const cell_idx_t xBeg, const cell_idx_t yBeg, const cell_idx_t zBeg, const cell_idx_t fBeg, const cell_idx_t xEnd, const cell_idx_t yEnd, const cell_idx_t zEnd, const cell_idx_t fEnd)
 Creates a MPI datatype to communicate an interval of cells of a Field. More...
 
template<typename Field_T >
MPI_Datatype mpiDatatypeSliceXYZ (const Field_T &field, const CellInterval &interval, cell_idx_t f=0)
 Creates a MPI datatype to communicate an interval of cells of a Field. More...
 
template<typename Field_T >
MPI_Datatype mpiDatatypeSliceXYZ (const Field_T &field, const CellInterval &interval, const cell_idx_t fBeg, const cell_idx_t fEnd)
 Creates a MPI datatype to communicate an interval of cells of a Field. More...
 
template<typename Field_T >
MPI_Datatype mpiDatatypeSliceXYZ (const Field_T &field, const CellInterval &interval, const std::set< cell_idx_t > &fs)
 Creates a MPI datatype to communicate an interval of cells of a Field. More...
 
template<typename GhostLayerField_T >
MPI_Datatype mpiDatatypeWithGhostLayer (const GhostLayerField_T &field)
 Creates a MPI datatype to communicate the contents of a whole GhostLayerField including its ghost layers. More...
 
template<typename GhostLayerField_T >
MPI_Datatype mpiDatatypeWithGhostLayer (const GhostLayerField_T &field, const uint_t numGhostLayers)
 Creates a MPI datatype to communicate the contents of a whole GhostLayerField including some of its ghost layers. More...
 
template<typename GhostLayerField_T >
MPI_Datatype mpiDatatypeGhostLayerOnly (const GhostLayerField_T &field, const stencil::Direction dir, const bool fullSlice=false)
 Creates a MPI datatype to communicate parts of the ghost layers of a GhostLayerField. More...
 
template<typename GhostLayerField_T >
MPI_Datatype mpiDatatypeGhostLayerOnly (const GhostLayerField_T &field, const uint_t thickness, const stencil::Direction dir, const bool fullSlice=false)
 Creates a MPI datatype to communicate parts of the ghost layers of a GhostLayerField. More...
 
template<typename GhostLayerField_T >
MPI_Datatype mpiDatatypeGhostLayerOnlyXYZ (const GhostLayerField_T &field, const stencil::Direction dir, const bool fullSlice=false, const cell_idx_t f=0)
 Creates a MPI datatype to communicate parts of the ghost layers of a GhostLayerField. More...
 
template<typename GhostLayerField_T >
MPI_Datatype mpiDatatypeGhostLayerOnlyXYZ (const GhostLayerField_T &field, const stencil::Direction dir, const bool fullSlice, const cell_idx_t fBeg, const cell_idx_t fEnd)
 Creates a MPI datatype to communicate parts of the ghost layers of a GhostLayerField. More...
 
template<typename GhostLayerField_T >
MPI_Datatype mpiDatatypeGhostLayerOnlyXYZ (const GhostLayerField_T &field, const stencil::Direction dir, const bool fullSlice, const std::set< cell_idx_t > &fs)
 Creates a MPI datatype to communicate parts of the ghost layers of a GhostLayerField. More...
 
template<typename GhostLayerField_T >
MPI_Datatype mpiDatatypeSliceBeforeGhostlayer (const GhostLayerField_T &field, const stencil::Direction dir, const uint_t thickness=1, const bool fullSlice=false)
 Creates a MPI datatype to communicate inner parts if a GhostLayerField near the ghost layers. More...
 
template<typename GhostLayerField_T >
MPI_Datatype mpiDatatypeSliceBeforeGhostlayerXYZ (const GhostLayerField_T &field, const stencil::Direction dir, const uint_t thickness=1, const cell_idx_t f=0, const bool fullSlice=false)
 Creates a MPI datatype to communicate inner parts if a GhostLayerField near the ghost layers. More...
 
template<typename GhostLayerField_T >
MPI_Datatype mpiDatatypeSliceBeforeGhostlayerXYZ (const GhostLayerField_T &field, const stencil::Direction dir, const uint_t thickness, const cell_idx_t fBeg, const cell_idx_t fEnd, const bool fullSlice)
 Creates a MPI datatype to communicate inner parts if a GhostLayerField near the ghost layers. More...
 
template<typename GhostLayerField_T >
MPI_Datatype mpiDatatypeSliceBeforeGhostlayerXYZ (const GhostLayerField_T &field, const stencil::Direction dir, const uint_t thickness, const std::set< cell_idx_t > &fs, const bool fullSlice)
 Creates a MPI datatype to communicate inner parts if a GhostLayerField near the ghost layers. More...
 

Function Documentation

◆ mpiDatatype()

template<typename Field_T >
MPI_Datatype walberla::field::communication::mpiDatatype ( const Field_T &  field)

Creates a MPI datatype to communicate the contents of a whole Field.

Only the inner cells of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe Field to be communicated
Returns
The MPI datatype

◆ mpiDatatypeGhostLayerOnly() [1/2]

template<typename GhostLayerField_T >
MPI_Datatype walberla::field::communication::mpiDatatypeGhostLayerOnly ( const GhostLayerField_T &  field,
const stencil::Direction  dir,
const bool  fullSlice = false 
)

Creates a MPI datatype to communicate parts of the ghost layers of a GhostLayerField.

All ghost layers in the specified direction of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe GhostLayerField to be communicated
dirAs described at GhostLayerField::getGhostRegion
fullSliceAs described at GhostLayerField::getGhostRegion
Returns
The MPI datatype

◆ mpiDatatypeGhostLayerOnly() [2/2]

template<typename GhostLayerField_T >
MPI_Datatype walberla::field::communication::mpiDatatypeGhostLayerOnly ( const GhostLayerField_T &  field,
const uint_t  thickness,
const stencil::Direction  dir,
const bool  fullSlice = false 
)

Creates a MPI datatype to communicate parts of the ghost layers of a GhostLayerField.

The specified ghost layers of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe GhostLayerField to be communicated
thicknessAs described at GhostLayerField::getGhostRegion
dirAs described at GhostLayerField::getGhostRegion
fullSliceAs described at GhostLayerField::getGhostRegion
Returns
The MPI datatype

◆ mpiDatatypeGhostLayerOnlyXYZ() [1/3]

template<typename GhostLayerField_T >
MPI_Datatype walberla::field::communication::mpiDatatypeGhostLayerOnlyXYZ ( const GhostLayerField_T &  field,
const stencil::Direction  dir,
const bool  fullSlice,
const cell_idx_t  fBeg,
const cell_idx_t  fEnd 
)

Creates a MPI datatype to communicate parts of the ghost layers of a GhostLayerField.

The specified ghost layers of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe GhostLayerField to be communicated
dirAs described at GhostLayerField::getGhostRegion
fullSliceAs described at GhostLayerField::getGhostRegion
fBegBeginning of the interval of communicated components
fEndEnd of the interval of communicated components (included in the interval)
Returns
The MPI datatype

◆ mpiDatatypeGhostLayerOnlyXYZ() [2/3]

template<typename GhostLayerField_T >
MPI_Datatype walberla::field::communication::mpiDatatypeGhostLayerOnlyXYZ ( const GhostLayerField_T &  field,
const stencil::Direction  dir,
const bool  fullSlice,
const std::set< cell_idx_t > &  fs 
)

Creates a MPI datatype to communicate parts of the ghost layers of a GhostLayerField.

The specified ghost layers of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe GhostLayerField to be communicated
dirAs described at GhostLayerField::getGhostRegion
fullSliceAs described at GhostLayerField::getGhostRegion
fsCommunicated components
Returns
The MPI datatype

◆ mpiDatatypeGhostLayerOnlyXYZ() [3/3]

template<typename GhostLayerField_T >
MPI_Datatype walberla::field::communication::mpiDatatypeGhostLayerOnlyXYZ ( const GhostLayerField_T &  field,
const stencil::Direction  dir,
const bool  fullSlice = false,
const cell_idx_t  f = 0 
)

Creates a MPI datatype to communicate parts of the ghost layers of a GhostLayerField.

The specified ghost layers of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe GhostLayerField to be communicated
dirAs described at GhostLayerField::getGhostRegion
fullSliceAs described at GhostLayerField::getGhostRegion
fComponent which is communicated
Returns
The MPI datatype

◆ mpiDatatypeSlice()

template<typename Field_T >
MPI_Datatype walberla::field::communication::mpiDatatypeSlice ( const Field_T &  field,
const cell_idx_t  xBeg,
const cell_idx_t  yBeg,
const cell_idx_t  zBeg,
const cell_idx_t  fBeg,
const cell_idx_t  xEnd,
const cell_idx_t  yEnd,
const cell_idx_t  zEnd,
const cell_idx_t  fEnd 
)

Creates a MPI datatype to communicate an interval of cells of a Field.

Only the cells in the described interval of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe Field to be communicated
xBegBeginning of the interval in x direction
yBegBeginning of the interval in y direction
zBegBeginning of the interval in z direction
fBegBeginning of the interval in f direction
xEndEnd of the interval in x direction (included in the interval)
yEndEnd of the interval in y direction (included in the interval)
zEndEnd of the interval in z direction (included in the interval)
fEndEnd of the interval in f direction (included in the interval)
Returns
The MPI datatype

◆ mpiDatatypeSliceBeforeGhostlayer()

template<typename GhostLayerField_T >
MPI_Datatype walberla::field::communication::mpiDatatypeSliceBeforeGhostlayer ( const GhostLayerField_T &  field,
const stencil::Direction  dir,
const uint_t  thickness = 1,
const bool  fullSlice = false 
)

Creates a MPI datatype to communicate inner parts if a GhostLayerField near the ghost layers.

The specified inner layers of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe GhostLayerField to be communicated
dirAs described at GhostLayerField::getSliceBeforeGhostLayer
thicknessAs described at GhostLayerField::getSliceBeforeGhostLayer
fullSliceAs described at GhostLayerField::getSliceBeforeGhostLayer
Returns
The MPI datatype

◆ mpiDatatypeSliceBeforeGhostlayerXYZ() [1/3]

template<typename GhostLayerField_T >
MPI_Datatype walberla::field::communication::mpiDatatypeSliceBeforeGhostlayerXYZ ( const GhostLayerField_T &  field,
const stencil::Direction  dir,
const uint_t  thickness,
const cell_idx_t  fBeg,
const cell_idx_t  fEnd,
const bool  fullSlice 
)

Creates a MPI datatype to communicate inner parts if a GhostLayerField near the ghost layers.

The specified inner layers of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe GhostLayerField to be communicated
dirAs described at GhostLayerField::getSliceBeforeGhostLayer
thicknessAs described at GhostLayerField::getSliceBeforeGhostLayer
fullSliceAs described at GhostLayerField::getSliceBeforeGhostLayer
fBegBeginning of the interval of communicated components
fEndEnd of the interval of communicated components (included in the interval)
Returns
The MPI datatype

◆ mpiDatatypeSliceBeforeGhostlayerXYZ() [2/3]

template<typename GhostLayerField_T >
MPI_Datatype walberla::field::communication::mpiDatatypeSliceBeforeGhostlayerXYZ ( const GhostLayerField_T &  field,
const stencil::Direction  dir,
const uint_t  thickness,
const std::set< cell_idx_t > &  fs,
const bool  fullSlice 
)

Creates a MPI datatype to communicate inner parts if a GhostLayerField near the ghost layers.

The specified inner layers of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe GhostLayerField to be communicated
dirAs described at GhostLayerField::getSliceBeforeGhostLayer
thicknessAs described at GhostLayerField::getSliceBeforeGhostLayer
fullSliceAs described at GhostLayerField::getSliceBeforeGhostLayer
fsCommunicated components
Returns
The MPI datatype

◆ mpiDatatypeSliceBeforeGhostlayerXYZ() [3/3]

template<typename GhostLayerField_T >
MPI_Datatype walberla::field::communication::mpiDatatypeSliceBeforeGhostlayerXYZ ( const GhostLayerField_T &  field,
const stencil::Direction  dir,
const uint_t  thickness = 1,
const cell_idx_t  f = 0,
const bool  fullSlice = false 
)

Creates a MPI datatype to communicate inner parts if a GhostLayerField near the ghost layers.

The specified inner layers of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe GhostLayerField to be communicated
dirAs described at GhostLayerField::getSliceBeforeGhostLayer
thicknessAs described at GhostLayerField::getSliceBeforeGhostLayer
fullSliceAs described at GhostLayerField::getSliceBeforeGhostLayer
fComponent which is communicated
Returns
The MPI datatype

◆ mpiDatatypeSliceXYZ() [1/3]

template<typename Field_T >
MPI_Datatype walberla::field::communication::mpiDatatypeSliceXYZ ( const Field_T &  field,
const CellInterval interval,
cell_idx_t  f = 0 
)

Creates a MPI datatype to communicate an interval of cells of a Field.

Only the cells in the described interval of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe Field to be communicated
intervalInterval of communicated cells
ff component that is communicated
Returns
The MPI datatype

◆ mpiDatatypeSliceXYZ() [2/3]

template<typename Field_T >
MPI_Datatype walberla::field::communication::mpiDatatypeSliceXYZ ( const Field_T &  field,
const CellInterval interval,
const cell_idx_t  fBeg,
const cell_idx_t  fEnd 
)

Creates a MPI datatype to communicate an interval of cells of a Field.

Only the cells in the described interval of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe Field to be communicated
intervalInterval of communicated cells
fBegBeginning of the interval in f direction
fEndEnd of the interval in f direction (included in the interval)
Returns
The MPI datatype

◆ mpiDatatypeSliceXYZ() [3/3]

template<typename Field_T >
MPI_Datatype walberla::field::communication::mpiDatatypeSliceXYZ ( const Field_T &  field,
const CellInterval interval,
const std::set< cell_idx_t > &  fs 
)

Creates a MPI datatype to communicate an interval of cells of a Field.

Only the cells in the described interval of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe Field to be communicated
intervalInterval of communicated cells
fsSet of f components to be communicated
Returns
The MPI datatype

◆ mpiDatatypeWithGhostLayer() [1/2]

template<typename GhostLayerField_T >
MPI_Datatype walberla::field::communication::mpiDatatypeWithGhostLayer ( const GhostLayerField_T &  field)

Creates a MPI datatype to communicate the contents of a whole GhostLayerField including its ghost layers.

All cells of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe GhostLayerField to be communicated
Returns
The MPI datatype

◆ mpiDatatypeWithGhostLayer() [2/2]

template<typename GhostLayerField_T >
MPI_Datatype walberla::field::communication::mpiDatatypeWithGhostLayer ( const GhostLayerField_T &  field,
const uint_t  numGhostLayers 
)

Creates a MPI datatype to communicate the contents of a whole GhostLayerField including some of its ghost layers.

All inner cells and the specified ghost layers of a Field are communicated, when the returned datatype is used in MPI communication.

The returned MPI_Datatype still has to be committed before used in communication and should be freed if it is not needed any longer.

Parameters
fieldThe GhostLayerField to be communicated
numGhostLayersThe number of ghost layers to be communicated (from inner to outer layers)
Returns
The MPI datatype