From 9221669c91a94426da746cebb6495f7dc217589a Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Fri, 23 Mar 2012 14:46:01 +0100
Subject: [PATCH] Comply with gcc 4.7

In particular, do not create references to temporaries
---
 src/compute_state.cc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/compute_state.cc b/src/compute_state.cc
index 599c0de4..4580c459 100644
--- a/src/compute_state.cc
+++ b/src/compute_state.cc
@@ -4,9 +4,10 @@
 #include <dune/common/fmatrix.hh>
 #include <dune/fufem/interval.hh>
 
-#include <dune/tectonic/mydirectionalconvexfunction.hh>
 #include <dune/tnnmg/problem-classes/bisection.hh>
 
+#include <dune/tectonic/mydirectionalconvexfunction.hh>
+
 #include "compute_state.hh"
 
 // The nonlinearity exp(-x)
@@ -34,8 +35,11 @@ class DecayingExponential {
 
 double compute_state_update_bisection(double h, double unorm, double L,
                                       double old_state) {
+  DecayingExponential::VectorType const start(0);
+  DecayingExponential::VectorType const direction(1);
+  DecayingExponential const phi(h);
   MyDirectionalConvexFunction<DecayingExponential> const J(
-      1.0, old_state - unorm / L, DecayingExponential(h), 0, 1);
+      1.0, old_state - unorm / L, phi, start, direction);
   int bisectionsteps = 0;
   Bisection const bisection(0.0, 1.0, 1e-12, true, 0);    // TODO
   return bisection.minimize(J, 0.0, 0.0, bisectionsteps); // TODO
-- 
GitLab