From 73150fea4cfb57c9ecde8ae86478c50ed67ab122 Mon Sep 17 00:00:00 2001 From: Simeon Bird Date: Tue, 24 Dec 2024 16:20:08 -0800 Subject: [PATCH] Fix timefac test: difference was just relative vs absolute accuracy --- libgadget/tests/test_timefac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libgadget/tests/test_timefac.c b/libgadget/tests/test_timefac.c index 96533dbc..b1da8c5e 100644 --- a/libgadget/tests/test_timefac.c +++ b/libgadget/tests/test_timefac.c @@ -59,12 +59,12 @@ BOOST_AUTO_TEST_CASE(test_drift_factor) CP.Omega0 = 1.; /* Check default scaling: for total matter domination * we should have a drift factor like 1/sqrt(a)*/ - BOOST_TEST(get_exact_drift_factor(&CP, get_ti(0.8), get_ti(0.85)) == - 2/0.1*(1/sqrt(0.85) - 1/sqrt(0.8)), tt::tolerance(5e-5)); + BOOST_TEST(get_exact_drift_factor(&CP, get_ti(0.8), get_ti(0.85)) == - 2/0.1*(1/sqrt(0.85) - 1/sqrt(0.8)), tt::tolerance(6e-5)); /*Test the kick table*/ - BOOST_TEST(get_exact_gravkick_factor(&CP, get_ti(0.8), get_ti(0.85)) == 2/0.1*(sqrt(0.85) - sqrt(0.8)), tt::tolerance(5e-5)); + BOOST_TEST(get_exact_gravkick_factor(&CP, get_ti(0.8), get_ti(0.85)) == 2/0.1*(sqrt(0.85) - sqrt(0.8)), tt::tolerance(6e-5)); //Chosen so we get the same bin - BOOST_TEST(get_exact_drift_factor(&CP, get_ti(0.8), get_ti(0.8003)) == - 2/0.1*(1/sqrt(0.8003) - 1/sqrt(0.8)), tt::tolerance(5e-6)); + BOOST_TEST(get_exact_drift_factor(&CP, get_ti(0.8), get_ti(0.8003)) == - 2/0.1*(1/sqrt(0.8003) - 1/sqrt(0.8)), tt::tolerance(6e-6)); //Now choose a more realistic cosmology CP.Omega0 = 0.25; /*Check late and early times*/ @@ -73,7 +73,7 @@ BOOST_AUTO_TEST_CASE(test_drift_factor) /*Check boundary conditions*/ double logDtime = (log(AMAX)-log(AMIN))/(1<