SMSPEC: Temporarily Restore Unconditional RESTART Vector
Needed to ensure we create the same summary/specification files as the existing system. We will revert this change once the new system is in place and we can afford to update the reference solutions.
This commit is contained in:
parent
32ac0034a7
commit
a3f2c115f1
@ -593,6 +593,7 @@ namespace {
|
||||
auto ret = std::vector<PaddedOutputString<substrLength>>{};
|
||||
|
||||
if (restart.root.empty()) {
|
||||
ret.resize(maxSubstrings);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -605,6 +606,7 @@ namespace {
|
||||
|
||||
Opm::OpmLog::warning(msg);
|
||||
|
||||
ret.resize(maxSubstrings);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -738,7 +740,7 @@ SummarySpecification::write(const Parameters& params)
|
||||
// Pretend to be ECLIPSE 100
|
||||
smspec.write("INTEHEAD", std::vector<int>{ this->unit_, 100 });
|
||||
|
||||
if (! this->restart_.empty())
|
||||
// if (! this->restart_.empty())
|
||||
smspec.write("RESTART", this->restart_);
|
||||
|
||||
smspec.write("DIMENS",
|
||||
|
@ -1863,12 +1863,13 @@ BOOST_AUTO_TEST_CASE(Unformatted_Base)
|
||||
|
||||
auto smspec = ::Opm::EclIO::EclFile{fname};
|
||||
|
||||
BOOST_CHECK_MESSAGE(! smspec.hasKey("RESTART"), "SMSPEC File must NOT have 'RESTART'");
|
||||
//BOOST_CHECK_MESSAGE(! smspec.hasKey("RESTART"), "SMSPEC File must NOT have 'RESTART'");
|
||||
|
||||
{
|
||||
const auto vectors = smspec.getList();
|
||||
const auto expect_vectors = std::vector<Opm::EclIO::EclFile::EclEntry>{
|
||||
Opm::EclIO::EclFile::EclEntry{"INTEHEAD", Opm::EclIO::eclArrType::INTE, 2},
|
||||
Opm::EclIO::EclFile::EclEntry{"RESTART", Opm::EclIO::eclArrType::CHAR, 9},
|
||||
Opm::EclIO::EclFile::EclEntry{"DIMENS", Opm::EclIO::eclArrType::INTE, 6},
|
||||
Opm::EclIO::EclFile::EclEntry{"KEYWORDS", Opm::EclIO::eclArrType::CHAR, 4},
|
||||
Opm::EclIO::EclFile::EclEntry{"WGNAMES", Opm::EclIO::eclArrType::CHAR, 4},
|
||||
@ -1974,6 +1975,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Base)
|
||||
const auto vectors = smspec.getList();
|
||||
const auto expect_vectors = std::vector<Opm::EclIO::EclFile::EclEntry>{
|
||||
Opm::EclIO::EclFile::EclEntry{"INTEHEAD", Opm::EclIO::eclArrType::INTE, 2},
|
||||
Opm::EclIO::EclFile::EclEntry{"RESTART", Opm::EclIO::eclArrType::CHAR, 9},
|
||||
Opm::EclIO::EclFile::EclEntry{"DIMENS", Opm::EclIO::eclArrType::INTE, 6},
|
||||
Opm::EclIO::EclFile::EclEntry{"KEYWORDS", Opm::EclIO::eclArrType::CHAR, 4},
|
||||
Opm::EclIO::EclFile::EclEntry{"WGNAMES", Opm::EclIO::eclArrType::CHAR, 4},
|
||||
@ -2079,6 +2081,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Base)
|
||||
const auto vectors = smspec.getList();
|
||||
const auto expect_vectors = std::vector<Opm::EclIO::EclFile::EclEntry>{
|
||||
Opm::EclIO::EclFile::EclEntry{"INTEHEAD", Opm::EclIO::eclArrType::INTE, 2},
|
||||
Opm::EclIO::EclFile::EclEntry{"RESTART", Opm::EclIO::eclArrType::CHAR, 9},
|
||||
Opm::EclIO::EclFile::EclEntry{"DIMENS", Opm::EclIO::eclArrType::INTE, 6},
|
||||
Opm::EclIO::EclFile::EclEntry{"KEYWORDS", Opm::EclIO::eclArrType::CHAR, 4},
|
||||
Opm::EclIO::EclFile::EclEntry{"WGNAMES", Opm::EclIO::eclArrType::CHAR, 4},
|
||||
@ -2184,6 +2187,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Base)
|
||||
const auto vectors = smspec.getList();
|
||||
const auto expect_vectors = std::vector<Opm::EclIO::EclFile::EclEntry>{
|
||||
Opm::EclIO::EclFile::EclEntry{"INTEHEAD", Opm::EclIO::eclArrType::INTE, 2},
|
||||
Opm::EclIO::EclFile::EclEntry{"RESTART", Opm::EclIO::eclArrType::CHAR, 9},
|
||||
Opm::EclIO::EclFile::EclEntry{"DIMENS", Opm::EclIO::eclArrType::INTE, 6},
|
||||
Opm::EclIO::EclFile::EclEntry{"KEYWORDS", Opm::EclIO::eclArrType::CHAR, 4},
|
||||
Opm::EclIO::EclFile::EclEntry{"WGNAMES", Opm::EclIO::eclArrType::CHAR, 4},
|
||||
@ -2296,9 +2300,11 @@ BOOST_AUTO_TEST_CASE(Formatted_Restarted)
|
||||
|
||||
auto smspec = ::Opm::EclIO::EclFile{fname};
|
||||
|
||||
#if 0
|
||||
BOOST_CHECK_MESSAGE(! smspec.hasKey("RESTART"),
|
||||
"SMSPEC file must NOT have RESTART "
|
||||
"data if root name is too long");
|
||||
#endif
|
||||
}
|
||||
|
||||
// ========================= METRIC =======================
|
||||
|
Loading…
Reference in New Issue
Block a user