mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 02:30:18 -06:00
Changed direct access to struct WellControls to rather use well_controls_get_xxx() api.
This commit is contained in:
parent
671122e2e6
commit
37274035bc
@ -27,6 +27,7 @@
|
||||
#include <opm/core/grid.h>
|
||||
#include <opm/core/grid/GridManager.hpp>
|
||||
#include <opm/core/wells.h>
|
||||
#include <opm/core/well_controls.h>
|
||||
#include <opm/core/wells/WellsManager.hpp>
|
||||
#include <opm/core/utility/ErrorMacros.hpp>
|
||||
#include <opm/core/simulator/initState.hpp>
|
||||
@ -165,8 +166,8 @@ try
|
||||
if (!ok) {
|
||||
OPM_THROW(std::runtime_error, "Simple well init failed.");
|
||||
}
|
||||
simple_wells->ctrls[0]->current = 0;
|
||||
simple_wells->ctrls[1]->current = 0;
|
||||
well_controls_set_current( simple_wells->ctrls[0] , 0);
|
||||
well_controls_set_current( simple_wells->ctrls[1] , 0);
|
||||
}
|
||||
|
||||
// Linear solver.
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
#include <opm/core/grid.h>
|
||||
#include <opm/core/wells.h>
|
||||
#include <opm/core/well_controls.h>
|
||||
#include <opm/core/pressure/flow_bc.h>
|
||||
|
||||
#include <opm/core/simulator/SimulatorReport.hpp>
|
||||
@ -297,8 +298,8 @@ namespace Opm
|
||||
const int nw = wells->number_of_wells;
|
||||
for (int w = 0; w < nw; ++w) {
|
||||
const WellControls* wc = wells->ctrls[w];
|
||||
if (wc->current >= 0) {
|
||||
if (wc->type[wc->current] == BHP) {
|
||||
if (well_controls_get_current( wc ) >= 0) {
|
||||
if (well_controls_get_current_type(wc) == BHP ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user