From 8ddd074962816b9fafea354a688843d79ab0058d Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 5 Feb 2015 21:16:50 -0600 Subject: [PATCH] Either make implicit casts from Tensor<1,dim> to Point explicit, or correct the data type of where we store the result. --- source/numerics/derivative_approximation.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.39.5