diff --git a/opm/models/nonlinear/newtonmethod.hh b/opm/models/nonlinear/newtonmethod.hh index 7b88fd196..b87daf95a 100644 --- a/opm/models/nonlinear/newtonmethod.hh +++ b/opm/models/nonlinear/newtonmethod.hh @@ -27,24 +27,25 @@ #ifndef EWOMS_NEWTON_METHOD_HH #define EWOMS_NEWTON_METHOD_HH -#include "nullconvergencewriter.hh" - -#include "newtonmethodproperties.hh" +#include +#include +#include #include #include #include + +#include +#include +#include + #include #include #include -#include -#include -#include - #include #include @@ -78,8 +79,6 @@ struct NewtonConvergenceWriter { using type = NullC template struct NewtonWriteConvergence { static constexpr bool value = false; }; template -struct NewtonVerbose { static constexpr bool value = true; }; -template struct NewtonTolerance { using type = GetPropType; @@ -100,6 +99,14 @@ struct NewtonMaxIterations { static constexpr int v } // namespace Opm::Properties +namespace Opm::Parameters { + +template +struct NewtonVerbose +{ static constexpr bool value = true; }; + +} // namespace Opm::Parameters + namespace Opm { /*! * \ingroup Newton @@ -151,7 +158,7 @@ public: { LinearSolverBackend::registerParameters(); - Parameters::registerParam + Parameters::registerParam ("Specify whether the Newton method should inform " "the user about its progress or not"); Parameters::registerParam @@ -529,7 +536,7 @@ protected: */ bool verbose_() const { - return Parameters::get() && (comm_.rank() == 0); + return Parameters::get() && (comm_.rank() == 0); } /*! diff --git a/opm/models/nonlinear/newtonmethodparameters.hh b/opm/models/nonlinear/newtonmethodparameters.hh new file mode 100644 index 000000000..ee8b39c9b --- /dev/null +++ b/opm/models/nonlinear/newtonmethodparameters.hh @@ -0,0 +1,36 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . + + Consult the COPYING file in the top-level source directory of this + module for the precise wording of the license and the list of + copyright holders. +*/ +#ifndef EWOMS_NEWTON_METHOD_PARAMETERS_HH +#define EWOMS_NEWTON_METHOD_PARAMETERS_HH + +#include + +namespace Opm::Parameters { + +//! Specifies whether the Newton method should print messages or not +template +struct NewtonVerbose { using type = Properties::UndefinedProperty; }; + +} // end namespace Opm::Parameters + +#endif diff --git a/opm/models/nonlinear/newtonmethodproperties.hh b/opm/models/nonlinear/newtonmethodproperties.hh index 8886484e7..31e77e856 100644 --- a/opm/models/nonlinear/newtonmethodproperties.hh +++ b/opm/models/nonlinear/newtonmethodproperties.hh @@ -20,11 +20,11 @@ module for the precise wording of the license and the list of copyright holders. */ -#ifndef EWOMS_NEWTON_METHOD_POPERTIES_HH -#define EWOMS_NEWTON_METHOD_POPERTIES_HH +#ifndef EWOMS_NEWTON_METHOD_PROPERTIES_HH +#define EWOMS_NEWTON_METHOD_PROPERTIES_HH #include -#include + namespace Opm::Properties { //! Specifies the type of the actual Newton method @@ -35,10 +35,6 @@ struct NewtonMethod { using type = UndefinedProperty; }; template struct Linearizer { using type = UndefinedProperty; }; -//! Specifies whether the Newton method should print messages or not -template -struct NewtonVerbose { using type = UndefinedProperty; }; - //! Specifies the type of the class which writes out the Newton convergence template struct NewtonConvergenceWriter { using type = UndefinedProperty; }; @@ -82,6 +78,6 @@ struct NewtonTargetIterations { using type = UndefinedProperty; }; template struct NewtonMaxIterations { using type = UndefinedProperty; }; -} // end namespace Opm::Properties +} // end namespace Opm::Properties #endif