Created by: aprokop
The original power method did specified number of iterations unconditionally. After that we boosted the computed estimate of the largest eigenvalue by a boost factor.
This patch adds a heuristic to the method that tries to stop the method early if it converges fast enough. It works the following way:
Throughout power method iterations, we check if the last few iterations are monotonic in lambda. If they are, we check if we achived (1). If we did, we stop the iterations and set lambda estimate to be the rhs in (2). We also set the boost factor to 1.0 as if all our assupmtions are true, we guarantee that this is a correct upper bound on lambda max.
At the moment, the patch tested sparsely but produces good results for a few simple scalar Poisson equations. It has to be tested more extensilvely before even getting a chance to become the default. The tested values of tolerance were in the range 0.2-0.01, and they all converged faster. The only minor drawback is that it sometimes increased the number of solve iterations of the Krylov+MueLu solver by one. But it was worth it.
The gamma in this method is what we call tolerance, and provided by a user through the parameter list. Larger values (0.1+) would stop earlier. A reasonable starting value seems to be 0.1.
The benefits of the patch (when it works) are not only in the immediate reduction of the required number of Chebyshev iterations. It opens path to adding reuse to the power method where provided a good initial estimate of the eigenvector (for instance, taken from the previous run) it may converge even faster.
The reuse will be added separately.