From 3dbc4e346468f1939f9a7d053b0e46e1cda7ab46 Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de> Date: Fri, 9 Feb 2018 14:37:04 +0100 Subject: [PATCH] [newton] Deprecate old newton classes * NewtonMethod * NewtonController --- dumux/nonlinear/newtoncontroller.hh | 5 ++++- dumux/nonlinear/newtonmethod.hh | 5 ++++- dumux/nonlinear/staggerednewtoncontroller.hh | 6 +++++- .../compositional/privarswitchnewtoncontroller.hh | 6 +++++- dumux/porousmediumflow/richards/newtoncontroller.hh | 6 +++++- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/dumux/nonlinear/newtoncontroller.hh b/dumux/nonlinear/newtoncontroller.hh index 0d1df97b0a..a64002a69d 100644 --- a/dumux/nonlinear/newtoncontroller.hh +++ b/dumux/nonlinear/newtoncontroller.hh @@ -35,6 +35,9 @@ #include <dumux/common/exceptions.hh> #include <dumux/common/timeloop.hh> +#include <dune/common/deprecated.hh> + +#warning "This file is deprecated. Use NewtonSolver instead." namespace Dumux { @@ -49,7 +52,7 @@ namespace Dumux { */ template <class Scalar, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator> > -class NewtonController +class DUNE_DEPRECATED_MSG("Use NewtonSolver instead.") NewtonController { public: diff --git a/dumux/nonlinear/newtonmethod.hh b/dumux/nonlinear/newtonmethod.hh index 812702a252..7264b3cedf 100644 --- a/dumux/nonlinear/newtonmethod.hh +++ b/dumux/nonlinear/newtonmethod.hh @@ -35,6 +35,9 @@ #include <dumux/common/exceptions.hh> #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> +#include <dune/common/deprecated.hh> + +#warning "This file is deprecated. Use NewtonSolver instead." namespace Dumux { @@ -48,7 +51,7 @@ namespace Dumux { * \tparam LinearSolver the linear solver used to solve one iteration */ template <class NewtonController, class JacobianAssembler, class LinearSolver> -class NewtonMethod +class DUNE_DEPRECATED_MSG("Use NewtonSolver instead.") NewtonMethod { //! provide an interface as a form of type erasure //! this is the minimal requirements a convergence write passed to a newton method has to fulfill diff --git a/dumux/nonlinear/staggerednewtoncontroller.hh b/dumux/nonlinear/staggerednewtoncontroller.hh index 634475d351..bedcf6d4ad 100644 --- a/dumux/nonlinear/staggerednewtoncontroller.hh +++ b/dumux/nonlinear/staggerednewtoncontroller.hh @@ -34,6 +34,9 @@ #include <dumux/nonlinear/newtoncontroller.hh> #include <dumux/linear/linearsolveracceptsmultitypematrix.hh> #include <dumux/linear/matrixconverter.hh> +#include <dune/common/deprecated.hh> + +#warning "This file is deprecated. Use NewtonSolver instead." namespace Dumux { @@ -45,7 +48,8 @@ namespace Dumux { template <class Scalar, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator> > -class StaggeredNewtonController : public NewtonController<Scalar, Comm> +class DUNE_DEPRECATED_MSG("Use NewtonSolver instead.") +StaggeredNewtonController : public NewtonController<Scalar, Comm> { using ParentType = NewtonController<Scalar, Comm>; diff --git a/dumux/porousmediumflow/compositional/privarswitchnewtoncontroller.hh b/dumux/porousmediumflow/compositional/privarswitchnewtoncontroller.hh index 5f3e059877..e91a144758 100644 --- a/dumux/porousmediumflow/compositional/privarswitchnewtoncontroller.hh +++ b/dumux/porousmediumflow/compositional/privarswitchnewtoncontroller.hh @@ -32,6 +32,9 @@ #include <dumux/common/parameters.hh> #include <dumux/discretization/methods.hh> #include <dumux/nonlinear/newtoncontroller.hh> +#include <dune/common/deprecated.hh> + +#warning "This file is deprecated. Use PriVarSwitchNewtonSolver instead." namespace Dumux { @@ -44,7 +47,8 @@ namespace Dumux * \todo Implement for volume variable caching enabled */ template <class TypeTag> -class PriVarSwitchNewtonController : public NewtonController<typename GET_PROP_TYPE(TypeTag, Scalar)> +class DUNE_DEPRECATED_MSG("Use PriVarSwitchNewtonSolver instead.") +PriVarSwitchNewtonController : public NewtonController<typename GET_PROP_TYPE(TypeTag, Scalar)> { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); using ParentType = NewtonController<Scalar>; diff --git a/dumux/porousmediumflow/richards/newtoncontroller.hh b/dumux/porousmediumflow/richards/newtoncontroller.hh index 5ff4807f36..7e8565275b 100644 --- a/dumux/porousmediumflow/richards/newtoncontroller.hh +++ b/dumux/porousmediumflow/richards/newtoncontroller.hh @@ -26,6 +26,9 @@ #include <dumux/common/properties.hh> #include <dumux/nonlinear/newtoncontroller.hh> +#include <dune/common/deprecated.hh> + +#warning "This file is deprecated. Use RichardsNewtonSolver instead." namespace Dumux { /*! @@ -39,7 +42,8 @@ namespace Dumux { * or from possible ModelTraits. */ template <class TypeTag> -class RichardsNewtonController : public NewtonController<typename GET_PROP_TYPE(TypeTag, Scalar)> +class DUNE_DEPRECATED_MSG("Use RichardsNewtonSolver instead.") +RichardsNewtonController : public NewtonController<typename GET_PROP_TYPE(TypeTag, Scalar)> { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); using ParentType = NewtonController<Scalar>; -- GitLab