operator<(const CellData &rhs) const;
/**
- * Pack the data of this object into a char[] buffer.
+ * Pack the data of this object into a buffer.
*/
- void
- pack_data(std::vector<char> &buffer) const;
+ std::vector<char>
+ pack_data() const;
/**
* Unpack the data of the given buffer into the members of this object.
template <int dim, int spacedim, class OutVector>
- void
- ExtrapolateImplementation<dim, spacedim, OutVector>::CellData::pack_data(
- std::vector<char> &buffer) const
+ std::vector<char>
+ ExtrapolateImplementation<dim, spacedim, OutVector>::CellData::pack_data()
+ const
{
// Compute how much memory we need to pack the data of this
// structure into a char[] buffer.
sizeof(unsigned int) + // tree_index
sizeof(
typename dealii::internal::p4est::types<dim>::quadrant)); // quadrant
-
- buffer.resize(bytes_for_buffer);
+ std::vector<char> buffer(bytes_for_buffer);
char *ptr = buffer.data();
ptr += sizeof(typename dealii::internal::p4est::types<dim>::quadrant);
Assert(ptr == buffer.data() + buffer.size(), ExcInternalError());
+
+ return buffer;
}
{
destinations.push_back(it->receiver);
- it->pack_data(*buffer);
+ *buffer = it->pack_data();
const int ierr = MPI_Isend(buffer->data(),
buffer->size(),
MPI_BYTE,