Class GeneralizedMinimalResidualSolver

  • All Implemented Interfaces:
    IterativeLinearSystemSolver

    public class GeneralizedMinimalResidualSolver
    extends Object
    implements IterativeLinearSystemSolver
    The Generalized Minimal Residual method (GMRES) is useful for solving a non-symmetric n-by-n linear system. It computes a sequence of orthogonal vectors (like MINRES), and combines these through a least-squares solve and update. However, unlike MINRES (and CG) it requires storing the whole sequence, so that a large amount of storage is needed. For this reason, a restarted version of this method is often used. In a restarted version, computation and storage costs are limited by specifying a fixed number of vectors to be generated.

    This implementation is a restarted version. In addition, it uses a Givens rotation to transform the intermediate Hessenberg matrix into an upper triangular matrix, such that convergence can be determined as soon as the residual norm at each sub-step is small enough. Only left preconditioning is supported.

    • Constructor Detail

      • GeneralizedMinimalResidualSolver

        public GeneralizedMinimalResidualSolver​(PreconditionerFactory leftPreconditionerFactory,
                                                int m,
                                                int maxIteration,
                                                Tolerance tolerance)
        Construct a GMRES solver with restarts.
        Parameters:
        leftPreconditionerFactory - constructs a new left preconditioner
        m - the solver restarts every m iterations; Practically, as m increases, the computational cost increases at least by O(m2)n because of the Gram-Schmidt orthogonalization. The memory cost increases by O(mn).
        maxIteration - the maximum number of iterations
        tolerance - the convergence threshold
      • GeneralizedMinimalResidualSolver

        public GeneralizedMinimalResidualSolver​(int m,
                                                int maxIteration,
                                                Tolerance tolerance)
        Construct a GMRES solver with restarts.
        Parameters:
        m - the solver restarts every m iterations; Practically, as m increases, the computational cost increases at least by O(m2)n because of the Gram-Schmidt orthogonalization. The memory cost increases by O(mn).
        maxIteration - the maximum number of iterations
        tolerance - the convergence threshold
      • GeneralizedMinimalResidualSolver

        public GeneralizedMinimalResidualSolver​(int maxIteration,
                                                Tolerance tolerance)
        Construct a full GMRES solver.
        Parameters:
        maxIteration - the maximum number of iterations
        tolerance - the convergence threshold