Compute the hydroCarbonState after initializing from restart files

This commit is contained in:
Tor Harald Sandve 2016-05-13 14:07:21 +02:00
parent 5757ef8ad0
commit cd91444bc9

View File

@ -22,6 +22,7 @@
#include <algorithm> #include <algorithm>
#include <opm/parser/eclipse/EclipseState/Schedule/Events.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/Events.hpp>
#include <opm/core/utility/initHydroCarbonState.hpp>
#include <opm/core/well_controls.h> #include <opm/core/well_controls.h>
namespace Opm namespace Opm
@ -83,10 +84,11 @@ namespace Opm
WellState prev_well_state; WellState prev_well_state;
if (output_writer_.isRestart()) { if (output_writer_.isRestart()) {
// This is a restart, populate WellState and ReservoirState state objects from restart file // This is a restart, populate WellState and ReservoirState state objects from restart file
output_writer_.initFromRestartFile(props_.phaseUsage(), props_.permeability(), grid_, state, prev_well_state); output_writer_.initFromRestartFile(props_.phaseUsage(), props_.permeability(), grid_, state, prev_well_state);
} initHydroCarbonState(state, props_.phaseUsage(), Opm::UgGridHelpers::numCells(grid_));
}
// Create timers and file for writing timing info. // Create timers and file for writing timing info.
Opm::time::StopWatch solver_timer; Opm::time::StopWatch solver_timer;