From: Timo Heister Date: Mon, 23 Jan 2017 17:45:21 +0000 (-0500) Subject: add missing const to arguments in time_stepping.h X-Git-Tag: v8.5.0-rc1~209^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3840%2Fhead;p=dealii.git add missing const to arguments in time_stepping.h --- diff --git a/include/deal.II/base/time_stepping.h b/include/deal.II/base/time_stepping.h index d1b055e2ea..ca6dcd23de 100644 --- a/include/deal.II/base/time_stepping.h +++ b/include/deal.II/base/time_stepping.h @@ -133,7 +133,7 @@ namespace TimeStepping /** * Purely virtual method used to initialize the Runge-Kutta method. */ - virtual void initialize(runge_kutta_method method) = 0; + virtual void initialize(const runge_kutta_method method) = 0; /** * This function is used to advance from time @p t to t+ @p delta_t. @p F @@ -215,12 +215,12 @@ namespace TimeStepping /** * Constructor. This function calls initialize(runge_kutta_method). */ - ExplicitRungeKutta(runge_kutta_method method); + ExplicitRungeKutta(const runge_kutta_method method); /** * Initialize the explicit Runge-Kutta method. */ - void initialize(runge_kutta_method method); + void initialize(const runge_kutta_method method); /** * This function is used to advance from time @p t to t+ @p delta_t. @p f @@ -469,7 +469,7 @@ namespace TimeStepping /** * Initialize the embedded explicit Runge-Kutta method. */ - void initialize(runge_kutta_method method); + void initialize(const runge_kutta_method method); /** * This function is used to advance from time @p t to t+ @p delta_t. @p f diff --git a/include/deal.II/base/time_stepping.templates.h b/include/deal.II/base/time_stepping.templates.h index 509c1b3324..db4f10a41e 100644 --- a/include/deal.II/base/time_stepping.templates.h +++ b/include/deal.II/base/time_stepping.templates.h @@ -52,7 +52,7 @@ namespace TimeStepping // ---------------------------------------------------------------------- template - ExplicitRungeKutta::ExplicitRungeKutta(runge_kutta_method method) + ExplicitRungeKutta::ExplicitRungeKutta(const runge_kutta_method method) { initialize(method); } @@ -60,7 +60,7 @@ namespace TimeStepping template - void ExplicitRungeKutta::initialize(runge_kutta_method method) + void ExplicitRungeKutta::initialize(const runge_kutta_method method) { status.method = method; @@ -201,9 +201,9 @@ namespace TimeStepping // ---------------------------------------------------------------------- template - ImplicitRungeKutta::ImplicitRungeKutta(runge_kutta_method method, - unsigned int max_it, - double tolerance) + ImplicitRungeKutta::ImplicitRungeKutta(const runge_kutta_method method, + const unsigned int max_it, + const double tolerance) : RungeKutta (), skip_linear_combi(false), @@ -216,7 +216,7 @@ namespace TimeStepping template - void ImplicitRungeKutta::initialize(runge_kutta_method method) + void ImplicitRungeKutta::initialize(const runge_kutta_method method) { status.method = method; @@ -399,13 +399,13 @@ namespace TimeStepping template EmbeddedExplicitRungeKutta::EmbeddedExplicitRungeKutta - (runge_kutta_method method, - double coarsen_param, - double refine_param, - double min_delta, - double max_delta, - double refine_tol, - double coarsen_tol) + (const runge_kutta_method method, + const double coarsen_param, + const double refine_param, + const double min_delta, + const double max_delta, + const double refine_tol, + const double coarsen_tol) : coarsen_param(coarsen_param), refine_param(refine_param), @@ -422,7 +422,7 @@ namespace TimeStepping template - void EmbeddedExplicitRungeKutta::initialize(runge_kutta_method method) + void EmbeddedExplicitRungeKutta::initialize(const runge_kutta_method method) { status.method = method; @@ -776,12 +776,13 @@ namespace TimeStepping template - void EmbeddedExplicitRungeKutta::set_time_adaptation_parameters(double coarsen_param_, - double refine_param_, - double min_delta_, - double max_delta_, - double refine_tol_, - double coarsen_tol_) + void EmbeddedExplicitRungeKutta::set_time_adaptation_parameters( + const double coarsen_param_, + const double refine_param_, + const double min_delta_, + const double max_delta_, + const double refine_tol_, + const double coarsen_tol_) { coarsen_param = coarsen_param_; refine_param = refine_param_;