Modify the well manager test as we now support stopped wells.

We no longer expect an exception when we meet stopped wells.
This commit is contained in:
Tor Harald Sandve 2014-11-18 07:47:17 +01:00
parent 9f64449aa8
commit 57fb32de68
2 changed files with 18 additions and 2 deletions

View File

@ -280,7 +280,7 @@ BOOST_AUTO_TEST_CASE(WellShutOK) {
BOOST_AUTO_TEST_CASE(WellHasSTOP_ExceptionIsThrown) {
BOOST_AUTO_TEST_CASE(WellSTOPOK) {
const std::string filename = "wells_manager_data_wellSTOP.data";
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr deck(parser->parseFile(filename));
@ -288,5 +288,12 @@ BOOST_AUTO_TEST_CASE(WellHasSTOP_ExceptionIsThrown) {
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck));
Opm::GridManager gridManager(deck);
BOOST_CHECK_THROW( new Opm::WellsManager(eclipseState, 0, *gridManager.c_grid(), NULL), std::runtime_error );
Opm::WellsManager wellsManager(eclipseState , 0 , *gridManager.c_grid(), NULL);
const Wells* wells = wellsManager.c_wells();
const struct WellControls* ctrls0 = wells->ctrls[0];
const struct WellControls* ctrls1 = wells->ctrls[1];
BOOST_CHECK(well_controls_well_is_shut(ctrls0)); // The first well is closed
BOOST_CHECK(well_controls_well_is_open(ctrls1)); // The second well is open
}

View File

@ -34,6 +34,15 @@ COMPDAT
'PROD1' 10 3 3 3 'OPEN' 0 10.6092 0.5 /
/
WCONPROD
'PROD1' 'OPEN' 'ORAT' 20000 4* 1000 /
/
WCONINJE
'INJ1' 'GAS' 'OPEN' 'RATE' 100 200 400 /
/
WELOPEN
'INJ1' 'STOP' 5* /
/