From: Wolfgang Bangerth Date: Fri, 6 Feb 2015 03:16:50 +0000 (-0600) Subject: Either make implicit casts from Tensor<1,dim> to Point explicit, or correct... X-Git-Tag: v8.3.0-rc1~492^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F505%2Fhead;p=dealii.git Either make implicit casts from Tensor<1,dim> to Point explicit, or correct the data type of where we store the result. --- diff --git a/source/numerics/derivative_approximation.cc b/source/numerics/derivative_approximation.cc index 835807708a..7c7653d18b 100644 --- a/source/numerics/derivative_approximation.cc +++ b/source/numerics/derivative_approximation.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -863,8 +863,8 @@ namespace DerivativeApproximation // direction between // the centers of two // cells - Point y = neighbor_center - this_center; - const double distance = std::sqrt(y.square()); + Tensor<1,dim> y = neighbor_center - this_center; + const double distance = y.norm(); // normalize y y /= distance; // *** note that unlike in