From dd080c4515b7817797a75676fc4b9f4622a0918b Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Fri, 21 Feb 2014 16:04:15 +0100 Subject: [PATCH] first write out the result of a time step, then increment the timer if done the other way round we would make an assertation in TimeMap false and also the values returned by SimulationTimer would be for the next time step and not the current one... --- opm/autodiff/SimulatorFullyImplicitBlackoil.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/opm/autodiff/SimulatorFullyImplicitBlackoil.cpp b/opm/autodiff/SimulatorFullyImplicitBlackoil.cpp index bb792173b..6b3de8b9b 100644 --- a/opm/autodiff/SimulatorFullyImplicitBlackoil.cpp +++ b/opm/autodiff/SimulatorFullyImplicitBlackoil.cpp @@ -365,6 +365,7 @@ namespace Opm // fractional_flows); // wells_manager_.applyExplicitReinjectionControls(well_resflows_phase, well_resflows_phase); // } + bool well_control_passed = !check_well_controls_; int well_control_iteration = 0; do { @@ -420,13 +421,13 @@ namespace Opm tstep_os.close(); } - // advance to next timestep before reporting at this location - ++timer; - // write an output file for later inspection if (output_) { eclipseWriter_.writeTimeStep(timer, state, well_state); } + + // advance to next timestep before reporting at this location + ++timer; } total_timer.stop();