From b12a2ae339271ee8ae52e1a0d03f789b003147be Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 15 Feb 2023 13:03:58 -0500 Subject: [PATCH] fix unused variable warning 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 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/grid/manifold.cc b/source/grid/manifold.cc index a4b08a1ca0..a9daffe930 100644 --- a/source/grid/manifold.cc +++ b/source/grid/manifold.cc @@ -979,12 +979,13 @@ FlatManifold::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 -- 2.39.5