Don't Output Dynamic Data to Restart File for SEQNUM=0
This commit introduces a special case for the restart file writing
code. In particular we no longer write dynamic data vectors (e.g.,
*WEL, *GRP, *CON) to the restart file if we're being asked to output
the initial condition (i.e., report step/sequence number 0).
Add the report step as a new explicit parameter to createInteHEAD()
instead of inferring this value from the "sim_step" and output
dynamic sizes as zero for report_step=0. While here, also correct
an omission from earlier commit 7986e99e. We must ensure that the
maximum number of wells in the field (intehead[163]) is at least as
large as the current number of active wells (intehead[16]).
Update "intehead" test to account for report_step being passed
directly as an argument to InteHEAD::stepParam().
This commit is contained in:
@@ -331,8 +331,8 @@ BOOST_AUTO_TEST_CASE(Time_and_report_step)
|
||||
|
||||
const auto& v = ih.data();
|
||||
|
||||
BOOST_CHECK_EQUAL(v[VI::intehead::NUM_SOLVER_STEPS], 12); // TSTEP
|
||||
BOOST_CHECK_EQUAL(v[VI::intehead::REPORT_STEP], 2 + 1); // REP_STEP (= sim_step + 1)
|
||||
BOOST_CHECK_EQUAL(v[VI::intehead::NUM_SOLVER_STEPS], 12); // TSTEP (1st argument to stepParam)
|
||||
BOOST_CHECK_EQUAL(v[VI::intehead::REPORT_STEP], 2); // REP_STEP (2nd argument to stepParam)
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(Tuning_param)
|
||||
@@ -424,7 +424,7 @@ BOOST_AUTO_TEST_CASE(ngroups)
|
||||
|
||||
const auto ih = Opm::RestartIO::InteHEAD{}
|
||||
.ngroups({ ngroup });
|
||||
|
||||
|
||||
const auto& v = ih.data();
|
||||
|
||||
BOOST_CHECK_EQUAL(v[VI::intehead::NGRP], ngroup);
|
||||
@@ -489,6 +489,11 @@ TSTEP
|
||||
checkDate(11, { 2010, 12, 30 }); // RStep 11 == 2009-12-30 -> 2010-12-30
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END() // Member_Functions
|
||||
|
||||
// =====================================================================
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(Transfer_Protocol)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TestHeader) {
|
||||
using Ph = Opm::RestartIO::InteHEAD::Phases;
|
||||
@@ -530,8 +535,7 @@ BOOST_AUTO_TEST_CASE(TestHeader) {
|
||||
const auto nscaqz = 1111111;
|
||||
const auto nacaqz = 11111111;
|
||||
const auto tstep = 78;
|
||||
const auto sim_step = 12;
|
||||
const auto report_step = sim_step + 1;
|
||||
const auto report_step = 12;
|
||||
const auto newtmx = 17;
|
||||
const auto newtmn = 5;
|
||||
const auto litmax = 102;
|
||||
@@ -562,7 +566,7 @@ BOOST_AUTO_TEST_CASE(TestHeader) {
|
||||
.params_NCON(niconz, nsconz, nxconz)
|
||||
.params_GRPZ({nigrpz, nsgrpz, nxgrpz, nzgrpz})
|
||||
.params_NAAQZ(ncamax, niaaqz, nsaaqz, nxaaqz, nicaqz, nscaqz, nacaqz)
|
||||
.stepParam(tstep, sim_step)
|
||||
.stepParam(tstep, report_step)
|
||||
.tuningParam({newtmx, newtmn, litmax, litmin, mxwsit, mxwpit})
|
||||
.variousParam(version, iprog)
|
||||
.wellSegDimensions({nsegwl, nswlmx, nsegmx, nlbrmx, nisegz, nrsegz, nilbrz})
|
||||
@@ -624,6 +628,4 @@ BOOST_AUTO_TEST_CASE(TestHeader) {
|
||||
BOOST_CHECK_EQUAL(header.ngroup, ngroup);
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END() // Transfer_Protocol
|
||||
|
||||
Reference in New Issue
Block a user