From d994d133435e3176357af96ac80af11033d0d6a8 Mon Sep 17 00:00:00 2001 From: Rene Gassmoeller Date: Sat, 20 Aug 2016 21:54:17 -0600 Subject: [PATCH] Slight optimization --- source/grid/manifold_lib.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/grid/manifold_lib.cc b/source/grid/manifold_lib.cc index 44cd8b651b..69ace8735f 100644 --- a/source/grid/manifold_lib.cc +++ b/source/grid/manifold_lib.cc @@ -196,7 +196,7 @@ get_intermediate_point (const Point &p1, const Tensor<1,spacedim> e1 = v1/r1; const Tensor<1,spacedim> e2 = v2/r2; - if ((e1 - e2).norm() < tol) + if ((e1 - e2).norm_square() < tol*tol) return Point(center + w*v2 + (1-w)*v1); // Find the angle gamma described by v1 and v2: @@ -211,7 +211,8 @@ get_intermediate_point (const Point &p1, Assert( n.norm() > 0, ExcInternalError("n should be different from the null vector." "Probably this means v1==v2 or v2==0.")); - n = n/n.norm(); + + n /= n.norm(); // Find the point Q along O,v1 such that // P1,V,P2 has measure sigma. -- 2.39.5