removing the rebundant ms_wells_ in BlackoilMultiSegmentModel

This commit is contained in:
Kai Bao 2016-05-10 12:44:45 +02:00
parent 184bff95ba
commit fcd541a1c1
3 changed files with 3 additions and 12 deletions

View File

@ -139,8 +139,6 @@ namespace Opm {
using Base::vfp_properties_;
using Base::well_model_;
MultisegmentWells ms_wells_;
using Base::wellModel;
// using Base::wells;
using Base::wellsActive;

View File

@ -70,14 +70,7 @@ namespace Opm {
const bool terminal_output)
: Base(param, grid, fluid, geo, rock_comp_props, well_model, linsolver,
eclState, has_disgas, has_vapoil, terminal_output)
, ms_wells_(well_model)
{
const double gravity = detail::getGravity(geo_.gravity(), UgGridHelpers::dimensions(grid_));
const V depth = Opm::AutoDiffGrid::cellCentroidsZToEigen(grid_);
ms_wells_.init(&fluid_, &active_, &phaseCondition_, &vfp_properties_, gravity, depth);
// TODO: there should be a better way do the following
ms_wells_.setWellsActive(Base::wellsActive());
}

View File

@ -113,9 +113,9 @@ namespace Opm
const std::vector<WellConstPtr>& wells_ecl = eclipse_state_->getSchedule()->getWells(timer.currentStepNum());
const int current_time_step = timer.currentStepNum();
const MultisegmentWells multisegment_wells(wells, wells_ecl, current_time_step);
const WellModel well_model(wells, wells_ecl, current_time_step);
well_state.init(multisegment_wells, state, prev_well_state);
well_state.init(well_model, state, prev_well_state);
// give the polymer and surfactant simulators the chance to do their stuff
Base::asImpl().handleAdditionalWellInflow(timer, wells_manager, well_state, wells);
@ -133,7 +133,7 @@ namespace Opm
// Run a multiple steps of the solver depending on the time step control.
solver_timer.start();
auto solver = createSolver(multisegment_wells);
auto solver = createSolver(well_model);
// If sub stepping is enabled allow the solver to sub cycle
// in case the report steps are too large for the solver to converge