Add new step() overload taking initial states separately.

This commit is contained in:
Atgeirr Flø Rasmussen
2016-01-15 15:16:40 +01:00
parent fab64f5afb
commit 19f4cef6c1
2 changed files with 36 additions and 5 deletions

View File

@@ -85,9 +85,23 @@ namespace Opm
step(const double dt,
ReservoirState& reservoir_state,
WellState& well_state)
{
return step(dt, reservoir_state, well_state, reservoir_state, well_state);
}
template <class PhysicalModel>
int
NonlinearSolver<PhysicalModel>::
step(const double dt,
const ReservoirState& initial_reservoir_state,
const WellState& initial_well_state,
ReservoirState& reservoir_state,
WellState& well_state)
{
// Do model-specific once-per-step calculations.
model_->prepareStep(dt, reservoir_state, well_state);
model_->prepareStep(dt, initial_reservoir_state, initial_well_state);
int iteration = 0;