diff --git a/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer.hpp b/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer.hpp index f213958de..923c92041 100644 --- a/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer.hpp +++ b/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer.hpp @@ -121,7 +121,7 @@ namespace Opm Opm::DeckConstPtr& deck, const std::vector& threshold_pressures_by_face); - std::shared_ptr createSolver(const Wells* wells); + std::unique_ptr createSolver(const Wells* wells); void handleAdditionalWellInflow(SimulatorTimer& timer, WellsManager& wells_manager, diff --git a/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer_impl.hpp b/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer_impl.hpp index 3ca6a319d..29f4393d7 100644 --- a/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer_impl.hpp +++ b/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer_impl.hpp @@ -59,25 +59,25 @@ namespace Opm template auto SimulatorFullyImplicitBlackoilPolymer:: createSolver(const Wells* wells) - -> std::shared_ptr + -> std::unique_ptr { typedef typename Traits::Model Model; typedef typename Model::ModelParameters ModelParams; ModelParams modelParams( BaseType::param_ ); typedef NewtonSolver Solver; - auto model = std::make_shared(modelParams, - BaseType::grid_, - BaseType::props_, - BaseType::geo_, - BaseType::rock_comp_props_, - polymer_props_, - wells, - BaseType::solver_, - BaseType::has_disgas_, - BaseType::has_vapoil_, - has_polymer_, - BaseType::terminal_output_); + auto model = std::unique_ptr(new Model(modelParams, + BaseType::grid_, + BaseType::props_, + BaseType::geo_, + BaseType::rock_comp_props_, + polymer_props_, + wells, + BaseType::solver_, + BaseType::has_disgas_, + BaseType::has_vapoil_, + has_polymer_, + BaseType::terminal_output_)); if (!BaseType::threshold_pressures_by_face_.empty()) { model->setThresholdPressures(BaseType::threshold_pressures_by_face_); @@ -85,7 +85,7 @@ namespace Opm typedef typename Solver::SolverParameters SolverParams; SolverParams solverParams( BaseType::param_ ); - return std::make_shared(solverParams, model); + return std::unique_ptr(new Solver(solverParams, std::move(model))); } template