From 3c3d3208ebd96840b00f0d7d4fdfb7cea5c0419e Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Thu, 27 Nov 2014 18:42:19 +0100 Subject: [PATCH] ECL problem: make the code which converts gas to oil saturations a bit easier to read This code is required in the first place because opm-material always specifies all parameters in terms of the wetting saturations while the gas is the non-wetting phase in a gas-oil system. --- tests/problems/eclproblem.hh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/problems/eclproblem.hh b/tests/problems/eclproblem.hh index 9de105eb3..7a3de6fbd 100644 --- a/tests/problems/eclproblem.hh +++ b/tests/problems/eclproblem.hh @@ -631,11 +631,11 @@ private: owParams.setKrnSamples(SwColumn, swofTable.getKrowColumn()); owParams.setPcnwSamples(SwColumn, swofTable.getPcowColumn()); - // convert the saturations from gas to oil saturations - auto SoSamples = sgofTable.getSgColumn(); - for (size_t sampleIdx = 0; sampleIdx < SoSamples.size(); ++ sampleIdx) { - SoSamples[sampleIdx] = 1 - SoSamples[sampleIdx]; - } + // convert the saturations of the SGOF keyword from gas to oil saturations + std::vector SoSamples(sgofTable.numRows()); + for (size_t sampleIdx = 0; sampleIdx < sgofTable.numRows(); ++ sampleIdx) + SoSamples[sampleIdx] = 1 - sgofTable.getSgColumn()[sampleIdx]; + goParams.setKrwSamples(SoSamples, sgofTable.getKrogColumn()); goParams.setKrnSamples(SoSamples, sgofTable.getKrgColumn()); goParams.setPcnwSamples(SoSamples, sgofTable.getPcogColumn());