DUNE PDELab (git)
Wrapper for message buffers of grid DataHandles that allows for sending different types of data. More...
#include <dune/pdelab/common/polymorphicbufferwrapper.hh>
Detailed Description
class Dune::PDELab::PolymorphicBufferWrapper< Buffer >
Wrapper for message buffers of grid DataHandles that allows for sending different types of data.
The standard message buffers passed to the callbacks of the grid DataHandles are templated on a specific data type and do not support writing data of other types.
This wrapper takes a MessageBuffer for char and allows you to write any kind of POD data into it. It works by simply interpreting the data as a byte stream and serializing / deserializing it. Be aware that this implementation may create problems on heterogeneous architectures with different byte orderings.
Moreover, the buffer can optionally take care of providing information about the MPI rank of the sender through the method senderRank() if the rank of the current process and transmit_rank = true are passed to the constructor of the buffer.
- Warning
- The underlying MessageBuffer must use char as its data type, otherwise you will probably get compile or runtime errors!
The documentation for this class was generated from the following file:
- dune/pdelab/common/polymorphicbufferwrapper.hh