From 06ce64bf672be24d81dacf475340bca734bdd6da Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 4 Feb 2015 20:49:53 -0600 Subject: [PATCH] Fix up a place where we use Point for directions when we should be using Tensor<1,dim>. --- source/grid/grid_out.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/grid/grid_out.cc b/source/grid/grid_out.cc index c8a025f6e5..590155f723 100644 --- a/source/grid/grid_out.cc +++ b/source/grid/grid_out.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1999 - 2014 by the deal.II authors +// Copyright (C) 1999 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -3581,19 +3581,19 @@ namespace internal // in this plane. we chose the first one // to be the projection of the z-axis // to this plane - const Point vector1 + const Tensor<1,dim> vector1 = Point(0,0,1) - ((Point(0,0,1) * view_direction) * view_direction); - const Point unit_vector1 = vector1 / std::sqrt(vector1.square()); + const Tensor<1,dim> unit_vector1 = vector1 / vector1.norm(); // now the third vector is fixed. we // chose the projection of a more or // less arbitrary vector to the plane // perpendicular to the first one - const Point vector2 + const Tensor<1,dim> vector2 = (Point(1,0,0) - ((Point(1,0,0) * view_direction) * view_direction) - ((Point(1,0,0) * unit_vector1) * unit_vector1)); - const Point unit_vector2 = vector2 / std::sqrt(vector2.square()); + const Tensor<1,dim> unit_vector2 = vector2 / vector2.norm(); for (; cell!=endc; ++cell) -- 2.39.5