]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add missing const to arguments in time_stepping.h 3840/head
authorTimo Heister <timo.heister@gmail.com>
Mon, 23 Jan 2017 17:45:21 +0000 (12:45 -0500)
committerTimo Heister <timo.heister@gmail.com>
Mon, 23 Jan 2017 17:45:21 +0000 (12:45 -0500)
include/deal.II/base/time_stepping.h
include/deal.II/base/time_stepping.templates.h

index d1b055e2eac5decfc100037c6f4d7b6d229b9de8..ca6dcd23dece5a32f078d1c1bf07a4644b612304 100644 (file)
@@ -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
index 509c1b332454d54531afae2d41a78e41e273b7bc..db4f10a41ef130bbefee823516b07b660eb8de8c 100644 (file)
@@ -52,7 +52,7 @@ namespace TimeStepping
   // ----------------------------------------------------------------------
 
   template <typename VectorType>
-  ExplicitRungeKutta<VectorType>::ExplicitRungeKutta(runge_kutta_method method)
+  ExplicitRungeKutta<VectorType>::ExplicitRungeKutta(const runge_kutta_method method)
   {
     initialize(method);
   }
@@ -60,7 +60,7 @@ namespace TimeStepping
 
 
   template <typename VectorType>
-  void ExplicitRungeKutta<VectorType>::initialize(runge_kutta_method method)
+  void ExplicitRungeKutta<VectorType>::initialize(const runge_kutta_method method)
   {
     status.method = method;
 
@@ -201,9 +201,9 @@ namespace TimeStepping
   // ----------------------------------------------------------------------
 
   template <typename VectorType>
-  ImplicitRungeKutta<VectorType>::ImplicitRungeKutta(runge_kutta_method method,
-                                                     unsigned int max_it,
-                                                     double tolerance)
+  ImplicitRungeKutta<VectorType>::ImplicitRungeKutta(const runge_kutta_method method,
+                                                     const unsigned int max_it,
+                                                     const double tolerance)
     :
     RungeKutta<VectorType> (),
     skip_linear_combi(false),
@@ -216,7 +216,7 @@ namespace TimeStepping
 
 
   template <typename VectorType>
-  void ImplicitRungeKutta<VectorType>::initialize(runge_kutta_method method)
+  void ImplicitRungeKutta<VectorType>::initialize(const runge_kutta_method method)
   {
     status.method = method;
 
@@ -399,13 +399,13 @@ namespace TimeStepping
 
   template <typename VectorType>
   EmbeddedExplicitRungeKutta<VectorType>::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 <typename VectorType>
-  void EmbeddedExplicitRungeKutta<VectorType>::initialize(runge_kutta_method method)
+  void EmbeddedExplicitRungeKutta<VectorType>::initialize(const runge_kutta_method method)
   {
     status.method = method;
 
@@ -776,12 +776,13 @@ namespace TimeStepping
 
 
   template <typename VectorType>
-  void EmbeddedExplicitRungeKutta<VectorType>::set_time_adaptation_parameters(double coarsen_param_,
-      double refine_param_,
-      double min_delta_,
-      double max_delta_,
-      double refine_tol_,
-      double coarsen_tol_)
+  void EmbeddedExplicitRungeKutta<VectorType>::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_;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.