From 2d534f0536c474677f5137a58c4cc3ddaaa248b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Mon, 23 Mar 2015 16:19:40 +0100 Subject: [PATCH] Fix property method calls. Cell argument can not be null for BlackoilPropertiesFromDeck class. --- opm/core/simulator/initState_impl.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/opm/core/simulator/initState_impl.hpp b/opm/core/simulator/initState_impl.hpp index 1879a2156..bbe718bf6 100644 --- a/opm/core/simulator/initState_impl.hpp +++ b/opm/core/simulator/initState_impl.hpp @@ -180,11 +180,11 @@ namespace Opm const double surfvol[2][2] = { { 1.0, 0.0 }, { 0.0, 1.0 } }; // We do not handle multi-region PVT/EQUIL at this point. - const int* cells = 0; + const int cell = 0; double A[4] = { 0.0 }; - props_.matrix(1, &pressure, &temperature, surfvol[phase], cells, A, 0); + props_.matrix(1, &pressure, &temperature, surfvol[phase], &cell, A, 0); double rho[2] = { 0.0 }; - props_.density(1, A, cells, rho); + props_.density(1, A, &cell, rho); return rho[phase]; } }; @@ -903,7 +903,10 @@ namespace Opm computeSaturation(props,state); } else { - OPM_THROW(std::runtime_error, "Temporarily, we require the RS or the RV field."); + state.gasoilratio() = std::vector(number_of_cells, 0.0); + state.rv() = std::vector(number_of_cells, 0.0); + initBlackoilSurfvolUsingRSorRV(number_of_cells, props, state); + computeSaturation(props,state); } }