26 template <
class Matrix,
class Vector,
class Preconditioner,
class Real,
30 const Preconditioner &M, int64_t &max_iter, Real &
tol,
31 Type eigmin, Type eigmax)
34 Type alpha, beta, c, d;
43 if ((resid = norm(r) / normb) <= tol) {
49 c = (eigmax - eigmin) / 2.0;
50 d = (eigmax + eigmin) / 2.0;
52 for (int64_t i = 1; i <= max_iter; i++) {
59 beta = c * alpha / 2.0;
61 alpha = 1.0 / (d - beta);
69 if ((resid = norm(r) / normb) <=
tol) {
int CHEBY(const Matrix &A, Vector &x, const Vector &b, const Preconditioner &M, int64_t &max_iter, Real &tol, Type eigmin, Type eigmax)
CHEBY solves the symmetric positive definite linear system using the Preconditioned Chebyshev Method...