mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use Schedule constructor.
This commit is contained in:
committed by
Joakim Hove (IT SI SIB)
parent
63f4b6d734
commit
566f4fbb02
@@ -88,6 +88,7 @@ try
|
||||
// If we have a "deck_filename", grid and props will be read from that.
|
||||
bool use_deck = param.has("deck_filename");
|
||||
std::shared_ptr< EclipseState > eclipseState;
|
||||
std::shared_ptr< Schedule > schedule;
|
||||
std::unique_ptr<GridManager> grid;
|
||||
std::unique_ptr<BlackoilPropertiesInterface> props;
|
||||
std::unique_ptr<RockCompressibility> rock_comp;
|
||||
@@ -104,6 +105,12 @@ try
|
||||
std::string deck_filename = param.get<std::string>("deck_filename");
|
||||
auto deck = parser.parseFile(deck_filename , parseContext);
|
||||
eclipseState.reset(new EclipseState(deck, parseContext));
|
||||
schedule.reset( new Schedule(deck,
|
||||
eclipseState->getInputGrid(),
|
||||
eclipseState->get3DProperties(),
|
||||
eclipseState->runspec().phases(),
|
||||
parseContext));
|
||||
|
||||
|
||||
// Grid init
|
||||
grid.reset(new GridManager(eclipseState->getInputGrid()));
|
||||
@@ -234,7 +241,7 @@ try
|
||||
int step = 0;
|
||||
SimulatorTimer simtimer;
|
||||
// Use timer for last epoch to obtain total time.
|
||||
const auto& timeMap = eclipseState->getSchedule().getTimeMap();
|
||||
const auto& timeMap = schedule->getTimeMap();
|
||||
simtimer.init(timeMap);
|
||||
const double total_time = simtimer.totalTime();
|
||||
for (size_t reportStepIdx = 0; reportStepIdx < timeMap.numTimesteps(); ++reportStepIdx) {
|
||||
@@ -247,7 +254,7 @@ try
|
||||
<< simtimer.numSteps() - step << ")\n\n" << std::flush;
|
||||
|
||||
// Create new wells, well_state
|
||||
WellsManager wells(*eclipseState , reportStepIdx , *grid->c_grid());
|
||||
WellsManager wells(*eclipseState , *schedule, reportStepIdx , *grid->c_grid());
|
||||
// @@@ HACK: we should really make a new well state and
|
||||
// properly transfer old well state to it every report step,
|
||||
// since number of wells may change etc.
|
||||
|
||||
Reference in New Issue
Block a user