since time iteration was moved to the Simulator class, pass PolymerInflowInterface

as a shared_ptr.
This commit is contained in:
Liu Ming 2014-10-08 14:45:42 +08:00
parent e56ba2afae
commit f3553d73c7
2 changed files with 6 additions and 5 deletions

View File

@ -85,7 +85,7 @@ namespace Opm
const PolymerPropsAd& polymer_props, const PolymerPropsAd& polymer_props,
const RockCompressibility* rock_comp_props, const RockCompressibility* rock_comp_props,
NewtonIterationBlackoilInterface& linsolver, NewtonIterationBlackoilInterface& linsolver,
PolymerInflowInterface& polymer_inflow, std::shared_ptr<PolymerInflowInterface> polymer_inflow,
const double* gravity, const double* gravity,
const bool disgas, const bool disgas,
const bool vapoil, const bool vapoil,

View File

@ -81,7 +81,7 @@ namespace Opm
const PolymerPropsAd& polymer_props, const PolymerPropsAd& polymer_props,
const RockCompressibility* rock_comp_props, const RockCompressibility* rock_comp_props,
NewtonIterationBlackoilInterface& linsolver, NewtonIterationBlackoilInterface& linsolver,
PolymerInflowInterface& polymer_inflow, std::shared_ptr<PolymerInflowInterface> polymer_inflow,
const double* gravity, const double* gravity,
bool has_disgas, bool has_disgas,
bool has_vapoil, bool has_vapoil,
@ -115,7 +115,7 @@ namespace Opm
// Solvers // Solvers
const DerivedGeology& geo_; const DerivedGeology& geo_;
NewtonIterationBlackoilInterface& solver_; NewtonIterationBlackoilInterface& solver_;
PolymerInflowInterface& polymer_inflow_; std::shared_ptr<PolymerInflowInterface> polymer_inflow,
// Misc. data // Misc. data
std::vector<int> allcells_; std::vector<int> allcells_;
const bool has_disgas_; const bool has_disgas_;
@ -147,7 +147,7 @@ namespace Opm
const PolymerPropsAd& polymer_props, const PolymerPropsAd& polymer_props,
const RockCompressibility* rock_comp_props, const RockCompressibility* rock_comp_props,
NewtonIterationBlackoilInterface& linsolver, NewtonIterationBlackoilInterface& linsolver,
const PolymerInflowInterface& polymer_inflow; std::shared_ptr<PolymerInflowInterface> polymer_inflow,
const double* gravity, const double* gravity,
const bool has_disgas, const bool has_disgas,
const bool has_vapoil, const bool has_vapoil,
@ -240,7 +240,7 @@ namespace Opm
const PolymerPropdAd& polymer_props, const PolymerPropdAd& polymer_props,
const RockCompressibility* rock_comp_props, const RockCompressibility* rock_comp_props,
NewtonIterationBlackoilInterface& linsolver, NewtonIterationBlackoilInterface& linsolver,
PolymerInflowInterface& polymer_inflow, std::shared_ptr<PolymerInflowInterface> polymer_inflow,
const double* gravity, const double* gravity,
const bool has_disgas, const bool has_disgas,
const bool has_vapoil, const bool has_vapoil,
@ -357,6 +357,7 @@ namespace Opm
// compute polymer inflow // compute polymer inflow
if (has_polymer_) { if (has_polymer_) {
std::vector<double> polymer_inflow_c(Opm::UgGridHelpers::numCells(grid_)); std::vector<double> polymer_inflow_c(Opm::UgGridHelpers::numCells(grid_));
polymer_inflow_.reset(new PolymerFromDeck(deck, wells, Opm::UgGridHelpers::numCells(grid_)));
polymer_inflow_.getInflowValues(timer.simulationTimeElapsed(), polymer_inflow_.getInflowValues(timer.simulationTimeElapsed(),
timer.simulationTimeElapsed() + timer.currentStepLength(), timer.simulationTimeElapsed() + timer.currentStepLength(),
polymer_inflow_c); polymer_inflow_c);