diff --git a/opm/core/simulator/EquilibrationHelpers.hpp b/opm/core/simulator/EquilibrationHelpers.hpp index 9b062664..f7c76435 100644 --- a/opm/core/simulator/EquilibrationHelpers.hpp +++ b/opm/core/simulator/EquilibrationHelpers.hpp @@ -871,7 +871,7 @@ namespace Opm const PcEq f(props, phase, cell, 0); const double f0 = f(sminarr[phase]); const double f1 = f(smaxarr[phase]); - return std::abs(f0 - f1 < std::numeric_limits::epsilon()); + return std::abs(f0 - f1) < std::numeric_limits::epsilon(); } } // namespace Equil diff --git a/tests/test_equil.cpp b/tests/test_equil.cpp index febc4316..78b3d10d 100644 --- a/tests/test_equil.cpp +++ b/tests/test_equil.cpp @@ -350,8 +350,8 @@ BOOST_AUTO_TEST_CASE (DeckAllDead) // the true answer or something else. const double reltol = 1.0e-3; BOOST_CHECK_CLOSE(pressures[0][first] , 1.496329839e7 , reltol); - BOOST_CHECK_CLOSE(pressures[0][last ] , 1.50473245e7 , reltol); - BOOST_CHECK_CLOSE(pressures[1][last] , 1.50473245e7 , reltol); + BOOST_CHECK_CLOSE(pressures[0][last ] , 1.504526940e7 , reltol); + BOOST_CHECK_CLOSE(pressures[1][last] , 1.504526940e7 , reltol); }