From 566c6efc400115513468d5584bb4f90fc2694ff8 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Mon, 22 Aug 2016 16:00:02 +0100 Subject: [PATCH] Don't convert the energy before the pressure. --- src/hydro/Gizmo/hydro.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hydro/Gizmo/hydro.h b/src/hydro/Gizmo/hydro.h index fa46479f76..e24a44529d 100644 --- a/src/hydro/Gizmo/hydro.h +++ b/src/hydro/Gizmo/hydro.h @@ -260,10 +260,11 @@ __attribute__((always_inline)) INLINE static void hydro_convert_quantities( p->conserved.momentum[0] = m * p->primitives.v[0]; p->conserved.momentum[1] = m * p->primitives.v[1]; p->conserved.momentum[2] = m * p->primitives.v[2]; - p->conserved.energy *= m; p->primitives.P = hydro_gamma_minus_one * p->conserved.energy * p->primitives.rho; + + p->conserved.energy *= m; } /** -- GitLab