From: Peter Munch Date: Thu, 9 Jul 2020 18:01:26 +0000 (+0200) Subject: Add check to step-12 X-Git-Tag: v9.3.0-rc1~1304^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcae5348920fe010dce15349c60bd87d05b7ee7a;p=dealii.git Add check to step-12 --- diff --git a/examples/step-12/step-12.cc b/examples/step-12/step-12.cc index fcec1e2c1f..70a6bd64c6 100644 --- a/examples/step-12/step-12.cc +++ b/examples/step-12/step-12.cc @@ -126,7 +126,9 @@ namespace Step12 Point wind_field; wind_field(0) = -p(1); wind_field(1) = p(0); - wind_field /= wind_field.norm(); + + if (wind_field.norm() > 1e-10) + wind_field /= wind_field.norm(); return wind_field; }