From 46b107cabf16422299b98d34619e236a52c6c7e9 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Sat, 25 Feb 2012 21:37:17 +0100
Subject: [PATCH] Constness

---
 dune/tectonic/myblockproblem.hh | 8 ++++----
 src/one-body-sample.cc          | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh
index a74eda92..96fa97ac 100644
--- a/dune/tectonic/myblockproblem.hh
+++ b/dune/tectonic/myblockproblem.hh
@@ -65,7 +65,7 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
   };
 
   MyBlockProblem(Dune::ParameterTree const &parset,
-                 MyConvexProblemType &problem)
+                 const MyConvexProblemType &problem)
       : parset(parset), problem(problem) {
     bisection = Bisection(
         0.0, // acceptError: Stop if the search interval has
@@ -241,7 +241,7 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
 
 private:
   // problem data
-  MyConvexProblemType &problem;
+  MyConvexProblemType const &problem;
 
   // commonly used minimization stuff
   Bisection bisection;
@@ -262,7 +262,7 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject {
    * \param problem The problem including quadratic part and nonlinear part
    */
   IterateObject(Dune::ParameterTree const &parset, Bisection const &bisection,
-                MyConvexProblemType &problem)
+                MyConvexProblemType const &problem)
       : parset(parset), problem(problem), bisection(bisection) {}
 
 public:
@@ -331,7 +331,7 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject {
   Dune::ParameterTree const &parset;
 
   // problem data
-  MyConvexProblemType &problem;
+  MyConvexProblemType const &problem;
 
   // commonly used minimization stuff
   Bisection bisection;
diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 800e7611..6a2ea6bc 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -393,8 +393,8 @@ int main(int argc, char *argv[]) {
             assemble_nonlinearity<VectorType, OperatorType>(
                 grid->size(grid->maxLevel(), dim), parset, nodalIntegrals,
                 state, h);
-        MyConvexProblemType myConvexProblem(stiffnessMatrix,
-                                            *myGlobalNonlinearity, b1);
+        MyConvexProblemType const myConvexProblem(stiffnessMatrix,
+                                                  *myGlobalNonlinearity, b1);
         MyBlockProblemType myBlockProblem(parset, myConvexProblem);
         nonlinearGSStep.setProblem(u1_diff, myBlockProblem);
 
@@ -414,8 +414,8 @@ int main(int argc, char *argv[]) {
               assemble_nonlinearity<VectorType, OperatorType>(
                   grid->size(grid->maxLevel(), dim), parset, nodalIntegrals,
                   s4_new, h);
-          MyConvexProblemType myConvexProblem(stiffnessMatrix,
-                                              *myGlobalNonlinearity, b4);
+          MyConvexProblemType const myConvexProblem(stiffnessMatrix,
+                                                    *myGlobalNonlinearity, b4);
 
           MyBlockProblemType myBlockProblem(parset, myConvexProblem);
           multigridStep.setProblem(u4_diff, myBlockProblem);
-- 
GitLab