From: Martin Kronbichler Date: Fri, 20 Nov 2020 17:03:09 +0000 (+0100) Subject: Use better initial guess for Chebyshev eigenvalue estimate with BlockVector X-Git-Tag: v9.3.0-rc1~859^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0494774aa331b4aafd0f638b7fc5335dc23d31b6;p=dealii.git Use better initial guess for Chebyshev eigenvalue estimate with BlockVector --- diff --git a/include/deal.II/lac/precondition.h b/include/deal.II/lac/precondition.h index a67fe34381..68fce93ae8 100644 --- a/include/deal.II/lac/precondition.h +++ b/include/deal.II/lac/precondition.h @@ -47,6 +47,8 @@ namespace LinearAlgebra { template class Vector; + template + class BlockVector; } // namespace distributed } // namespace LinearAlgebra #endif @@ -2107,6 +2109,15 @@ namespace internal vector.add(-mean_value); } + template + void + set_initial_guess( + ::dealii::LinearAlgebra::distributed::BlockVector &vector) + { + for (unsigned int block = 0; block < vector.n_blocks(); ++block) + set_initial_guess(vector.block(block)); + } + # ifdef DEAL_II_COMPILER_CUDA_AWARE template