making a forwarded updateListEconLimited in SimulatorBase.

and some changes to make the code compile for all the simulators.
This commit is contained in:
Kai Bao 2016-06-30 11:36:09 +02:00
parent 98a6495abc
commit b2524a7dc3
6 changed files with 62 additions and 2 deletions

View File

@ -129,6 +129,7 @@ namespace Opm {
using Base::numPhases;
using Base::numMaterials;
using Base::wellModel;
protected:
using Base::asImpl;

View File

@ -239,6 +239,13 @@ namespace Opm {
transport_solver_.model().relativeChange(previous, current));
}
/// Return the well model
const WellModel& wellModel() const
{
return pressure_model_->wellModel();
}

View File

@ -162,6 +162,13 @@ namespace Opm
const WellState& xw,
std::vector<double>& well_potentials);
void updateListEconLimited(const std::unique_ptr<Solver>& solver,
ScheduleConstPtr schedule,
const int current_step,
const Wells* wells,
const WellState& well_state,
DynamicListEconLimited& list_econ_limited) const;
// Data.
typedef RateConverter::

View File

@ -272,8 +272,8 @@ namespace Opm
asImpl().computeWellPotentials(wells, well_state, well_potentials);
}
solver->model().wellModel().updateListEconLimited(eclipse_state_->getSchedule(), timer.currentStepNum(), wells,
well_state, dynamic_list_econ_limited);
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 );
@ -618,4 +618,24 @@ namespace Opm
}
}
}
template <class Implementation>
void
SimulatorBase<Implementation>::
updateListEconLimited(const std::unique_ptr<Solver>& solver,
ScheduleConstPtr schedule,
const int current_step,
const Wells* wells,
const WellState& well_state,
DynamicListEconLimited& list_econ_limited) const
{
solver->model().wellModel().updateListEconLimited(schedule, current_step, wells,
well_state, list_econ_limited);
}
} // namespace Opm

View File

@ -119,9 +119,17 @@ namespace Opm
WellsManager& wells_manager,
typename BaseType::WellState& well_state,
const Wells* wells);
void updateListEconLimited(const std::unique_ptr<Solver>& solver,
ScheduleConstPtr schedule,
const int current_step,
const Wells* wells,
const WellState& well_state,
DynamicListEconLimited& list_econ_limited) const;
private:
Opm::DeckConstPtr deck_;
const PolymerPropsAd& polymer_props_;
};
} // namespace Opm

View File

@ -98,6 +98,23 @@ handleAdditionalWellInflow(SimulatorTimer& timer,
}
template <class GridT>
void
SimulatorFullyImplicitCompressiblePolymer<GridT>::
updateListEconLimited(const std::unique_ptr<Solver>& /*solver*/,
ScheduleConstPtr /*schedule*/,
const int /*current_step*/,
const Wells* /*wells*/,
const WellState& /*well_state*/,
DynamicListEconLimited& /*list_econ_limited*/) const
{
}
} // namespace Opm
#endif // OPM_SIMULATORFULLYIMPLICITCOMPRESSIBLEPOLYMER_HEADER_INCLUDED