From 0266c33550b74ab1b761a6adbc0081b51d84d39b Mon Sep 17 00:00:00 2001
From: Jacob Kegerreis <jacob.kegerreis@durham.ac.uk>
Date: Sun, 7 Oct 2018 13:01:48 +0100
Subject: [PATCH] Add the defined viscosity beta to gizmo schemes too

---
 src/hydro/GizmoMFM/hydro_iact.h | 3 +--
 src/hydro/GizmoMFV/hydro_iact.h | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/hydro/GizmoMFM/hydro_iact.h b/src/hydro/GizmoMFM/hydro_iact.h
index 5bed20d7f8..2fc80ccb56 100644
--- a/src/hydro/GizmoMFM/hydro_iact.h
+++ b/src/hydro/GizmoMFM/hydro_iact.h
@@ -267,8 +267,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_fluxes_common(
   const float dvdotdx = min(dvdr, 0.0f);
 
   /* Get the signal velocity */
-  /* the magical factor 3 also appears in Gadget2 */
-  vmax -= 3.0f * dvdotdx * r_inv;
+  vmax -= 2.f * const_viscosity_beta_over_alpha * dvdotdx * r_inv;
 
   /* Store the signal velocity */
   pi->timestepvars.vmax = max(pi->timestepvars.vmax, vmax);
diff --git a/src/hydro/GizmoMFV/hydro_iact.h b/src/hydro/GizmoMFV/hydro_iact.h
index c766ce3cc9..cf5be8d4ec 100644
--- a/src/hydro/GizmoMFV/hydro_iact.h
+++ b/src/hydro/GizmoMFV/hydro_iact.h
@@ -271,8 +271,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_fluxes_common(
   dvdotdx = min(dvdotdx, 0.f);
 
   /* Get the signal velocity */
-  /* the magical factor 3 also appears in Gadget2 */
-  vmax -= 3.f * dvdotdx * r_inv;
+  vmax -= 2.f * const_viscosity_beta_over_alpha * dvdotdx * r_inv;
 
   /* Store the signal velocity */
   pi->timestepvars.vmax = max(pi->timestepvars.vmax, vmax);
-- 
GitLab