From: Timo Heister Date: Thu, 3 Feb 2022 16:02:57 +0000 (-0500) Subject: SolverControl: make constructors explicit X-Git-Tag: v9.4.0-rc1~533^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13335%2Fhead;p=dealii.git SolverControl: make constructors explicit --- diff --git a/include/deal.II/lac/solver_control.h b/include/deal.II/lac/solver_control.h index 3f94de2e3d..47ff834133 100644 --- a/include/deal.II/lac/solver_control.h +++ b/include/deal.II/lac/solver_control.h @@ -90,7 +90,6 @@ public: * the last step are stored in this object and can be recovered upon * catching an exception of this class. */ - class NoConvergence : public dealii::ExceptionBase { public: @@ -147,10 +146,10 @@ public: * specifies the whether the final result is logged to @p deallog. Default * is yes. */ - SolverControl(const unsigned int n = 100, - const double tol = 1.e-10, - const bool log_history = false, - const bool log_result = true); + explicit SolverControl(const unsigned int n = 100, + const double tol = 1.e-10, + const bool log_history = false, + const bool log_result = true); /** * Virtual destructor is needed as there are virtual functions in this @@ -428,11 +427,11 @@ public: * have the same meaning as those of the constructor of the SolverControl * constructor. */ - ReductionControl(const unsigned int maxiter = 100, - const double tolerance = 1.e-10, - const double reduce = 1.e-2, - const bool log_history = false, - const bool log_result = true); + explicit ReductionControl(const unsigned int maxiter = 100, + const double tolerance = 1.e-10, + const double reduce = 1.e-2, + const bool log_history = false, + const bool log_result = true); /** * Initialize with a SolverControl object. The result will emulate @@ -515,10 +514,10 @@ public: * Constructor. Provide exactly the same arguments as the constructor of * the SolverControl class. */ - IterationNumberControl(const unsigned int maxiter = 100, - const double tolerance = 1e-12, - const bool log_history = false, - const bool log_result = true); + explicit IterationNumberControl(const unsigned int maxiter = 100, + const double tolerance = 1e-12, + const bool log_history = false, + const bool log_result = true); /** * Initialize with a SolverControl object. The result will emulate @@ -570,11 +569,11 @@ public: * convergence. Other arguments have the same meaning as those of the * constructor of the SolverControl. */ - ConsecutiveControl(const unsigned int maxiter = 100, - const double tolerance = 1.e-10, - const unsigned int n_consecutive_iterations = 2, - const bool log_history = false, - const bool log_result = false); + explicit ConsecutiveControl(const unsigned int maxiter = 100, + const double tolerance = 1.e-10, + const unsigned int n_consecutive_iterations = 2, + const bool log_history = false, + const bool log_result = false); /** * Initialize with a SolverControl object. The result will emulate