From cf9d872e0e34245c075ed777fba38e635ca6e6aa Mon Sep 17 00:00:00 2001 From: Jonathan Youett <youett@math.fu-berlin.de> Date: Tue, 9 Oct 2018 11:12:39 +0200 Subject: [PATCH] Deprecate setSmoother taking raw pointer and make them non-virtual --- dune/solvers/iterationsteps/multigridstep.hh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dune/solvers/iterationsteps/multigridstep.hh b/dune/solvers/iterationsteps/multigridstep.hh index 7b22bf08..a1dce7d6 100644 --- a/dune/solvers/iterationsteps/multigridstep.hh +++ b/dune/solvers/iterationsteps/multigridstep.hh @@ -153,7 +153,8 @@ namespace Dune { virtual void setMGType(int mu, int nu1, int nu2); /** \brief Set the smoother iteration step */ - virtual void setSmoother(LinearStepType* smoother) + DUNE_DEPRECATED_MSG("Consider setting the smoother via smart pointer, reference or temporaries instead.") + void setSmoother(LinearStepType* smoother) { presmootherDefault_ = postsmootherDefault_ = Dune::stackobject_to_shared_ptr(*smoother); @@ -170,8 +171,9 @@ namespace Dune { } /** \brief Set pre- and post smoothers individually */ - virtual void setSmoother(LinearStepType* preSmoother, - LinearStepType* postSmoother) + DUNE_DEPRECATED_MSG("Consider setting the smoother via smart pointer, reference or temporaries instead.") + void setSmoother(LinearStepType* preSmoother, + LinearStepType* postSmoother) { presmootherDefault_ = Dune::stackobject_to_shared_ptr(*preSmoother); postsmootherDefault_ = Dune::stackobject_to_shared_ptr(*postSmoother); @@ -188,7 +190,8 @@ namespace Dune { } /** \brief Set the smoother iteration step for a particular level */ - virtual void setSmoother(LinearStepType* smoother, std::size_t level) + DUNE_DEPRECATED_MSG("Consider setting the smoother via smart pointer, reference or temporaries instead.") + void setSmoother(LinearStepType* smoother, std::size_t level) { levelWiseSmoothers_[level] = Dune::stackobject_to_shared_ptr(*smoother); } -- GitLab