From 5360cfbbcf9b158f1207c37e450c7a4ccbe64e9b Mon Sep 17 00:00:00 2001 From: janssen Date: Tue, 9 Oct 2012 12:46:18 +0000 Subject: [PATCH] treat tke lucky breakdown, otherwise we had devision by zero git-svn-id: https://svn.dealii.org/trunk@27026 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/lac/solver_gmres.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 */ -- 2.39.5