Use shared SummaryState when instantiating WellsManager

This commit is contained in:
Joakim Hove
2019-05-29 07:44:23 +02:00
parent c6af5f11b6
commit a0aa7fcc2b
8 changed files with 33 additions and 22 deletions

View File

@@ -212,11 +212,13 @@ namespace Opm {
const Grid& grid = ebosSimulator_.vanguard().grid();
const auto& defunct_well_names = ebosSimulator_.vanguard().defunctWellNames();
const auto& eclState = ebosSimulator_.vanguard().eclState();
const auto& summaryState = ebosSimulator_.vanguard().summaryState();
wells_ecl_ = schedule().getWells2(timeStepIdx);
// Create wells and well state.
wells_manager_.reset( new WellsManager (eclState,
schedule(),
summaryState,
timeStepIdx,
Opm::UgGridHelpers::numCells(grid),
Opm::UgGridHelpers::globalCell(grid),
@@ -478,9 +480,11 @@ namespace Opm {
// will not be present in a restart file. Use the previous time step to retrieve
// wells that have information written to the restart file.
const int report_step = std::max(eclState().getInitConfig().getRestartStep() - 1, 0);
const auto& summaryState = ebosSimulator_.vanguard().summaryState();
WellsManager wellsmanager(eclState(),
schedule(),
summaryState,
report_step,
Opm::UgGridHelpers::numCells(grid()),
Opm::UgGridHelpers::globalCell(grid()),