From: janssen Date: Tue, 9 Oct 2012 12:46:18 +0000 (+0000) Subject: treat tke lucky breakdown, otherwise we had devision by zero X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5360cfbbcf9b158f1207c37e450c7a4ccbe64e9b;p=dealii-svn.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 */