From: guido Date: Tue, 11 Sep 2001 12:52:56 +0000 (+0000) Subject: Orthogonal residual as a stopping criterion X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=545b359d2505c7f2ceb1aec01555e74889f5be0c;p=dealii-svn.git Orthogonal residual as a stopping criterion git-svn-id: https://svn.dealii.org/trunk@4957 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/solver_bicgstab.h b/deal.II/lac/include/lac/solver_bicgstab.h index 1ea6e919c5..28d562df23 100644 --- a/deal.II/lac/include/lac/solver_bicgstab.h +++ b/deal.II/lac/include/lac/solver_bicgstab.h @@ -37,9 +37,13 @@ * The Bicgstab-method has two additional parameters: the first is a * boolean, deciding whether to compute the actual residual in each * step (@p{true}) or to use the length of the computed orthogonal - * residual (@{false}, not implemented yet). Remark, that computing - * the residual causes a third matrix-vector-multiplication, though no - * additional preconditioning, in each step. + * residual (@{false}). Remark, that computing the residual causes a + * third matrix-vector-multiplication, though no additional + * preconditioning, in each step. The reason for doing this is, that + * the size of the orthogonalized residual computed during the + * iteration may be larger by orders of magnitude than the true + * residual. This is due to numerical instabilities related to badly + * conditioned matrices. * * The second parameter is the size of a breakdown criterion. It is * difficult to find a general good criterion, so if things do not @@ -325,7 +329,11 @@ SolverBicgstab::iterate(const MATRIX& A, Vx->add(alpha, y, omega, z); r.equ(1., s, -omega, t); - res = criterion(A, *Vx, *Vb); + if (additional_data.exact_residual) + res = criterion(A, *Vx, *Vb); + else + res = r.l2_norm(); + state = control().check(++step, res); print_vectors(step, *Vx, r, y); }