wrtiting state to report at the end of each time step

insead of writing in the begining of each time step.
This commit is contained in:
Kai Bao 2016-07-04 11:39:56 +02:00
parent 8e52e71993
commit 6a70450422
2 changed files with 16 additions and 10 deletions

View File

@ -165,9 +165,10 @@ namespace Opm
// give the polymer and surfactant simulators the chance to do their stuff
asImpl().handleAdditionalWellInflow(timer, wells_manager, well_state, wells);
// write simulation state at the report stage
output_writer_.writeTimeStep( timer, state, well_state );
// write the inital state at the report stage
if (timer.initialStep()) {
output_writer_.writeTimeStep( timer, state, well_state );
}
// Max oil saturation (for VPPARS), hysteresis update.
props_.updateSatOilMax(state.saturation());
@ -265,6 +266,10 @@ namespace Opm
// Increment timer, remember well state.
++timer;
// write simulation state at the report stage
output_writer_.writeTimeStep( timer, state, well_state );
prev_well_state = well_state;
// The well potentials are only computed if they are needed
// For now thay are only used to determine default guide rates for group controlled wells
@ -275,8 +280,6 @@ namespace Opm
asImpl().updateListEconLimited(solver, eclipse_state_->getSchedule(), timer.currentStepNum(), wells,
well_state, dynamic_list_econ_limited);
}
// Write final simulation state.
output_writer_.writeTimeStep( timer, state, prev_well_state );
// Stop timer and create timing report
total_timer.stop();

View File

@ -126,8 +126,10 @@ namespace Opm
// give the polymer and surfactant simulators the chance to do their stuff
Base::asImpl().handleAdditionalWellInflow(timer, wells_manager, well_state, wells);
// write simulation state at the report stage
output_writer_.writeTimeStep( timer, state, well_state );
// write the inital state at the report stage
if (timer.initialStep()) {
output_writer_.writeTimeStep( timer, state, well_state );
}
// Max oil saturation (for VPPARS), hysteresis update.
props_.updateSatOilMax(state.saturation());
@ -179,12 +181,13 @@ namespace Opm
// Increment timer, remember well state.
++timer;
// write simulation state at the report stage
output_writer_.writeTimeStep( timer, state, well_state );
prev_well_state = well_state;
}
// Write final simulation state.
output_writer_.writeTimeStep( timer, state, prev_well_state );
// Stop timer and create timing report
total_timer.stop();
SimulatorReport report;