12 #include "libmesh/parallel_algebra.h" 13 #include "libmesh/parallel_sync.h" 22 const std::tuple<
unsigned int,
unsigned int, std::shared_ptr<
DenseVector<Real>>> &
object,
25 unsigned int total_size = 0;
31 total_size += std::get<2>(object)->size();
38 typename std::vector<Real>::const_iterator in)
40 unsigned int total_size = 0;
43 const unsigned int vector_size = *in++;
49 total_size += vector_size;
57 const std::tuple<
unsigned int,
unsigned int, std::shared_ptr<
DenseVector<Real>>> &
object,
58 std::back_insert_iterator<std::vector<Real>> data_out,
62 const auto & dense_vector = std::get<2>(object);
63 data_out = dense_vector->size();
66 data_out = std::get<0>(object);
67 data_out = std::get<1>(object);
70 const auto & vector = dense_vector->get_values();
71 for (std::size_t i = 0; i < dense_vector->size(); ++i)
76 std::tuple<unsigned int, unsigned int, std::shared_ptr<DenseVector<Real>>>
78 std::vector<Real>::const_iterator in,
void *)
81 const std::size_t data_size = *in++;
82 std::tuple<unsigned int, unsigned int, std::shared_ptr<DenseVector<Real>>> object;
85 std::get<0>(object) = *in++;
86 std::get<1>(object) = *in++;
89 auto & dense_vector = std::get<2>(object);
90 dense_vector = std::make_shared<DenseVector<Real>>(data_size);
91 auto & vector_values = dense_vector->get_values();
92 for (std::size_t i = 0; i < data_size; ++i)
93 vector_values[i] = *in++;
BufferType pack(const ValueType value)
Packs value into a value of type BufferType at a byte level, to be unpacked with the unpack() routine...
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
void unpack(const BufferType value_as_buffer_type, ValueType &value)
Unpacks value_as_buffer_type (which is packed with pack()) into value at a byte level.