Package jline.api.mc

Class Ctmc_gmres

java.lang.Object
jline.api.mc.Ctmc_gmres

public final class Ctmc_gmres extends Object
  • Field Details

    • GMRES_DEFAULT_TOL

      public static final double GMRES_DEFAULT_TOL
      Default linear-solve residual. Much tighter than the fixed-point tolerance options.iter_tol (1e-4): switching from the direct solve to GMRES must not move a reported performance metric.
      See Also:
    • GMRES_DEFAULT_RESTART

      public static final int GMRES_DEFAULT_RESTART
      Default Krylov subspace dimension between restarts.
      See Also:
    • ILUT_DROP_TOL

      public static final double ILUT_DROP_TOL
      Relative threshold below which ILUT discards a fill-in entry.
      See Also:
    • ILUT_FILL_FACTOR

      public static final double ILUT_FILL_FACTOR
      Factor bounding the ILUT factors, as a multiple of the nonzeros per row of A.
      See Also:
  • Method Details

    • ctmc_gmres

      public static Ctmc_gmres.GmresResult ctmc_gmres(Matrix A, Matrix b)
      Solve A*x = b by restarted GMRES with the default tolerance, restart and iteration cap, starting from a uniform initial guess.
      Parameters:
      A - Coefficient matrix
      b - Right-hand side, as a column vector
      Returns:
      Solution, convergence flag, relative residual and iteration count
    • ctmc_gmres

      public static Ctmc_gmres.GmresResult ctmc_gmres(Matrix A, Matrix b, double tol, int restart, int maxit, Matrix x0)
      Solve A*x = b by restarted GMRES.
      Parameters:
      A - Coefficient matrix
      b - Right-hand side, as a column vector
      tol - Relative residual tolerance, nonpositive for the default 1e-12
      restart - Krylov subspace dimension, nonpositive for the default min(n,50)
      maxit - Maximum number of restart cycles, nonpositive for ceil(n/restart)
      x0 - Initial guess, null for the uniform vector 1/n
      Returns:
      Solution, convergence flag, relative residual and iteration count
    • ctmc_gmres

      public static Matrix ctmc_gmres(Matrix A, Matrix B, double tol, int restart, int maxit)
      Solve A*X = B for every column of B, reusing one incomplete factorization across all of them and starting each column from the previous solution. This is the shape of the stochastic complement, whose right-hand side is a whole block of the generator: refactorizing per column would cost more than the direct solve it replaces.
      Parameters:
      A - Coefficient matrix
      B - Right-hand sides, one per column
      tol - Relative residual tolerance, nonpositive for the default 1e-12
      restart - Krylov subspace dimension, nonpositive for the default min(n,50)
      maxit - Maximum number of restart cycles, nonpositive for ceil(n/restart)
      Returns:
      The solution block, or null if any column failed to converge. Returning null rather than a partial block keeps the caller's fallback all-or-nothing.