DUNE PDELab (2.8)

Dune::PDELab::PolymorphicBufferWrapper< Buffer > Class Template Reference

Wrapper for message buffers of grid DataHandles that allows for sending different types of data. More...

#include <dune/pdelab/common/polymorphicbufferwrapper.hh>

Detailed Description

template<typename Buffer>
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:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 22, 23:30, 2024)