Fix MSIM UDQ Configuration Lookup

The MSIM 'report_step' is a one-based index so we must subtract
one before looking up the pertinent Schedule information.
This commit is contained in:
Bård Skaflestad 2023-06-28 12:11:21 +02:00
parent d6ed5f754c
commit ec87ad1f61
2 changed files with 11 additions and 9 deletions

View File

@ -127,7 +127,7 @@ void msim::run_step(WellTestState& wtest_state, UDQState& udq_state, data::Solut
/* initial_inplace = */ {}, /* initial_inplace = */ {},
/* inplace = */ {}); /* inplace = */ {});
this->schedule.getUDQConfig(report_step) this->schedule.getUDQConfig(report_step - 1)
.eval(report_step, this->schedule, schedule.wellMatcher(report_step), this->st, udq_state); .eval(report_step, this->schedule, schedule.wellMatcher(report_step), this->st, udq_state);
this->output(wtest_state, this->output(wtest_state,

View File

@ -346,18 +346,20 @@ BOOST_AUTO_TEST_CASE(UDQ_WUWCT) {
{ {
const auto& fu_time = ecl_sum.get_at_rstep("FU_TIME"); const auto& fu_time = ecl_sum.get_at_rstep("FU_TIME");
BOOST_CHECK_CLOSE(fu_time[7 - 1], 212, 1e-5); BOOST_CHECK_CLOSE(fu_time[7 - 1], 212, 1e-5);
BOOST_CHECK_CLOSE(fu_time[8 - 1], 243, 1e-5);
// UPDATE OFF // UPDATE OFF
BOOST_CHECK_CLOSE(fu_time[8 - 1], 212, 1e-5); BOOST_CHECK_CLOSE(fu_time[9 - 1] , 243, 1e-5);
BOOST_CHECK_CLOSE(fu_time[9 - 1] , 212, 1e-5); BOOST_CHECK_CLOSE(fu_time[10 - 1], 243, 1e-5);
BOOST_CHECK_CLOSE(fu_time[10 - 1], 212, 1e-5); BOOST_CHECK_CLOSE(fu_time[11 - 1], 243, 1e-5);
BOOST_CHECK_CLOSE(fu_time[11 - 1], 212, 1e-5); BOOST_CHECK_CLOSE(fu_time[12 - 1], 243, 1e-5);
// UPDATE NEXT // UPDATE NEXT
BOOST_CHECK_CLOSE(fu_time[12 - 1], 342, 1e-5); BOOST_CHECK_CLOSE(fu_time[13 - 1], 372, 1e-5);
BOOST_CHECK_CLOSE(fu_time[13 - 1], 342, 1e-5); BOOST_CHECK_CLOSE(fu_time[14 - 1], 372, 1e-5);
BOOST_CHECK_CLOSE(fu_time[14 - 1], 342, 1e-5); BOOST_CHECK_CLOSE(fu_time[15 - 1], 372, 1e-5);
// UPDATE ON // UPDATE ON
BOOST_CHECK_CLOSE(fu_time[15 - 1], 456, 1e-5);
BOOST_CHECK_CLOSE(fu_time[16 - 1], 487, 1e-5); BOOST_CHECK_CLOSE(fu_time[16 - 1], 487, 1e-5);
BOOST_CHECK_CLOSE(fu_time[17 - 1], 517, 1e-5);
BOOST_CHECK_CLOSE(fu_time[18 - 1], 548, 1e-5);
} }
} }
} }