From: Baerbel Jannsen Date: Tue, 9 Oct 2012 12:46:18 +0000 (+0000) Subject: treat tke lucky breakdown, otherwise we had devision by zero X-Git-Tag: v8.0.0~1973 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15e0601bb2fabd47794c37f08e831b6b2441ce00;p=dealii.git treat tke lucky breakdown, otherwise we had devision by zero git-svn-id: https://svn.dealii.org/trunk@27026 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/lac/solver_gmres.h b/deal.II/include/deal.II/lac/solver_gmres.h index 3639ae9d9f..2ca953ca83 100644 --- a/deal.II/include/deal.II/lac/solver_gmres.h +++ b/deal.II/include/deal.II/lac/solver_gmres.h @@ -706,9 +706,9 @@ SolverGMRES::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 */