diff --git a/opm/simulators/linalg/PreconditionerWithUpdate.hpp b/opm/simulators/linalg/PreconditionerWithUpdate.hpp index 56451268d..6422aff4d 100644 --- a/opm/simulators/linalg/PreconditionerWithUpdate.hpp +++ b/opm/simulators/linalg/PreconditionerWithUpdate.hpp @@ -84,14 +84,14 @@ getDummyUpdateWrapper(Args&&... args) return std::make_shared>(std::forward(args)...); } -template +template class RebuildOnUpdatePreconditioner : public PreconditionerWithUpdate { public: - RebuildOnUpdatePreconditioner(const MatrixRef &mat_ref, const int n, const double w, const bool resort) - : orig_precond_(std::make_unique(mat_ref, n, w, resort)) - , mat_ref_(mat_ref) + RebuildOnUpdatePreconditioner(const Matrix &mat, const int n, const double w, const bool resort) + : orig_precond_(std::make_unique(mat, n, w, resort)) + , mat_(mat) , n_(n) , w_(w) , resort_(resort) @@ -124,22 +124,22 @@ public: // Rebuild the preconditioner on update void update() override { - orig_precond_ = std::make_unique(mat_ref_, n_, w_, resort_); + orig_precond_ = std::make_unique(mat_, n_, w_, resort_); } private: std::unique_ptr orig_precond_; - const MatrixRef &mat_ref_; + const Matrix &mat_; const int n_; const double w_; const bool resort_; }; -template -std::shared_ptr> -getRebuildOnUpdateWrapper(const MatrixRef &mat_ref, const int n, const double w, const bool resort) +template +std::shared_ptr> +getRebuildOnUpdateWrapper(const Matrix &mat, const int n, const double w, const bool resort) { - return std::make_shared>(mat_ref, n, w, resort); + return std::make_shared>(mat, n, w, resort); } } // namespace Dune