Merge pull request #1315 from joakim-hove/extract-schedule

Use Schedule constructor.
This commit is contained in:
Joakim Hove
2017-11-06 17:06:49 +01:00
committed by GitHub
57 changed files with 267 additions and 473 deletions

View File

@@ -327,7 +327,7 @@ namespace Opm
std::shared_ptr<StreamLog> streamLog = std::make_shared<StreamLog>(std::cout, Log::StdoutMessageTypes);
OpmLog::addBackend( "STREAMLOG", streamLog);
const auto& msgLimits = eclState().getSchedule().getMessageLimits();
const auto& msgLimits = schedule().getMessageLimits();
const std::map<int64_t, int> limits = {{Log::MessageType::Note, msgLimits.getCommentPrintLimit(0)},
{Log::MessageType::Info, msgLimits.getMessagePrintLimit(0)},
{Log::MessageType::Warning, msgLimits.getWarningPrintLimit(0)},
@@ -471,6 +471,12 @@ namespace Opm
EclipseState& eclState()
{ return ebosSimulator_->gridManager().eclState(); }
const Schedule& schedule() const
{ return ebosSimulator_->gridManager().schedule(); }
const SummaryConfig& summaryConfig() const
{ return ebosSimulator_->gridManager().summaryConfig(); }
// Initialise the reservoir state. Updated fluid props for SWATINIT.
// Writes to:
// state_
@@ -622,7 +628,10 @@ namespace Opm
exportNncStructure_();
const EclipseGrid& inputGrid = eclState().getInputGrid();
eclIO_.reset(new EclipseIO(eclState(), UgGridHelpers::createEclipseGrid( this->globalGrid() , inputGrid )));
eclIO_.reset(new EclipseIO(eclState(),
UgGridHelpers::createEclipseGrid( this->globalGrid() , inputGrid ),
schedule(),
summaryConfig()));
eclIO_->writeInitial(computeLegacySimProps_(), nnc_);
}
}
@@ -638,6 +647,8 @@ namespace Opm
output_writer_.reset(new OutputWriter(grid(),
param_,
eclState(),
schedule(),
summaryConfig(),
std::move(eclIO_),
Opm::phaseUsageFromDeck(deck())) );
}
@@ -646,7 +657,7 @@ namespace Opm
// Returns EXIT_SUCCESS if it does not throw.
int runSimulator()
{
const auto& schedule = eclState().getSchedule();
const auto& schedule = this->schedule();
const auto& timeMap = schedule.getTimeMap();
auto& ioConfig = eclState().getIOConfig();
SimulatorTimer simtimer;