diff --git a/test/eos_unit_test_helpers.hpp b/test/eos_unit_test_helpers.hpp index e7f3681336..b23f5cf93e 100644 --- a/test/eos_unit_test_helpers.hpp +++ b/test/eos_unit_test_helpers.hpp @@ -23,9 +23,9 @@ #include #include +#include #include #include -#include // typename demangler #ifdef __GNUG__ @@ -69,14 +69,13 @@ template 0); - using underlying_t = typename std::remove_cv::type>::type; + using underlying_t = + typename std::remove_cv::type>::type; for (int i = 0; i < num; i++) { auto s = std::ostringstream{}; - s << std::setprecision(std::numeric_limits::max_digits10) - << std::scientific - << "i: " << i << ", " << xname << ": " << x[i] << ", " - << yname << ": " << y[i] << ", Value: " << z[i] - << ", True Value: " << ztrue[i]; + s << std::setprecision(std::numeric_limits::max_digits10) + << std::scientific << "i: " << i << ", " << xname << ": " << x[i] << ", " << yname + << ": " << y[i] << ", Value: " << z[i] << ", True Value: " << ztrue[i]; INFO(s.str()); CHECK(isClose(z[i], ztrue[i], 1e-12)); } diff --git a/test/test_eos_gruneisen.cpp b/test/test_eos_gruneisen.cpp index fcefd1fe3a..e0c0b9bbfc 100644 --- a/test/test_eos_gruneisen.cpp +++ b/test/test_eos_gruneisen.cpp @@ -479,7 +479,7 @@ SCENARIO("Gruneisen EOS density limit") { INFO("FillEos bmod: " << bmod << ", Lookup bmod: " << bmod_true); CHECK(bmod == bmod_true); INFO("FillEos pressure: " << P << ", Lookup pressure: " << pres_true); - CHECK(P == pres_true); + CHECK(isClose(P, pres_true, 1.e-14)); } } } diff --git a/test/test_eos_stellar_collapse.cpp b/test/test_eos_stellar_collapse.cpp index 859031d5b5..dc067f4358 100644 --- a/test/test_eos_stellar_collapse.cpp +++ b/test/test_eos_stellar_collapse.cpp @@ -44,7 +44,7 @@ SCENARIO("Test 3D reinterpolation to fast log grid", "[StellarCollapse]") { constexpr int N2 = 100; constexpr int N1 = 101; constexpr int N0 = 102; - StellarCollapse::Grid_t g2(0, 1, N2); + StellarCollapse::Grid_t g2(1.0/N2, 1, N2); StellarCollapse::Grid_t g1(1, 3, N1); StellarCollapse::Grid_t g0(2, 4, N0); StellarCollapse::DataBox db(N2, N1, N0); diff --git a/test/test_eos_stiff.cpp b/test/test_eos_stiff.cpp index 6871f0d406..0ab248a236 100644 --- a/test/test_eos_stiff.cpp +++ b/test/test_eos_stiff.cpp @@ -79,14 +79,14 @@ SCENARIO("StiffGas1", "[StiffGas][StiffGas1]") { // Gold standard values for a subset of lookups constexpr std::array pressure_true{ - 1.0132500000019073e+06, 3.4450500000000000e+07, 6.7887750000001907e+07, - 1.0132500000000000e+08}; + 1.01324999999964016e+06, 3.44504999999983162e+07, 6.78877500000010729e+07, + 1.01324999999999583e+08}; constexpr std::array bulkmodulus_true{ - 2.3502381137500000e+10, 2.3580958675000000e+10, 2.3659536212500004e+10, - 2.3738113750000004e+10}; + 2.35023811375000000e+10, 2.35809586749999962e+10, 2.36595362125000038e+10, + 2.37381137500000000e+10}; constexpr std::array temperature_true{ - 2.9814999999999998e+02, 1.5320999999999999e+03, 2.7660500000000002e+03, - 4.0000000000000000e+03}; + 2.98149999999999920e+02, 1.53209999999999968e+03, 2.76605000000000064e+03, + 3.99999999999999955e+03}; constexpr std::array gruneisen_true{1.35, 1.35, 1.35, 1.35}; #ifdef PORTABILITY_STRATEGY_KOKKOS