From a592a23153addb1db664c7e2d129028093d2ed0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Tue, 11 Mar 2014 12:51:49 +0100 Subject: [PATCH] Assert to avoid future surprises. Well types must be either INJECTOR or PRODUCER for now, if we change this in the future, we should check this part of the code as well. --- opm/core/simulator/WellState.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opm/core/simulator/WellState.hpp b/opm/core/simulator/WellState.hpp index 313914587..d46e12544 100644 --- a/opm/core/simulator/WellState.hpp +++ b/opm/core/simulator/WellState.hpp @@ -23,6 +23,7 @@ #include #include #include +#include namespace Opm { @@ -45,6 +46,7 @@ namespace Opm bhp_.resize(nw); wellrates_.resize(nw * np, 0.0); for (int w = 0; w < nw; ++w) { + assert((wells->type[w] == INJECTOR) || (wells->type[w] == PRODUCER)); const WellControls* ctrl = wells->ctrls[w]; // Initialize bhp to be target pressure if // bhp-controlled well, otherwise set to a little