From fcd541a1c1b2d54497f60ffb8f2ce2fe4650ed88 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Tue, 10 May 2016 12:44:45 +0200 Subject: [PATCH] removing the rebundant ms_wells_ in BlackoilMultiSegmentModel --- opm/autodiff/BlackoilMultiSegmentModel.hpp | 2 -- opm/autodiff/BlackoilMultiSegmentModel_impl.hpp | 7 ------- .../SimulatorFullyImplicitBlackoilMultiSegment_impl.hpp | 6 +++--- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/opm/autodiff/BlackoilMultiSegmentModel.hpp b/opm/autodiff/BlackoilMultiSegmentModel.hpp index 3fc700c18..c6b337d3a 100644 --- a/opm/autodiff/BlackoilMultiSegmentModel.hpp +++ b/opm/autodiff/BlackoilMultiSegmentModel.hpp @@ -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; diff --git a/opm/autodiff/BlackoilMultiSegmentModel_impl.hpp b/opm/autodiff/BlackoilMultiSegmentModel_impl.hpp index 6ee84a3d5..0c7858b65 100644 --- a/opm/autodiff/BlackoilMultiSegmentModel_impl.hpp +++ b/opm/autodiff/BlackoilMultiSegmentModel_impl.hpp @@ -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()); } diff --git a/opm/autodiff/SimulatorFullyImplicitBlackoilMultiSegment_impl.hpp b/opm/autodiff/SimulatorFullyImplicitBlackoilMultiSegment_impl.hpp index 0d3ad6007..934d8e6e6 100644 --- a/opm/autodiff/SimulatorFullyImplicitBlackoilMultiSegment_impl.hpp +++ b/opm/autodiff/SimulatorFullyImplicitBlackoilMultiSegment_impl.hpp @@ -113,9 +113,9 @@ namespace Opm const std::vector& 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