Change string used for THPRES in restartfile

This commit is contained in:
Joakim Hove 2018-09-03 16:59:23 +02:00
parent e5ab52b773
commit bdbf417887

View File

@ -211,7 +211,7 @@ public:
restartValue.addExtra("OPMEXTRA", std::vector<double>(1, nextStepSize));
if (simConfig.useThresholdPressure())
restartValue.addExtra("THPRES", Opm::UnitSystem::measure::pressure, simulator_.problem().thresholdPressure().data());
restartValue.addExtra("THPRESPR", Opm::UnitSystem::measure::pressure, simulator_.problem().thresholdPressure().data());
// first, create a tasklet to write the data for the current time step to disk
auto eclWriteTasklet = std::make_shared<EclWriteTasklet>(*eclIO_,
@ -294,7 +294,7 @@ public:
restartValue.addExtra("OPMEXTRA", std::vector<double>(1, nextStepSize));
if (simConfig.useThresholdPressure())
restartValue.addExtra("THPRES", Opm::UnitSystem::measure::pressure, simulator_.problem().thresholdPressure().data());
restartValue.addExtra("THPRESPR", Opm::UnitSystem::measure::pressure, simulator_.problem().thresholdPressure().data());
// first, create a tasklet to write the data for the current time step to disk
auto eclWriteTasklet = std::make_shared<EclWriteTasklet>(*eclIO_,
@ -335,7 +335,7 @@ public:
const auto& inputThpres = eclState().getSimulationConfig().getThresholdPressure();
std::vector<Opm::RestartKey> extraKeys = {{"OPMEXTRA", Opm::UnitSystem::measure::identity, false},
{"THPRES", Opm::UnitSystem::measure::pressure, inputThpres.active()}};
{"THPRESPR", Opm::UnitSystem::measure::pressure, inputThpres.active()}};
unsigned episodeIdx = simulator_.episodeIndex();
const auto& gridView = simulator_.vanguard().gridView();
@ -350,7 +350,7 @@ public:
if (inputThpres.active()) {
Simulator& mutableSimulator = const_cast<Simulator&>(simulator_);
auto& thpres = mutableSimulator.problem().thresholdPressure();
const auto& thpresValues = restartValues.getExtra("THPRES");
const auto& thpresValues = restartValues.getExtra("THPRESPR");
thpres.setFromRestart(thpresValues);
}
}