]> https://gitweb.dealii.org/ - dealii.git/commitdiff
treat tke lucky breakdown, otherwise we had devision by zero
authorBaerbel Jannsen <baerbel.janssen@gmail.com>
Tue, 9 Oct 2012 12:46:18 +0000 (12:46 +0000)
committerBaerbel Jannsen <baerbel.janssen@gmail.com>
Tue, 9 Oct 2012 12:46:18 +0000 (12:46 +0000)
git-svn-id: https://svn.dealii.org/trunk@27026 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/solver_gmres.h

index 3639ae9d9fdde7999152a7fbc972c1a2da255d17..2ca953ca831d701365b3a0226aedb645c4ae9a60 100644 (file)
@@ -706,9 +706,9 @@ SolverGMRES<VECTOR>::solve (const MATRIX         &A,
 
           const double s = vv.l2_norm();
           h(inner_iteration+1) = s;
-//TODO: s=0 is a lucky breakdown. Handle this somehow decently
-
-          vv *= 1./s;
+          //s=0 is a lucky breakdown. Handle this somehow decently
+          if(s!=0)
+            vv *= 1./s;
 
                                            /*  Transformation into
                                                triagonal structure  */

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.