From 4d9a30807b543e2186363563bc36849a7a305e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Thu, 26 Feb 2015 13:34:02 +0100 Subject: [PATCH] Fix test_rateconverter failure. - Make test use three phases, not two. - Avoid interpolation failure by adding a line to PVDG. --- tests/fluid.data | 5 +++-- tests/test_rateconverter.cpp | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/fluid.data b/tests/fluid.data index 81f49299c..b018133b2 100644 --- a/tests/fluid.data +++ b/tests/fluid.data @@ -49,8 +49,9 @@ PVCDO / PVDG --- Pg Bg(Pg) mug - 1 1 1 +-- Pg Bg(Pg) mug + 1 1 1 + 800 0.99999999 1 / SWOF diff --git a/tests/test_rateconverter.cpp b/tests/test_rateconverter.cpp index 08edb2c73..5018106ac 100644 --- a/tests/test_rateconverter.cpp +++ b/tests/test_rateconverter.cpp @@ -94,7 +94,7 @@ BOOST_FIXTURE_TEST_CASE(Construction, TestFixture) } -BOOST_FIXTURE_TEST_CASE(TwoPhaseII, TestFixture) +BOOST_FIXTURE_TEST_CASE(ThreePhase, TestFixture) { // Immiscible and incompressible two-phase fluid typedef std::vector Region; @@ -106,11 +106,11 @@ BOOST_FIXTURE_TEST_CASE(TwoPhaseII, TestFixture) RCvrt cvrt(ad_props, reg); Opm::BlackoilState x; - x.init(*grid.c_grid(), 2); + x.init(*grid.c_grid(), 3); cvrt.defineState(x); - std::vector qs{1.0e3, 1.0e1}; + std::vector qs{1.0e3, 1.0e1, 1.0e-1}; std::vector coeff(qs.size(), 0.0); // Immiscible and incompressible: All coefficients are one (1), @@ -118,4 +118,5 @@ BOOST_FIXTURE_TEST_CASE(TwoPhaseII, TestFixture) cvrt.calcCoeff(qs, 0, coeff); BOOST_CHECK_CLOSE(coeff[0], 1.0, 1.0e-6); BOOST_CHECK_CLOSE(coeff[1], 1.0, 1.0e-6); + BOOST_CHECK_CLOSE(coeff[2], 1.0, 1.0e-6); }