]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix up places where we use Point<dim> for directions when we should be
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 5 Feb 2015 02:57:45 +0000 (20:57 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 5 Feb 2015 03:25:15 +0000 (21:25 -0600)
using Tensor<1,dim>.

source/grid/tria_boundary_lib.cc

index f91640abb450453ef2282f848e8897b53b29894e..5eae3f2bce738936779423d7250310892f25bf4f 100644 (file)
@@ -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.
 //
@@ -74,8 +74,8 @@ get_new_point_on_line (const typename Triangulation<dim,spacedim>::line_iterator
   // have to take into account the
   // offset point_on_axis and the
   // direction of the axis
-  const Point<spacedim> vector_from_axis = (middle-point_on_axis) -
-                                           ((middle-point_on_axis) * direction) * direction;
+  const Tensor<1,spacedim> vector_from_axis = (middle-point_on_axis) -
+                                              ((middle-point_on_axis) * direction) * direction;
   // scale it to the desired length
   // and put everything back
   // together, unless we have a point
@@ -100,8 +100,8 @@ get_new_point_on_quad (const Triangulation<3>::quad_iterator &quad) const
   // same algorithm as above
   const unsigned int spacedim = 3;
 
-  const Point<spacedim> vector_from_axis = (middle-point_on_axis) -
-                                           ((middle-point_on_axis) * direction) * direction;
+  const Tensor<1,spacedim> vector_from_axis = (middle-point_on_axis) -
+                                              ((middle-point_on_axis) * direction) * direction;
   if (vector_from_axis.norm() <= 1e-10 * middle.norm())
     return middle;
   else
@@ -119,8 +119,8 @@ get_new_point_on_quad (const Triangulation<2,3>::quad_iterator &quad) const
 
   // same algorithm as above
   const unsigned int spacedim = 3;
-  const Point<spacedim> vector_from_axis = (middle-point_on_axis) -
-                                           ((middle-point_on_axis) * direction) * direction;
+  const Tensor<1,spacedim> vector_from_axis = (middle-point_on_axis) -
+                                              ((middle-point_on_axis) * direction) * direction;
   if (vector_from_axis.norm() <= 1e-10 * middle.norm())
     return middle;
   else

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.