From: Timo Heister Date: Wed, 11 Feb 2015 22:19:28 +0000 (-0500) Subject: fix examples for Tensor/Point changes X-Git-Tag: v8.3.0-rc1~480^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e793b396ce94a405f865e821267799155cc25257;p=dealii.git fix examples for Tensor/Point changes --- diff --git a/examples/step-17/step-17.cc b/examples/step-17/step-17.cc index bf86129398..6a4f02349f 100644 --- a/examples/step-17/step-17.cc +++ b/examples/step-17/step-17.cc @@ -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; diff --git a/examples/step-21/step-21.cc b/examples/step-21/step-21.cc index 983f712c9d..5c61eea5b2 100644 --- a/examples/step-21/step-21.cc +++ b/examples/step-21/step-21.cc @@ -412,7 +412,7 @@ namespace Step21 double permeability = 0; for (unsigned int i=0; i::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);