From 8bf0912c933ce0b4dea67b28edff903302a47ca0 Mon Sep 17 00:00:00 2001
From: Yannick Bahe <bahe@strw.leidenuniv.nl>
Date: Wed, 6 May 2020 22:13:07 +0200
Subject: [PATCH] Apply angular momentum correction the right way round in BH
 feedback

---
 src/black_holes/EAGLE/black_holes.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/black_holes/EAGLE/black_holes.h b/src/black_holes/EAGLE/black_holes.h
index 4d711e99cc..a731361211 100644
--- a/src/black_holes/EAGLE/black_holes.h
+++ b/src/black_holes/EAGLE/black_holes.h
@@ -479,7 +479,7 @@ __attribute__((always_inline)) INLINE static void black_holes_prepare_feedback(
         r_times_v_tang * r_times_v_tang * r_times_v_tang;
     const double viscous_time = 2. * M_PI * r_times_v_tang_3 /
                                 (1e-6 * alpha_visc * G * G * BH_mass * BH_mass);
-    const double f_visc = max(Bondi_time / viscous_time, 1.);
+    const double f_visc = min(Bondi_time / viscous_time, 1.);
 
     /* Limit the Bondi rate by the Bondi viscuous time ratio */
     Bondi_rate *= f_visc;
-- 
GitLab