From 28d7380d40aa5959a398150fce825a91b342c5f0 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Mon, 11 Aug 2014 12:45:52 +0200 Subject: [PATCH 1/2] BUGFIX Wrong placement of parentes --- opm/core/simulator/EquilibrationHelpers.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From c323345d3ba5e51c5ae80bc78beaac86da49d628 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Tue, 12 Aug 2014 07:08:57 +0200 Subject: [PATCH 2/2] Changes in the ref. solution in the DeakAllDead test --- tests/test_equil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }