]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a test where we may inadvertently divide by zero. 972/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 28 May 2015 20:26:21 +0000 (15:26 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 28 May 2015 20:26:21 +0000 (15:26 -0500)
The test is also just overly convoluted.

include/deal.II/lac/solver_gmres.h

index 996f6894e7c76effaa34c9f0fbaa291a9681fee3..0e5c6af01189e6f82f5f5b935e4d328adbd67574 100644 (file)
@@ -754,7 +754,7 @@ SolverGMRES<VECTOR>::solve (const MATRIX         &A,
 
           //s=0 is a lucky breakdown, the solver will reach convergence,
           //but we must not divide by zero here.
-          if (numbers::is_finite(1./s))
+          if (s != 0)
             vv *= 1./s;
 
           // for eigenvalues, get the resulting coefficients from the

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.