mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #747 from joakim-hove/nosim-param
Will look for param: 'nosim' and override deck.
This commit is contained in:
commit
8d9090b8f9
@ -401,7 +401,7 @@ namespace Opm
|
|||||||
// eclipse_state_
|
// eclipse_state_
|
||||||
// May throw if errors are encountered, here configured to be somewhat tolerant.
|
// May throw if errors are encountered, here configured to be somewhat tolerant.
|
||||||
void readDeckInput()
|
void readDeckInput()
|
||||||
{
|
{
|
||||||
std::string deck_filename = param_.get<std::string>("deck_filename");
|
std::string deck_filename = param_.get<std::string>("deck_filename");
|
||||||
|
|
||||||
// Create Parser
|
// Create Parser
|
||||||
@ -428,6 +428,13 @@ namespace Opm
|
|||||||
IOConfigPtr ioConfig = eclipse_state_->getIOConfig();
|
IOConfigPtr ioConfig = eclipse_state_->getIOConfig();
|
||||||
ioConfig->overrideRestartWriteInterval(static_cast<size_t>(output_interval));
|
ioConfig->overrideRestartWriteInterval(static_cast<size_t>(output_interval));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Possible to force initialization only behavior (NOSIM).
|
||||||
|
if (param_.has("nosim")) {
|
||||||
|
const bool nosim = param_.get<bool>("nosim");
|
||||||
|
IOConfigPtr ioConfig = eclipse_state_->getIOConfig();
|
||||||
|
ioConfig->overrideNOSIM( true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -703,13 +710,14 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
Opm::ScheduleConstPtr schedule = eclipse_state_->getSchedule();
|
Opm::ScheduleConstPtr schedule = eclipse_state_->getSchedule();
|
||||||
Opm::TimeMapConstPtr timeMap(schedule->getTimeMap());
|
Opm::TimeMapConstPtr timeMap(schedule->getTimeMap());
|
||||||
|
std::shared_ptr<IOConfig> ioConfig = eclipse_state_->getIOConfig();
|
||||||
SimulatorTimer simtimer;
|
SimulatorTimer simtimer;
|
||||||
|
|
||||||
// initialize variables
|
// initialize variables
|
||||||
const auto initConfig = eclipse_state_->getInitConfig();
|
const auto initConfig = eclipse_state_->getInitConfig();
|
||||||
simtimer.init(timeMap, (size_t)initConfig->getRestartStep());
|
simtimer.init(timeMap, (size_t)initConfig->getRestartStep());
|
||||||
|
|
||||||
if (!schedule->initOnly()) {
|
if (!ioConfig->initOnly()) {
|
||||||
if (output_cout_) {
|
if (output_cout_) {
|
||||||
std::string msg;
|
std::string msg;
|
||||||
msg = "\n\n================ Starting main simulation loop ===============\n";
|
msg = "\n\n================ Starting main simulation loop ===============\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user