std::vector<typename std::multimap<internal::LevelInd,
Particle<dim, spacedim>>::iterator>
ghost_particles_iterators;
+
+ /**
+ * Vector of char that is used to organize the particle information to be
+ * sent to other processors
+ */
+ std::vector<char> send_data;
+
+ /**
+ * Vector of char that is used to organize the particle information to
+ * received from other processors
+ */
+ std::vector<char> recv_data;
};
} // namespace internal
n_recv_data[i] * individual_particle_data_size;
ghost_particles_cache.neighbors = neighbors;
+
+ ghost_particles_cache.send_data.resize(
+ ghost_particles_cache.send_pointers.back());
+ ghost_particles_cache.recv_data.resize(
+ ghost_particles_cache.recv_pointers.back());
}
while (reinterpret_cast<std::size_t>(recv_data_it) -
ExcMessage(
"This function is only implemented for parallel::TriangulationBase objects."));
- std::vector<char> send_data;
+ std::vector<char> &send_data = ghost_particles_cache.send_data;
// Fill data to send
if (send_pointers.back() > 0)
{
- // Allocate space for sending particle data
- send_data.resize(send_pointers.back());
void *data = static_cast<void *>(&send_data.front());
// Serialize the data sorted by receiving process
}
}
- // Set up the space for the received particle data
- std::vector<char> recv_data(recv_pointers.back());
+ std::vector<char> &recv_data = ghost_particles_cache.recv_data;
// Exchange the particle data between domains
{