From dfb7f8ff63418163e10ac4662c2c7a1f01dd1dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= Date: Wed, 28 Sep 2016 10:22:03 +0200 Subject: [PATCH] Stop report early if there are no wells --- opm/autodiff/WellStateFullyImplicitBlackoil.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opm/autodiff/WellStateFullyImplicitBlackoil.hpp b/opm/autodiff/WellStateFullyImplicitBlackoil.hpp index e739675f5..00cdd60ce 100644 --- a/opm/autodiff/WellStateFullyImplicitBlackoil.hpp +++ b/opm/autodiff/WellStateFullyImplicitBlackoil.hpp @@ -196,7 +196,9 @@ namespace Opm data::Wells res = WellState::report(pu); const int nw = this->numWells(); - const int np = nw ? this->numPhases() : -1; + if( nw == 0 ) return res; + const int np = this->numPhases(); + using rt = data::Rates::opt; std::vector< rt > phs( np );