Package jline.api.mc
Class Ctmc_gmres
java.lang.Object
jline.api.mc.Ctmc_gmres
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classOutcome of a GMRES solve. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault Krylov subspace dimension between restarts.static final doubleDefault linear-solve residual.static final doubleRelative threshold below which ILUT discards a fill-in entry.static final doubleFactor bounding the ILUT factors, as a multiple of the nonzeros per row of A. -
Method Summary
Modifier and TypeMethodDescriptionstatic Ctmc_gmres.GmresResultctmc_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.static Matrixctmc_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.static Ctmc_gmres.GmresResultctmc_gmres(Matrix A, Matrix b, double tol, int restart, int maxit, Matrix x0) Solve A*x = b by restarted GMRES.
-
Field Details
-
GMRES_DEFAULT_TOL
public static final double GMRES_DEFAULT_TOLDefault 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_RESTARTDefault Krylov subspace dimension between restarts.- See Also:
-
ILUT_DROP_TOL
public static final double ILUT_DROP_TOLRelative threshold below which ILUT discards a fill-in entry.- See Also:
-
ILUT_FILL_FACTOR
public static final double ILUT_FILL_FACTORFactor bounding the ILUT factors, as a multiple of the nonzeros per row of A.- See Also:
-
-
Method Details
-
ctmc_gmres
Solve A*x = b by restarted GMRES with the default tolerance, restart and iteration cap, starting from a uniform initial guess.- Parameters:
A- Coefficient matrixb- 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 matrixb- Right-hand side, as a column vectortol- Relative residual tolerance, nonpositive for the default 1e-12restart- 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
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 matrixB- Right-hand sides, one per columntol- Relative residual tolerance, nonpositive for the default 1e-12restart- 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.
-