mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 02:30:18 -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,7 +118,9 @@ namespace Opm
|
||||
adaptiveTimeStepping.reset( new AdaptiveTimeStepping( param_, terminal_output_ ) );
|
||||
}
|
||||
if (output_writer_.isRestart()) {
|
||||
adaptiveTimeStepping->setSuggestedNextStep(extra.suggested_step);
|
||||
if (extra.suggested_step > 0.0) {
|
||||
adaptiveTimeStepping->setSuggestedNextStep(extra.suggested_step);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,9 @@ public:
|
||||
}
|
||||
|
||||
if (output_writer_.isRestart()) {
|
||||
adaptiveTimeStepping->setSuggestedNextStep(extra.suggested_step);
|
||||
if (extra.suggested_step > 0.0) {
|
||||
adaptiveTimeStepping->setSuggestedNextStep(extra.suggested_step);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -467,7 +467,8 @@ namespace Opm
|
||||
assert(opmextra.size() == 1);
|
||||
extra.suggested_step = opmextra[0];
|
||||
} 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