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.
This commit is contained in:
Andreas Lauser 2014-11-27 18:42:19 +01:00
parent 2fb0b4a7e5
commit 3c3d3208eb

View File

@ -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<double> 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());