Class GeneralizedConjugateResidualSolver

  • All Implemented Interfaces:
    IterativeLinearSystemSolver

    public class GeneralizedConjugateResidualSolver
    extends Object
    implements IterativeLinearSystemSolver
    The Generalized Conjugate Residual method (GCR) is useful for solving a non-symmetric n-by-n linear system. GCR computes the next Krylov basis vector as a linear combination of the current residual and all previous basis vectors.

    This implementation is a restarted version of GCR. Only left preconditioning is supported.

    • Constructor Detail

      • GeneralizedConjugateResidualSolver

        public GeneralizedConjugateResidualSolver​(PreconditionerFactory leftPreconditionerFactory,
                                                  int m,
                                                  int maxIteration,
                                                  Tolerance tolerance)
        Construct a GCR solver with restarts.
        Parameters:
        leftPreconditionerFactory - constructs a new left preconditioner
        m - the solver restarts every m iterations
        maxIteration - the maximum number of iterations
        tolerance - the convergence threshold
      • GeneralizedConjugateResidualSolver

        public GeneralizedConjugateResidualSolver​(int m,
                                                  int maxIteration,
                                                  Tolerance tolerance)
        Construct a GCR solver with restarts.
        Parameters:
        m - the solver restarts every m iterations
        maxIteration - the maximum number of iterations
        tolerance - the convergence threshold
      • GeneralizedConjugateResidualSolver

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