|
dune-grid
2.2.0
|
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the Grid::communicate methods. Here the Barton-Nackman trick is used to interprete data handle objects as its interface. Therefore usable data handle classes need to be derived from this class. More...
#include <dune/grid/common/datahandleif.hh>
Public Types | |
| typedef DataTypeImp | DataType |
| data type of data to communicate | |
Public Member Functions | |
| bool | contains (int dim, int codim) const |
| returns true if data for given valid codim should be communicated | |
| bool | fixedsize (int dim, int codim) const |
| returns true if size of data per entity of given dim and codim is a constant | |
| template<class EntityType > | |
| size_t | size (const EntityType &e) const |
| how many objects of type DataType have to be sent for a given entity | |
| template<class MessageBufferImp , class EntityType > | |
| void | gather (MessageBufferImp &buff, const EntityType &e) const |
| pack data from user to message buffer | |
| template<class MessageBufferImp , class EntityType > | |
| void | scatter (MessageBufferImp &buff, const EntityType &e, size_t n) |
Protected Member Functions | |
| CommDataHandleIF () | |
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the Grid::communicate methods. Here the Barton-Nackman trick is used to interprete data handle objects as its interface. Therefore usable data handle classes need to be derived from this class.
| DataHandleImp | implementation of the users data handle |
| DataTypeImp | type of data that are going to be communicated which is exported as DataType (for example double) |
| typedef DataTypeImp Dune::CommDataHandleIF< DataHandleImp, DataTypeImp >::DataType |
data type of data to communicate
| Dune::CommDataHandleIF< DataHandleImp, DataTypeImp >::CommDataHandleIF | ( | ) | [inline, protected] |
| bool Dune::CommDataHandleIF< DataHandleImp, DataTypeImp >::contains | ( | int | dim, |
| int | codim | ||
| ) | const [inline] |
returns true if data for given valid codim should be communicated
| dim | valid dimension (i.e. the grids dimension) |
| codim | valid codimension of the entity set for which data should be communicated |
Reimplemented in Dune::GridPtr< GridType >::DataHandle, and Dune::GeoGrid::CommDataHandle< Grid, WrappedHandle >.
Referenced by Dune::CommDataHandleIF< DataHandle, double >::contains().
| bool Dune::CommDataHandleIF< DataHandleImp, DataTypeImp >::fixedsize | ( | int | dim, |
| int | codim | ||
| ) | const [inline] |
returns true if size of data per entity of given dim and codim is a constant
| dim | valid dimension (i.e. the grids dimension) |
| codim | valid codimension of the entity set for which data should be communicated |
Reimplemented in Dune::GridPtr< GridType >::DataHandle, and Dune::GeoGrid::CommDataHandle< Grid, WrappedHandle >.
Referenced by Dune::CommDataHandleIF< DataHandle, double >::fixedsize().
| void Dune::CommDataHandleIF< DataHandleImp, DataTypeImp >::gather | ( | MessageBufferImp & | buff, |
| const EntityType & | e | ||
| ) | const [inline] |
pack data from user to message buffer
| buff | message buffer provided by the grid |
| e | entity for which date should be packed to buffer |
Reimplemented in Dune::GridPtr< GridType >::DataHandle.
Referenced by Dune::CommDataHandleIF< DataHandle, double >::gather().
| void Dune::CommDataHandleIF< DataHandleImp, DataTypeImp >::scatter | ( | MessageBufferImp & | buff, |
| const EntityType & | e, | ||
| size_t | n | ||
| ) | [inline] |
unpack data from message buffer to user n is the number of objects sent by the sender
| buff | message buffer provided by the grid |
| e | entity for which date should be unpacked from buffer |
| n | number of data written to buffer for this entity before |
Reimplemented in Dune::GridPtr< GridType >::DataHandle.
Referenced by Dune::CommDataHandleIF< DataHandle, double >::scatter().
| size_t Dune::CommDataHandleIF< DataHandleImp, DataTypeImp >::size | ( | const EntityType & | e | ) | const [inline] |
how many objects of type DataType have to be sent for a given entity
| e | entity for which the size should be dertermined |
Reimplemented in Dune::GridPtr< GridType >::DataHandle.
Referenced by Dune::CommDataHandleIF< DataHandle, double >::size().
1.7.6.1