mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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.
This commit is contained in:
parent
db6a36d1fd
commit
a592a23153
@ -23,6 +23,7 @@
|
||||
#include <opm/core/wells.h>
|
||||
#include <opm/core/well_controls.h>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user