From cb535c9e15bcaa413856c93864904e6e5c78d0a1 Mon Sep 17 00:00:00 2001
From: mattijs <mattijs>
Date: Wed, 9 Jan 2013 11:06:16 +0000
Subject: [PATCH] GIT: pointEdgePoint: reverting incorrect commit

---
 .../PointEdgeWave/pointEdgePointI.H           | 59 +------------------
 1 file changed, 2 insertions(+), 57 deletions(-)

diff --git a/src/meshTools/algorithms/PointEdgeWave/pointEdgePointI.H b/src/meshTools/algorithms/PointEdgeWave/pointEdgePointI.H
index 3510e810a4a..f9fe6ca9e39 100644
--- a/src/meshTools/algorithms/PointEdgeWave/pointEdgePointI.H
+++ b/src/meshTools/algorithms/PointEdgeWave/pointEdgePointI.H
@@ -59,63 +59,8 @@ inline bool Foam::pointEdgePoint::update
 
     if ((diff < SMALL) || ((distSqr_ > SMALL) && (diff/distSqr_ < tol)))
     {
-        // don't propagate small changes unless origins differ
-        scalar originDiff2 = magSqr(origin_-w2.origin());
-        if
-        (
-            originDiff2 < SMALL
-         || ((distSqr_ > SMALL) && (originDiff2/distSqr_ < tol))
-        )
-        {
-            return false;
-        }
-        else
-        {
-            // Different origin. Choose lexical ordering.
-            bool w2less = false;
-            for (direction cmp = 0; cmp < vector::nComponents; cmp++)
-            {
-                scalar d = w2.origin()[cmp]-origin_[cmp];
-                scalar magD = mag(d);
-
-                if
-                (
-                    magD < SMALL
-                 || ((distSqr_ > SMALL) && (magD/distSqr_ > tol))
-                )
-                {
-                    // Small difference. Test next component.
-                }
-                else if (d < 0)
-                {
-                    w2less = true;
-                    break;
-                }
-                else if (d > 0)
-                {
-                    break;
-                }
-            }
-
-            if (w2less)
-            {
-                // update with new values
-                distSqr_ = dist2;
-                origin_ = w2.origin();
-                return true;
-            }
-            else
-            {
-                Pout<< "** same distance. at:" << pt << nl
-                    << "    old distance:" << Foam::sqr(distSqr_) << nl
-                    << "    new distance:" << Foam::sqr(dist2) << nl
-                    << "    old origin:" << origin_ << nl
-                    << "    new origin:" << w2.origin() << nl
-                    << endl;
-                Pout<< "** w2 looses." << endl;
-                return false;
-            }
-        }
+        // don't propagate small changes
+        return false;
     }
     else
     {
-- 
GitLab