From f557343838a8f6ca28e264a5a467d2b20af1cead Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Mon, 22 May 2017 18:00:06 +0200 Subject: [PATCH] Correctly initialise the signal velocity of the SPH particles in the Minimal and Pressure-Entropy cases. --- src/hydro/Minimal/hydro.h | 2 +- src/hydro/PressureEntropy/hydro.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hydro/Minimal/hydro.h b/src/hydro/Minimal/hydro.h index fd05b768b2..8f216a550a 100644 --- a/src/hydro/Minimal/hydro.h +++ b/src/hydro/Minimal/hydro.h @@ -279,7 +279,7 @@ __attribute__((always_inline)) INLINE static void hydro_reset_acceleration( /* Reset the time derivatives. */ p->u_dt = 0.0f; p->force.h_dt = 0.0f; - p->force.v_sig = p->force.soundspeed; + p->force.v_sig = 0.0f; } /** diff --git a/src/hydro/PressureEntropy/hydro.h b/src/hydro/PressureEntropy/hydro.h index 90190b223a..4c4868cd37 100644 --- a/src/hydro/PressureEntropy/hydro.h +++ b/src/hydro/PressureEntropy/hydro.h @@ -308,7 +308,7 @@ __attribute__((always_inline)) INLINE static void hydro_reset_acceleration( p->force.h_dt = 0.0f; /* Reset maximal signal velocity */ - p->force.v_sig = p->force.soundspeed; + p->force.v_sig = 0.0f; } /** -- GitLab