]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix examples for Tensor/Point changes
authorTimo Heister <timo.heister@gmail.com>
Wed, 11 Feb 2015 22:19:28 +0000 (17:19 -0500)
committerTimo Heister <timo.heister@gmail.com>
Wed, 11 Feb 2015 22:19:28 +0000 (17:19 -0500)
examples/step-17/step-17.cc
examples/step-21/step-21.cc
examples/step-29/step-29.cc

index bf8612939815018111450851dd78018794c302f4..6a4f02349f6149ea345baafa76a6805323535abe 100644 (file)
@@ -208,8 +208,8 @@ namespace Step17
     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;
index 983f712c9d440f7afaeffcfc59ae18445cc15dcd..5c61eea5b2f4d6369993bd958e5a9ec23cdbc030 100644 (file)
@@ -412,7 +412,7 @@ namespace Step21
 
           double permeability = 0;
           for (unsigned int i=0; i<centers.size(); ++i)
-            permeability += std::exp(-(points[p]-centers[i]).square()
+            permeability += std::exp(-(points[p]-centers[i]).norm_square()
                                      / (0.05 * 0.05));
 
           const double normalized_permeability
index 04371441c606100e5e82aff32b666d600e6e53c0..99e88375a07956076d9cbe53bbc8e790b7dd47e9 100644 (file)
@@ -488,7 +488,7 @@ namespace Step29
     for (; cell!=endc; ++cell)
       for (unsigned int face=0; face<GeometryInfo<dim>::faces_per_cell; ++face)
         if ( cell->face(face)->at_boundary() &&
-             ((cell->face(face)->center() - transducer).square() < 0.01) )
+             ((cell->face(face)->center() - transducer).norm_square() < 0.01) )
 
           cell->face(face)->set_boundary_indicator (1);
 

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.