From: Martin Kronbichler Date: Sat, 10 Jun 2017 10:25:11 +0000 (+0200) Subject: Simplify step() in PreconditionChebyshev. X-Git-Tag: v9.0.0-rc1~1513^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02746c338fe5cf201451e81a5acc38ddd06b0df4;p=dealii.git Simplify step() in PreconditionChebyshev. --- diff --git a/include/deal.II/lac/precondition.h b/include/deal.II/lac/precondition.h index 723078a450..4b39bb9ec9 100644 --- a/include/deal.II/lac/precondition.h +++ b/include/deal.II/lac/precondition.h @@ -2221,15 +2221,9 @@ PreconditionChebyshev if (is_initialized == false) estimate_eigenvalues(src); - if (!dst.all_zero()) - { - matrix_ptr->vmult (update2, dst); - internal::PreconditionChebyshev::vector_updates - (src, *data.preconditioner, false, 0., 1./theta, update1, update2, update3, dst); - } - else - internal::PreconditionChebyshev::vector_updates - (src, *data.preconditioner, true, 0., 1./theta, update1, update2, update3, dst); + matrix_ptr->vmult (update2, dst); + internal::PreconditionChebyshev::vector_updates + (src, *data.preconditioner, false, 0., 1./theta, update1, update2, update3, dst); do_chebyshev_loop(dst, src); } @@ -2247,15 +2241,9 @@ PreconditionChebyshev if (is_initialized == false) estimate_eigenvalues(src); - if (!dst.all_zero()) - { - matrix_ptr->Tvmult (update2, dst); - internal::PreconditionChebyshev::vector_updates - (src, *data.preconditioner, false, 0., 1./theta, update1, update2, update3, dst); - } - else - internal::PreconditionChebyshev::vector_updates - (src, *data.preconditioner, true, 0., 1./theta, update1, update2, update3, dst); + matrix_ptr->Tvmult (update2, dst); + internal::PreconditionChebyshev::vector_updates + (src, *data.preconditioner, false, 0., 1./theta, update1, update2, update3, dst); do_transpose_chebyshev_loop(dst, src); }