From 7f5bc955dc2b5ff35a06eab4aeb4e4709ec27d34 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Mon, 17 Dec 2018 18:20:36 +0100 Subject: [PATCH] No need to skip 0-mass particles in the multipole construction. --- src/multipole.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/multipole.h b/src/multipole.h index 8139dc0548..e867dfd4e2 100644 --- a/src/multipole.h +++ b/src/multipole.h @@ -1049,13 +1049,6 @@ INLINE static void gravity_P2M(struct gravity_tensors *multi, vel[2] += gparts[k].v_full[2] * m; } -#ifdef PLANETARY_SPH - /* Prevent FPE from zero mass with the temporary outside-the-box particles */ - if (mass == 0.f) { - mass = FLT_MIN; - } -#endif // PLANETARY_SPH - /* Final operation on CoM */ const double imass = 1.0 / mass; com[0] *= imass; -- GitLab