From 27179f7faf86d57a2ddece079d430a00e0bc381f Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 4 Feb 2015 21:41:05 -0600 Subject: [PATCH] Fix up places where we use Point for directions when we should be using Tensor<1,dim>. --- source/grid/grid_tools.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index db2e2ec8d4..87a550c93b 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -170,8 +170,8 @@ namespace GridTools std::vector::const_iterator pj = pi+1; for (unsigned int j=i+1; j max_distance_sqr)) - max_distance_sqr = (vertices[i]-vertices[j]).square(); + ((vertices[i]-vertices[j]).norm_square() > max_distance_sqr)) + max_distance_sqr = (vertices[i]-vertices[j]).norm_square(); }; return std::sqrt(max_distance_sqr); @@ -1020,14 +1020,14 @@ namespace GridTools Assert(first != used.end(), ExcInternalError()); unsigned int best_vertex = std::distance(used.begin(), first); - double best_dist = (p - vertices[best_vertex]).square(); + double best_dist = (p - vertices[best_vertex]).norm_square(); // For all remaining vertices, test // whether they are any closer for (unsigned int j = best_vertex+1; j < vertices.size(); j++) if (used[j]) { - double dist = (p - vertices[j]).square(); + double dist = (p - vertices[j]).norm_square(); if (dist < best_dist) { best_vertex = j; -- 2.39.5