]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid warning in computation of Jacobi polynomial roots. 6226/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 12 Apr 2018 07:18:56 +0000 (09:18 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 12 Apr 2018 07:18:56 +0000 (09:18 +0200)
include/deal.II/base/polynomial.h

index 6f0a535a474e193ce8f4e76119f7837bc2d017aa..e6275e9d72e25ff04ce3073cf442b6b900e233e0 100644 (file)
@@ -906,7 +906,7 @@ namespace Polynomials
           r = (r + x[k-1])/2;
 
         unsigned int converged = numbers::invalid_unsigned_int;
-        for (unsigned int i=1; i<1000; ++i)
+        for (unsigned int it=1; it<1000; ++it)
           {
             Number s = 0.;
             for (unsigned int i=0; i<k; ++i)
@@ -923,11 +923,11 @@ namespace Polynomials
             r += delta;
             if (converged == numbers::invalid_unsigned_int &&
                 std::abs(delta) < tolerance)
-              converged = i;
+              converged = it;
 
             // do one more iteration to ensure accuracy also for tighter
             // types than double (e.g. long double)
-            if (i == converged + 1)
+            if (it == converged + 1)
               break;
           }
 

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.