diff --git a/opm/simulators/linalg/istlsolverwrappers.hh b/opm/simulators/linalg/istlsolverwrappers.hh index 1c1e162a6..73501e6ac 100644 --- a/opm/simulators/linalg/istlsolverwrappers.hh +++ b/opm/simulators/linalg/istlsolverwrappers.hh @@ -80,7 +80,7 @@ namespace Opm::Linear { Preconditioner& parPreCond) \ { \ Scalar tolerance = Parameters::get(); \ - int maxIter = Parameters::get(); \ + int maxIter = Parameters::get(); \ \ int verbosity = 0; \ if (parOperator.overlap().myRank() == 0) \ @@ -135,7 +135,7 @@ public: Preconditioner& parPreCond) { Scalar tolerance = Parameters::get(); - int maxIter = Parameters::get(); + int maxIter = Parameters::get(); int verbosity = 0; if (parOperator.overlap().myRank() == 0) diff --git a/opm/simulators/linalg/linalgparameters.hh b/opm/simulators/linalg/linalgparameters.hh index f3ac5f014..da685bdf9 100644 --- a/opm/simulators/linalg/linalgparameters.hh +++ b/opm/simulators/linalg/linalgparameters.hh @@ -39,6 +39,10 @@ namespace Opm::Parameters { template struct LinearSolverAbsTolerance { using type = Properties::UndefinedProperty; }; +//! Maximum number of iterations eyecuted by the linear solver +template +struct LinearSolverMaxIterations { using type = Properties::UndefinedProperty; }; + /*! * \brief The size of the algebraic overlap of the linear solver. * diff --git a/opm/simulators/linalg/linalgproperties.hh b/opm/simulators/linalg/linalgproperties.hh index 205e157b2..aa25f99f1 100644 --- a/opm/simulators/linalg/linalgproperties.hh +++ b/opm/simulators/linalg/linalgproperties.hh @@ -45,10 +45,6 @@ struct PreconditionerWrapper { using type = UndefinedProperty; }; template struct LinearSolverScalar { using type = UndefinedProperty; }; -//! Maximum number of iterations eyecuted by the linear solver -template -struct LinearSolverMaxIterations { using type = UndefinedProperty; }; - //! The order of the sequential preconditioner template struct PreconditionerOrder { using type = UndefinedProperty; }; diff --git a/opm/simulators/linalg/parallelamgbackend.hh b/opm/simulators/linalg/parallelamgbackend.hh index 1c225f6d3..d543b6169 100644 --- a/opm/simulators/linalg/parallelamgbackend.hh +++ b/opm/simulators/linalg/parallelamgbackend.hh @@ -210,7 +210,7 @@ protected: if (parOperator.overlap().myRank() == 0) verbosity = Parameters::get(); bicgstabSolver->setVerbosity(verbosity); - bicgstabSolver->setMaxIterations(Parameters::get()); + bicgstabSolver->setMaxIterations(Parameters::get()); bicgstabSolver->setLinearOperator(&parOperator); bicgstabSolver->setRhs(this->overlappingb_); diff --git a/opm/simulators/linalg/parallelbasebackend.hh b/opm/simulators/linalg/parallelbasebackend.hh index eaab87507..0b65bdf60 100644 --- a/opm/simulators/linalg/parallelbasebackend.hh +++ b/opm/simulators/linalg/parallelbasebackend.hh @@ -158,7 +158,7 @@ public: ("The maximum accepted error of the norm of the residual"); Parameters::registerParam ("The size of the algebraic overlap for the linear solver"); - Parameters::registerParam + Parameters::registerParam ("The maximum number of iterations of the linear solver"); Parameters::registerParam ("The verbosity level of the linear solver"); @@ -454,14 +454,15 @@ template struct PreconditionerWrapper { using type = Opm::Linear::PreconditionerWrapperILU; }; -//! set the default number of maximum iterations for the linear solver -template -struct LinearSolverMaxIterations { static constexpr int value = 1000; }; - } // namespace Opm::Properties namespace Opm::Parameters { +//! set the default number of maximum iterations for the linear solver +template +struct LinearSolverMaxIterations +{ static constexpr int value = 1000; }; + //! set the default overlap size to 2 template struct LinearSolverOverlapSize diff --git a/opm/simulators/linalg/parallelbicgstabbackend.hh b/opm/simulators/linalg/parallelbicgstabbackend.hh index a527c8c28..f03ed609c 100644 --- a/opm/simulators/linalg/parallelbicgstabbackend.hh +++ b/opm/simulators/linalg/parallelbicgstabbackend.hh @@ -154,7 +154,7 @@ protected: if (parOperator.overlap().myRank() == 0) verbosity = Parameters::get(); bicgstabSolver->setVerbosity(verbosity); - bicgstabSolver->setMaxIterations(Parameters::get()); + bicgstabSolver->setMaxIterations(Parameters::get()); bicgstabSolver->setLinearOperator(&parOperator); bicgstabSolver->setRhs(this->overlappingb_);