From fdb01cb9a33103de08fd87fbd0d6577a1256d0c2 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Tue, 29 Nov 2016 11:36:30 +0100 Subject: [PATCH] flow_ebos: fix build with debugging flags once more, it seems like we became a victim of the combinatorial explosion of possibilities. --- opm/autodiff/StandardWellsDense.hpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/opm/autodiff/StandardWellsDense.hpp b/opm/autodiff/StandardWellsDense.hpp index 765f1f493..6a1b4ae5b 100644 --- a/opm/autodiff/StandardWellsDense.hpp +++ b/opm/autodiff/StandardWellsDense.hpp @@ -114,10 +114,6 @@ enum WellVariablePositions { return; } - // assumes the gas fractions are stored after water fractions - // WellVariablePositions needs to be changed for 2p runs - assert (np == 3 || np == 2 && !pu.phase_used[Gas] ); - fluid_ = fluid_arg; active_ = active_arg; vfp_properties_ = vfp_properties_arg; @@ -133,6 +129,15 @@ enum WellVariablePositions { const int nperf = wells().well_connpos[nw]; const int nc = numCells(); +#ifndef NDEBUG + const auto pu = fluid_->phaseUsage(); + const int np = pu.num_phases; + + // assumes the gas fractions are stored after water fractions + // WellVariablePositions needs to be changed for 2p runs + assert (np == 3 || np == 2 && !pu.phase_used[Gas] ); +#endif + // set invDuneD invDuneD_.setSize( nw, nw, nw );