mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #1104 from atgeirr/allow-restart-without-opmextra
Allow restarting without OPMEXTRA field in restart file.
This commit is contained in:
commit
d700f3e946
@ -118,9 +118,11 @@ namespace Opm
|
|||||||
adaptiveTimeStepping.reset( new AdaptiveTimeStepping( param_, terminal_output_ ) );
|
adaptiveTimeStepping.reset( new AdaptiveTimeStepping( param_, terminal_output_ ) );
|
||||||
}
|
}
|
||||||
if (output_writer_.isRestart()) {
|
if (output_writer_.isRestart()) {
|
||||||
|
if (extra.suggested_step > 0.0) {
|
||||||
adaptiveTimeStepping->setSuggestedNextStep(extra.suggested_step);
|
adaptiveTimeStepping->setSuggestedNextStep(extra.suggested_step);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string restorefilename = param_.getDefault("restorefile", std::string("") );
|
std::string restorefilename = param_.getDefault("restorefile", std::string("") );
|
||||||
if( ! restorefilename.empty() )
|
if( ! restorefilename.empty() )
|
||||||
|
@ -174,9 +174,11 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (output_writer_.isRestart()) {
|
if (output_writer_.isRestart()) {
|
||||||
|
if (extra.suggested_step > 0.0) {
|
||||||
adaptiveTimeStepping->setSuggestedNextStep(extra.suggested_step);
|
adaptiveTimeStepping->setSuggestedNextStep(extra.suggested_step);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string restorefilename = param_.getDefault("restorefile", std::string("") );
|
std::string restorefilename = param_.getDefault("restorefile", std::string("") );
|
||||||
if( ! restorefilename.empty() )
|
if( ! restorefilename.empty() )
|
||||||
|
@ -467,7 +467,8 @@ namespace Opm
|
|||||||
assert(opmextra.size() == 1);
|
assert(opmextra.size() == 1);
|
||||||
extra.suggested_step = opmextra[0];
|
extra.suggested_step = opmextra[0];
|
||||||
} else {
|
} else {
|
||||||
OPM_THROW(std::runtime_error, "Cannot restart, restart data is missing OPMEXTRA field.");
|
OpmLog::warning("Restart data is missing OPMEXTRA field, restart run may deviate from original run.");
|
||||||
|
extra.suggested_step = -1.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user