From 1be7f08b07ff83a0c44d278950db081c99e3d181 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Tue, 5 Feb 2019 22:48:17 +0000
Subject: [PATCH] Better choice of bracketing constant in the EAGLE cooling
 bisection code.

---
 examples/CoolingRates/README | 5 +++--
 src/cooling/EAGLE/cooling.c  | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/examples/CoolingRates/README b/examples/CoolingRates/README
index 429554ef0e..7ac84c0e0a 100644
--- a/examples/CoolingRates/README
+++ b/examples/CoolingRates/README
@@ -11,8 +11,9 @@ The test may be run by:
 python plot_cooling_rates.py
 
 where X is the redshift at which the cooling rates are evaluated and Y
-is the base 10 logarithm of the hydrogen number density. Different
-metallicities may be specified in testCooling.yml
+is the base 10 logarithm of the hydrogen number density expressed in
+cgs (i.e. cm^-3). Different metallicities may be specified in
+testCooling.yml
 
 Running with -z 3 -d -4 should reproduce the Fig.4 of Wiersma+09 with
 the added Compton cooling contribution.
diff --git a/src/cooling/EAGLE/cooling.c b/src/cooling/EAGLE/cooling.c
index 1180390d52..7bbe602de6 100644
--- a/src/cooling/EAGLE/cooling.c
+++ b/src/cooling/EAGLE/cooling.c
@@ -56,7 +56,7 @@ static const float explicit_tolerance = 0.05;
 static const float newton_tolerance = 1.0e-4;
 static const float bisection_tolerance = 1.0e-6;
 static const float rounding_tolerance = 1.0e-4;
-static const double bracket_factor = 1.0488088481701515; /* sqrt(1.1) */
+static const double bracket_factor = 1.5; /* sqrt(1.1) */
 static const double newton_log_u_guess_cgs = 12.30103;   /* log10(2e12) */
 
 /**
-- 
GitLab