Merge pull request #2826 from daniepin/applyAction-refactor

Combine ScheduleGrid and FieldPropsManager
This commit is contained in:
Joakim Hove
2021-11-12 15:04:37 +01:00
committed by GitHub
15 changed files with 777 additions and 88 deletions

View File

@@ -185,6 +185,49 @@ TSTEP
BOOST_CHECK_THROW( make_schedule(WITH_GRID, parseContext), OpmInputError );
}
BOOST_AUTO_TEST_CASE(COMPDAT) {
const auto TRAILING_COMPDAT = std::string{ R"(
GRID
PORO
1000*0.1 /
PERMX
1000*1 /
PERMY
1000*0.1 /
PERMZ
1000*0.01 /
SCHEDULE
WELSPECS
'W2' 'OP' 1 1 3.33 'OIL' 7*/
/
ACTIONX
'ACTION' /
WWCT OPX > 0.75 /
/
ENDACTIO
TSTEP
10 /
COMPDAT
'W2' 1 1 1 1 'OPEN' /
/
)"};
Schedule sched = make_schedule(TRAILING_COMPDAT);
Action::Result action_result(true);
auto sim_time = TimeService::now();
const auto& action1 = sched[0].actions.get()["ACTION"];
BOOST_CHECK_NO_THROW( sched.applyAction(0, sim_time, action1, Action::Result{true}, {}));
}
BOOST_AUTO_TEST_CASE(TestActions) {
Opm::SummaryState st(TimeService::now());