Loading [MathJax]/extensions/tex2jax.js

DUNE-GRID-GLUE (2.10)

Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp > Class Template Reference

describes the features of a data handle for communication in parallel runs using the GridGlue::communicate methods. More...

#include <dune/grid-glue/adapter/gridgluecommunicate.hh>

Public Types

typedef DataTypeImp DataType
 data type of data to communicate
 

Public Member Functions

template<class RISType >
size_t size (RISType &i) const
 
template<class MessageBufferImp , class EntityType , class RISType >
void gather (MessageBufferImp &buff, const EntityType &e, const RISType &i) const
 pack data from user to message buffer More...
 
template<class MessageBufferImp , class EntityType , class RISType >
void scatter (MessageBufferImp &buff, const EntityType &e, const RISType &i, size_t n)
 

Detailed Description

template<class DataHandleImp, class DataTypeImp>
class Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp >

describes the features of a data handle for communication in parallel runs using the GridGlue::communicate methods.

Here the Barton-Nackman trick is used to interpret data handle objects as its interface. Therefore usable data handle classes need to be derived from this class.

Template Parameters
DataHandleImpimplementation of the users data handle
DataTypeImptype of data that are going to be communicated which is exported as DataType (for example double)

Member Function Documentation

◆ gather()

template<class DataHandleImp , class DataTypeImp >
template<class MessageBufferImp , class EntityType , class RISType >
void Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp >::gather ( MessageBufferImp &  buff,
const EntityType &  e,
const RISType &  i 
) const
inline

pack data from user to message buffer

Parameters
buffmessage buffer provided by the grid
eentity for which date should be packed to buffer
iIntersection for which data should be packed to buffer

References Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp >::gather().

Referenced by Dune::GridGlue::GridGlue< P0, P1 >::communicate(), and Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp >::gather().

◆ scatter()

template<class DataHandleImp , class DataTypeImp >
template<class MessageBufferImp , class EntityType , class RISType >
void Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp >::scatter ( MessageBufferImp &  buff,
const EntityType &  e,
const RISType &  i,
size_t  n 
)
inline

unpack data from message buffer to user n is the number of objects sent by the sender

Parameters
buffmessage buffer provided by the grid
eentity for which date should be unpacked from buffer
iIntersection for which data is received
nnumber of data written to buffer for this entity before

References Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp >::scatter().

Referenced by Dune::GridGlue::GridGlue< P0, P1 >::communicate(), and Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp >::scatter().

◆ size()

template<class DataHandleImp , class DataTypeImp >
template<class RISType >
size_t Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp >::size ( RISType &  i) const
inline

how many objects of type DataType have to be sent for a given intersection Note: Both sender and receiver side need to know this size.

References Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp >::size().

Referenced by Dune::GridGlue::GridGlue< P0, P1 >::communicate(), and Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp >::size().


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Apr 16, 22:50, 2025)