From 8922bba9d31c79b8a73e7b51ab8bba9f6010b01b Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 29 Mar 2024 10:17:56 -0600 Subject: [PATCH] Allocate the right amount of memory when serializing particles. --- source/particles/particle.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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()) { -- 2.39.5