From e50a0fc7a521f6980e016feeec6943065c35486c Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Mon, 19 Sep 2011 15:40:59 +0200
Subject: [PATCH] Check for |u| = 0 instead of u = 0

If |u| is computed as 0, we should not divide by it (this appears to
happen even for u != 0)
---
 src/mynonlinearity.hh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mynonlinearity.hh b/src/mynonlinearity.hh
index 30185b79..d4e4bc74 100644
--- a/src/mynonlinearity.hh
+++ b/src/mynonlinearity.hh
@@ -32,7 +32,7 @@ class MyNonlinearity {
   // u and v are assumed to be non-zero
   void directionalSubDiff(VectorType const u, VectorType const v,
                           Interval<double> &D) const {
-    if (u == SmallVector(0.0)) {
+    if (u.two_norm() == 0) {
       D[0] = D[1] = func_.rightDifferential(0) * v.two_norm();
       return;
     }
-- 
GitLab