diff --git a/opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp b/opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp index 9687fd60c..6e6997b00 100644 --- a/opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp +++ b/opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp @@ -178,15 +178,15 @@ struct EclEpsScalingPointsInfo bool hasGas = eclState.runspec().phases().active(Phase::GAS); bool hasOil = eclState.runspec().phases().active(Phase::OIL); - if (!hasWater) { + if (int(hasWater) + int(hasGas) + int(hasOil) == 1) { + return; + } else if (!hasWater) { Swl = 0.0; Swu = 0.0; Swcr = 0.0; bool family1 = (!sgofTables.empty() || !slgofTables.empty()); bool family2 = !sgfnTables.empty() && !sof2Tables.empty(); - if (!hasOil) { - return; - } else if (family1) { + if (family1) { if (!sgofTables.empty()) extractUnscaledSgof_(sgofTables.getTable(satRegionIdx)); else { @@ -201,16 +201,13 @@ struct EclEpsScalingPointsInfo throw std::domain_error("No valid saturation keyword family specified"); } return; - } - else if (!hasGas) { + } else if (!hasGas) { Sgl = 0.0; Sgu = 0.0; Sgcr = 0.0; bool family1 = !swofTables.empty(); bool family2 = !swfnTables.empty() && !sof2Tables.empty(); - if (!hasOil) { - return; - } else if (family1) { + if (family1) { extractUnscaledSwof_(swofTables.getTable(satRegionIdx)); } else if (family2) { extractUnscaledSwfn_(swfnTables.getTable(satRegionIdx));