]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Change uses of Point to Tensor where appropriate.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 5 Feb 2015 12:49:37 +0000 (06:49 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 5 Feb 2015 12:49:37 +0000 (06:49 -0600)
tests/aniso/mesh_3d_21.cc
tests/base/geometry_info_1.cc
tests/bits/q_points.cc
tests/bits/step-8.cc
tests/fe/mapping.cc
tests/fe/mapping_c1.cc
tests/grid/mesh_3d_14.cc
tests/grid/mesh_3d_20.cc
tests/grid/mesh_3d_7.cc
tests/hp/step-8.cc

index 9523f2e8291f82ee9b8c66a34ab09a56f1d29497..e2facef0fe6b317864e6a6a2bba94d2520ab5893 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2003 - 2014 by the deal.II authors
+// Copyright (C) 2003 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -77,7 +77,7 @@ void check_this (Triangulation<3> &tria)
             for (unsigned int q=0; q<quadrature.size(); ++q)
               {
                 Assert ((fe_face_values1.quadrature_point(q)-
-                         fe_face_values2.quadrature_point(q)).square()
+                         fe_face_values2.quadrature_point(q)).norm_square()
                         < 1e-20,
                         ExcInternalError());
 
index 411dd2505cfd430e57a17e624404ffb3342486d8..c9237f45d76417e3c9613cf510ddddf985e6c0ac 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2003 - 2014 by the deal.II authors
+// Copyright (C) 2003 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -77,7 +77,7 @@ void test ()
 
               deallog << "    " << c << " [" << q << "] [" << pp << ']'
                       << std::endl;
-              Assert ((p-pp).square() < 1e-15*1e-15, ExcInternalError());
+              Assert ((p-pp).norm_square() < 1e-15*1e-15, ExcInternalError());
               Assert (GeometryInfo<dim>::is_inside_unit_cell (p) ==
                       GeometryInfo<dim>::is_inside_unit_cell (pp),
                       ExcInternalError());
index 21db8711743880ba56878308ec60969d4aeaa878..db90ff67b35e64ba0e38f56b5865549f91b55aca 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2003 - 2014 by the deal.II authors
+// Copyright (C) 2003 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -115,7 +115,7 @@ void check (Triangulation<3> &tria)
               deallog << "  " << fe_face_values1.quadrature_point(q)
                       << std::endl;
               Assert ((fe_face_values1.quadrature_point(q)-
-                       fe_face_values2.quadrature_point(q)).square()
+                       fe_face_values2.quadrature_point(q)).norm_square()
                       < 1e-20,
                       ExcInternalError());
             }
index e03b91e0c206b90e754ec27f31ee1bf8b5541561..019b4faca9922b54537c1d1980d008c1e32cd5cc 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2005 - 2014 by the deal.II authors
+// Copyright (C) 2005 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -122,13 +122,13 @@ void RightHandSide<dim>::vector_value (const Point<dim> &p,
   point_1(0) = 0.5;
   point_2(0) = -0.5;
 
-  if (((p-point_1).square() < 0.2*0.2) ||
-      ((p-point_2).square() < 0.2*0.2))
+  if (((p-point_1).norm_square() < 0.2*0.2) ||
+      ((p-point_2).norm_square() < 0.2*0.2))
     values(0) = 1;
   else
     values(0) = 0;
 
-  if (p.square() < 0.2*0.2)
+  if (p.norm_square() < 0.2*0.2)
     values(1) = 1;
   else
     values(1) = 0;
index e19b554aa992c3233c1a8b2158fb31055bf57e4d..cb7bb6754008a96e95b6a0aed48a34f859e3c517 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2001 - 2014 by the deal.II authors
+// Copyright (C) 2001 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -391,7 +391,7 @@ void create_triangulations(std::vector<Triangulation<3> *> &tria_ptr,
     {
       Point<3> m(2,2,2);
       Point<3> v(3,3,3);
-      double r=std::sqrt((m-v).square()),
+      double r=std::sqrt((m-v).norm_square()),
              h=r-1.5,
              pi=std::acos(-1.);
       Boundary<3> *boundary1=new HyperBallBoundary<3>(m, r);
index e56752e040aff1eb0384b4b06bf9568f55707a16..c5c756ddf0a08fdb431eb944f6c3ab7ca7515ec2 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2001 - 2014 by the deal.II authors
+// Copyright (C) 2001 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -124,7 +124,7 @@ int main ()
               Point<2> radius = c1_values.quadrature_point(i);
               radius /= std::sqrt(radius.square());
 
-              Assert ((radius-c1_values.normal_vector(i)).square() < 1e-14,
+              Assert ((radius-c1_values.normal_vector(i)).norm_square() < 1e-14,
                       ExcInternalError());
             };
         };
index 6b0eaacc463a4f3234e70e913cc63fb8265d92c5..621d819d5915f71c5ad2ef631137a58fde929533 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2003 - 2014 by the deal.II authors
+// Copyright (C) 2003 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -78,7 +78,7 @@ void check_this (Triangulation<3> &tria)
             for (unsigned int q=0; q<quadrature.size(); ++q)
               {
                 Assert ((fe_face_values1.quadrature_point(q)-
-                         fe_face_values2.quadrature_point(q)).square()
+                         fe_face_values2.quadrature_point(q)).norm_square()
                         < 1e-20,
                         ExcInternalError());
 
@@ -86,7 +86,7 @@ void check_this (Triangulation<3> &tria)
                                   fe_face_values2.JxW(q)) < 1e-15,
                         ExcInternalError());
                 Assert ((fe_face_values1.normal_vector(q) +
-                         fe_face_values2.normal_vector(q)).square()
+                         fe_face_values2.normal_vector(q)).norm_square()
                         < 1e-20,
                         ExcInternalError());
               }
index 622f7cfbf2dd38bc64d3e698a7acf9b52fccc5d3..9d6370443c1c78d286d6b5b9e302033e66996a51 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2003 - 2014 by the deal.II authors
+// Copyright (C) 2003 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -85,7 +85,7 @@ void check_this (Triangulation<3> &tria)
                         << std::endl;
 
               Assert ((fe_face_values1.quadrature_point(q)-
-                       fe_face_values2.quadrature_point(q)).square()
+                       fe_face_values2.quadrature_point(q)).norm_square()
                       < 1e-20,
                       ExcInternalError());
 
index 070d90a999bdcf204153a86aa4e64150c5a7b26f..04a9e2799c73a222e9c0b0f236b8118900a5bf41 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2003 - 2014 by the deal.II authors
+// Copyright (C) 2003 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -84,7 +84,7 @@ void check_this (Triangulation<3> &tria)
                         << std::endl;
 
               Assert ((fe_face_values1.quadrature_point(q)-
-                       fe_face_values2.quadrature_point(q)).square()
+                       fe_face_values2.quadrature_point(q)).norm_square()
                       < 1e-20,
                       ExcInternalError());
 
index 9f8226935096c4c564819a8562fbdd99fee90279..ee7ac9fcb22d2026ee42f336870adc84f9ba9ada 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2005 - 2014 by the deal.II authors
+// Copyright (C) 2005 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -121,13 +121,13 @@ void RightHandSide<dim>::vector_value (const Point<dim> &p,
   point_1(0) = 0.5;
   point_2(0) = -0.5;
 
-  if (((p-point_1).square() < 0.2*0.2) ||
-      ((p-point_2).square() < 0.2*0.2))
+  if (((p-point_1).norm_square() < 0.2*0.2) ||
+      ((p-point_2).norm_square() < 0.2*0.2))
     values(0) = 1;
   else
     values(0) = 0;
 
-  if (p.square() < 0.2*0.2)
+  if (p.norm_square() < 0.2*0.2)
     values(1) = 1;
   else
     values(1) = 0;

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.