Merge pull request #479 from joakim-hove/thpres-move-it
Rename THPRES string to THPRESPR
This commit is contained in:
commit
065b9c9c9f
@ -559,13 +559,13 @@ void checkSaveArguments(const EclipseState& es,
|
||||
// If the the THPRES option is active the restart_value should have a
|
||||
// THPRES field. This is not enforced here because not all the opm
|
||||
// simulators have been updated to include the THPRES values.
|
||||
if (!restart_value.hasExtra("THPRES")) {
|
||||
if (!restart_value.hasExtra("THPRESPR")) {
|
||||
OpmLog::warning("This model has THPRES active - should have THPRES as part of restart data.");
|
||||
return;
|
||||
}
|
||||
|
||||
size_t num_regions = es.getTableManager().getEqldims().getNumEquilRegions();
|
||||
const auto& thpres = restart_value.getExtra("THPRES");
|
||||
const auto& thpres = restart_value.getExtra("THPRESPR");
|
||||
if (thpres.size() != num_regions * num_regions)
|
||||
throw std::runtime_error("THPRES vector has invalid size - should have num_region * num_regions.");
|
||||
}
|
||||
|
@ -593,7 +593,7 @@ BOOST_AUTO_TEST_CASE(STORE_THPRES) {
|
||||
setup.schedule), std::runtime_error);
|
||||
*/
|
||||
|
||||
restart_value.addExtra("THPRES", UnitSystem::measure::pressure, {0,1});
|
||||
restart_value.addExtra("THPRESPR", UnitSystem::measure::pressure, {0,1});
|
||||
/* THPRES data has wrong size in extra container. */
|
||||
BOOST_CHECK_THROW( RestartIO::save("FILE.UNRST", 1 ,
|
||||
100,
|
||||
@ -604,7 +604,7 @@ BOOST_AUTO_TEST_CASE(STORE_THPRES) {
|
||||
|
||||
int num_regions = setup.es.getTableManager().getEqldims().getNumEquilRegions();
|
||||
std::vector<double> thpres(num_regions * num_regions, 78);
|
||||
restart_value2.addExtra("THPRES", UnitSystem::measure::pressure, thpres);
|
||||
restart_value2.addExtra("THPRESPR", UnitSystem::measure::pressure, thpres);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user