From e793b396ce94a405f865e821267799155cc25257 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 11 Feb 2015 17:19:28 -0500 Subject: [PATCH] fix examples for Tensor/Point changes --- examples/step-17/step-17.cc | 4 ++-- examples/step-21/step-21.cc | 2 +- examples/step-29/step-29.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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); -- 2.39.5