]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix unused variable warning 14805/head
authorTimo Heister <timo.heister@gmail.com>
Wed, 15 Feb 2023 18:03:58 +0000 (13:03 -0500)
committerTimo Heister <timo.heister@gmail.com>
Wed, 15 Feb 2023 18:03:58 +0000 (13:03 -0500)
It turns out that ``iteration`` is never read from in release mode
because Assert() only triggers in debug mode.

I am not sure what behavior we would like to have in release mode here,
but this proposed change will get rid of the warning.

source/grid/manifold.cc

index a4b08a1ca0a89177fbe953e7d40abda50d50a0e9..a9daffe930d5aca7faa8fe6c6febfa17955f33bc 100644 (file)
@@ -979,12 +979,13 @@ FlatManifold<dim, spacedim>::normal_vector(
       xi += delta_xi;
       ++iteration;
 
-      Assert(iteration < 10,
-             ExcMessage("The Newton iteration to find the reference point "
-                        "did not converge in 10 iterations. Do you have a "
-                        "deformed cell? (See the glossary for a definition "
-                        "of what a deformed cell is. You may want to output "
-                        "the vertices of your cell."));
+      AssertThrow(iteration < 10,
+                  ExcMessage(
+                    "The Newton iteration to find the reference point "
+                    "did not converge in 10 iterations. Do you have a "
+                    "deformed cell? (See the glossary for a definition "
+                    "of what a deformed cell is. You may want to output "
+                    "the vertices of your cell."));
 
       // It turns out that the check in reference coordinates with an absolute
       // tolerance can cause a convergence failure of the Newton method as

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.