From: Wolfgang Bangerth Date: Fri, 29 Mar 2024 16:17:56 +0000 (-0600) Subject: Allocate the right amount of memory when serializing particles. X-Git-Tag: v9.6.0-rc1~428^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8922bba9d31c79b8a73e7b51ab8bba9f6010b01b;p=dealii.git Allocate the right amount of memory when serializing particles. --- diff --git a/source/particles/particle.cc b/source/particles/particle.cc index a1b055ae99..d6b837e86b 100644 --- a/source/particles/particle.cc +++ b/source/particles/particle.cc @@ -285,8 +285,9 @@ namespace Particles std::size_t Particle::serialized_size_in_bytes() const { - std::size_t size = sizeof(get_id()) + sizeof(get_location()) + - sizeof(get_reference_location()); + std::size_t size = sizeof(get_id()) + + sizeof(double) * spacedim + // get_location() + sizeof(double) * dim; // get_reference_location() if (has_properties()) {