From 7f88294ce0e1be02c06494ec15b92f96080234a7 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Fri, 31 May 2013 17:46:16 +0200
Subject: [PATCH] Use smooth gradient at 0

---
 dune/tectonic/ellipticenergy.hh | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/dune/tectonic/ellipticenergy.hh b/dune/tectonic/ellipticenergy.hh
index 6ac8fef6..36d5ec3c 100644
--- a/dune/tectonic/ellipticenergy.hh
+++ b/dune/tectonic/ellipticenergy.hh
@@ -32,21 +32,8 @@ template <int dim> class EllipticEnergy {
   void descentAtZero(SmallVector &ret) const {
     SmallVector const zero(0);
     // If there is a direction of descent, this is it
-    SmallVector d;
-    smoothGradient(zero, d);
-    d *= -1;
-
-    Interval<double> D;
-    phi->directionalSubDiff(zero, d, D);
-    double const nonlinearDecline = D[1];
-    double const smoothDecline = -(d * d);
-    double const combinedDecline = smoothDecline + nonlinearDecline;
-
-    if (combinedDecline < 0) {
-      ret = d;
-    } else {
-      ret = 0;
-    }
+    smoothGradient(zero, ret);
+    ret *= -1;
   }
 
   bool descentDirection(SmallVector const &x, SmallVector &ret) const {
-- 
GitLab