From c65ad8292bb932a629bdf0368a03fb4b09ce5191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Wed, 21 Oct 2015 15:27:52 +0200 Subject: [PATCH] Make SaturationPropsFromDeck work for two-phase cases. --- opm/core/props/satfunc/SaturationPropsFromDeck.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opm/core/props/satfunc/SaturationPropsFromDeck.cpp b/opm/core/props/satfunc/SaturationPropsFromDeck.cpp index 769ad0325..f1b38f03e 100644 --- a/opm/core/props/satfunc/SaturationPropsFromDeck.cpp +++ b/opm/core/props/satfunc/SaturationPropsFromDeck.cpp @@ -82,7 +82,7 @@ namespace Opm { assert(cells != 0); - const int np = BlackoilPhases::MaxNumPhases; + const int np = numPhases(); if (dkrds) { ExplicitArraysSatDerivativesFluidState fluidState(phaseUsage_); fluidState.setSaturationArray(s); @@ -141,7 +141,7 @@ namespace Opm { assert(cells != 0); - const int np = BlackoilPhases::MaxNumPhases; + const int np = numPhases(); if (dpcds) { ExplicitArraysSatDerivativesFluidState fluidState(phaseUsage_); typedef ExplicitArraysSatDerivativesFluidState::Evaluation Evaluation; @@ -196,7 +196,7 @@ namespace Opm int gpos = phaseUsage_.phase_pos[BlackoilPhases::Vapour]; int opos = phaseUsage_.phase_pos[BlackoilPhases::Liquid]; - const int np = phaseUsage_.num_phases; + const int np = numPhases(); for (int i = 0; i < n; ++i) { const auto& scaledDrainageInfo = materialLawManager_->oilWaterScaledEpsInfoDrainage(cells[i]);