move NewtonVerbose to TypeTag-free parameter system

This commit is contained in:
Arne Morten Kvarving 2024-07-05 17:49:51 +02:00
parent b76dd13afc
commit 36b05f9295
2 changed files with 3 additions and 8 deletions

View File

@ -81,10 +81,6 @@ struct NewtonConvergenceWriter<TypeTag, TTag::NewtonMethod> { using type = NullC
namespace Opm::Parameters {
template<class TypeTag>
struct NewtonVerbose<TypeTag, Properties::TTag::NewtonMethod>
{ static constexpr bool value = true; };
template<class TypeTag>
struct NewtonWriteConvergence<TypeTag, Properties::TTag::NewtonMethod>
{ static constexpr bool value = false; };
@ -166,7 +162,7 @@ public:
{
LinearSolverBackend::registerParameters();
Parameters::registerParam<TypeTag, Parameters::NewtonVerbose>
Parameters::Register<Parameters::NewtonVerbose>
("Specify whether the Newton method should inform "
"the user about its progress or not");
Parameters::registerParam<TypeTag, Parameters::NewtonWriteConvergence>
@ -544,7 +540,7 @@ protected:
*/
bool verbose_() const
{
return Parameters::get<TypeTag, Parameters::NewtonVerbose>() && (comm_.rank() == 0);
return Parameters::Get<Parameters::NewtonVerbose>() && (comm_.rank() == 0);
}
/*!

View File

@ -28,8 +28,7 @@
namespace Opm::Parameters {
//! Specifies whether the Newton method should print messages or not
template<class TypeTag, class MyTypeTag>
struct NewtonVerbose { using type = Properties::UndefinedProperty; };
struct NewtonVerbose { static constexpr bool value = true; };
//! Specifies whether the convergence rate and the global residual
//! gets written out to disk for every Newton iteration