From: Wolfgang Bangerth Date: Thu, 5 Feb 2015 12:49:37 +0000 (-0600) Subject: Change uses of Point to Tensor where appropriate. X-Git-Tag: v8.3.0-rc1~494^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa720915d090647c988c81f3640181f3faf272f4;p=dealii.git Change uses of Point to Tensor where appropriate. --- diff --git a/tests/aniso/mesh_3d_21.cc b/tests/aniso/mesh_3d_21.cc index 9523f2e829..e2facef0fe 100644 --- a/tests/aniso/mesh_3d_21.cc +++ b/tests/aniso/mesh_3d_21.cc @@ -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::is_inside_unit_cell (p) == GeometryInfo::is_inside_unit_cell (pp), ExcInternalError()); diff --git a/tests/bits/q_points.cc b/tests/bits/q_points.cc index 21db871174..db90ff67b3 100644 --- a/tests/bits/q_points.cc +++ b/tests/bits/q_points.cc @@ -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()); } diff --git a/tests/bits/step-8.cc b/tests/bits/step-8.cc index e03b91e0c2..019b4faca9 100644 --- a/tests/bits/step-8.cc +++ b/tests/bits/step-8.cc @@ -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::vector_value (const Point &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; diff --git a/tests/fe/mapping.cc b/tests/fe/mapping.cc index e19b554aa9..cb7bb67540 100644 --- a/tests/fe/mapping.cc +++ b/tests/fe/mapping.cc @@ -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 *> &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); diff --git a/tests/fe/mapping_c1.cc b/tests/fe/mapping_c1.cc index e56752e040..c5c756ddf0 100644 --- a/tests/fe/mapping_c1.cc +++ b/tests/fe/mapping_c1.cc @@ -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()); }; }; diff --git a/tests/grid/mesh_3d_14.cc b/tests/grid/mesh_3d_14.cc index 6b0eaacc46..621d819d59 100644 --- a/tests/grid/mesh_3d_14.cc +++ b/tests/grid/mesh_3d_14.cc @@ -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 &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()); } diff --git a/tests/grid/mesh_3d_20.cc b/tests/grid/mesh_3d_20.cc index 622f7cfbf2..9d6370443c 100644 --- a/tests/grid/mesh_3d_20.cc +++ b/tests/grid/mesh_3d_20.cc @@ -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()); diff --git a/tests/grid/mesh_3d_7.cc b/tests/grid/mesh_3d_7.cc index 070d90a999..04a9e2799c 100644 --- a/tests/grid/mesh_3d_7.cc +++ b/tests/grid/mesh_3d_7.cc @@ -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()); diff --git a/tests/hp/step-8.cc b/tests/hp/step-8.cc index 9f82269350..ee7ac9fcb2 100644 --- a/tests/hp/step-8.cc +++ b/tests/hp/step-8.cc @@ -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::vector_value (const Point &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;