From fc3e4ab5bc3ee3a5463536fe33dddd05770c8e09 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 25 Aug 2021 08:28:57 +0200 Subject: [PATCH] avoid unused variable warning --- opm/simulators/wells/StandardWellEval.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opm/simulators/wells/StandardWellEval.cpp b/opm/simulators/wells/StandardWellEval.cpp index 095923be6..b95e00227 100644 --- a/opm/simulators/wells/StandardWellEval.cpp +++ b/opm/simulators/wells/StandardWellEval.cpp @@ -298,10 +298,10 @@ updatePrimaryVariables(const WellState& well_state, DeferredLogger& deferred_log } } else { // total_well_rate == 0 if (baseif_.isInjector()) { - auto phase = baseif_.wellEcl().getInjectionProperties().injectorType; // only single phase injection handled if constexpr (has_wfrac_variable) { if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) { + auto phase = baseif_.wellEcl().getInjectionProperties().injectorType; if (phase == InjectorType::WATER) { primary_variables_[WFrac] = 1.0; } else { @@ -311,6 +311,7 @@ updatePrimaryVariables(const WellState& well_state, DeferredLogger& deferred_log } if constexpr (has_gfrac_variable) { if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) { + auto phase = baseif_.wellEcl().getInjectionProperties().injectorType; if (phase == InjectorType::GAS) { primary_variables_[GFrac] = 1.0; if constexpr (Indices::enableSolvent) {