From: Timo Heister Date: Tue, 10 Mar 2020 19:06:33 +0000 (-0400) Subject: PreconditionChebyshev: make estimate_eigenvalues public X-Git-Tag: v9.2.0-rc1~430^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=279b4f65a4b820866a406555dc715713f7278b31;p=dealii.git PreconditionChebyshev: make estimate_eigenvalues public estimate_eigenvalues() is a private function called at the first invocation of vmult(). Make it public so one can call it ahead of time to avoid slowing down the first iteration (and one can time how long the CG solve for eigenvalue estimation takes). --- diff --git a/include/deal.II/lac/precondition.h b/include/deal.II/lac/precondition.h index 185a7dce5c..6e5ea528fe 100644 --- a/include/deal.II/lac/precondition.h +++ b/include/deal.II/lac/precondition.h @@ -1159,6 +1159,21 @@ public: size_type n() const; + /** + * Compute eigenvalue estimates required for the preconditioner. + * + * This function is called automatically on first use of the preconditioner + * if it is not called by the user. The layout of the vector @p src is used + * to create internal temporary vectors and its content does not matter. + * + * Initializes the factors theta and delta based on an eigenvalue + * computation. If the user set provided values for the largest eigenvalue + * in AdditionalData, no computation is performed and the information given + * by the user is used. + */ + void + estimate_eigenvalues(const VectorType &src) const; + private: /** * A pointer to the underlying matrix. @@ -1211,15 +1226,6 @@ private: * overwrite the temporary vectors. */ mutable Threads::Mutex mutex; - - /** - * Initializes the factors theta and delta based on an eigenvalue - * computation. If the user set provided values for the largest eigenvalue - * in AdditionalData, no computation is performed and the information given - * by the user is used. - */ - void - estimate_eigenvalues(const VectorType &src) const; };