From: heister Date: Tue, 9 Oct 2012 22:08:00 +0000 (+0000) Subject: treat lucky breakdown in GMRES and FGMRES X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6c5cb341eec12c319a3caba4d0927978d058d27;p=dealii-svn.git treat lucky breakdown in GMRES and FGMRES git-svn-id: https://svn.dealii.org/trunk@27040 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 414c76aae9..34da06468c 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -87,6 +87,10 @@ DoFHandler, in particular removal of specializations.

Specific improvements

    +
  1. Fixed: handle lucky breakdowns in GMRES/FGMRES. +
    +(Bärbel Jansse, Timo Heister, 2012/10/09) +
  2. Fixed: GridTools::find_cells_adjacent_to_vertex got into trouble with anisotropically refined meshes. This is now fixed.
    diff --git a/deal.II/include/deal.II/lac/solver_gmres.h b/deal.II/include/deal.II/lac/solver_gmres.h index 2ca953ca83..0d6c63aa62 100644 --- a/deal.II/include/deal.II/lac/solver_gmres.h +++ b/deal.II/include/deal.II/lac/solver_gmres.h @@ -706,8 +706,9 @@ SolverGMRES::solve (const MATRIX &A, const double s = vv.l2_norm(); h(inner_iteration+1) = s; - //s=0 is a lucky breakdown. Handle this somehow decently - if(s!=0) + //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)) vv *= 1./s; /* Transformation into @@ -907,7 +908,11 @@ SolverFGMRES::solve ( for (unsigned int j=0;j