Options for Linear solver algorithms¶
BICG¶
Module: gemseo.algos.linear_solvers.lib_scipy_linalg
Linear solver implemented in the SciPy library.
More details about the algorithm and its options on https://docs.scipy.org/doc/scipy/reference/generated/BICG.html.
Mandatory and optional parameters:
- Parameters
atol : float | None, optional
The absolute tolerance for convergence, norm(RHS.dot(sol)) <= max(tol*norm(LHS), atol).
By default it is set to None.
inner_m : int, optional
By default it is set to 30.
max_iter : int, optional
The maximum number of iterations.
By default it is set to 1000.
outer_k : int, optional
The number of vectors to carry between inner GMRES iterations.
By default it is set to 3.
outer_v : list[tuple] | None, optional
The data used to augment the Krylov subspace.
By default it is set to None.
preconditioner : ndarray | LinearOperator | None, optional
The preconditionner, approximation of RHS^-1. If None, no preconditioner is used.
By default it is set to None.
prepend_outer_v : bool, optional
Whether to put outer_v augmentation vectors before the Krylov iterates.
By default it is set to False.
save_when_fail : bool, optional
Whether to save the linear system to the disk when the solver failed to converge.
By default it is set to False.
store_outer_av : bool, optional
By default it is set to True.
store_residuals : bool, optional
Whether to store the residuals convergence history.
By default it is set to False.
tol : float, optional
The relative tolerance for convergence, norm(RHS.dot(sol)) <= max(tol*norm(LHS), atol).
By default it is set to 1e-12.
use_ilu_precond : bool, optional
Whether to use superLU to compute an incomplete LU factorization as preconditioner.
By default it is set to True.
x0 : ndarray | None, optional
The initial guess for the solution. M{sparse matrix, dense matrix, LinearOperator}. If None, solvers usually start from the null vector. inner_m int: The number of inner GMRES iterations per outer iteration.
By default it is set to None.
BICGSTAB¶
Module: gemseo.algos.linear_solvers.lib_scipy_linalg
Linear solver implemented in the SciPy library.
More details about the algorithm and its options on https://docs.scipy.org/doc/scipy/reference/generated/BICGSTAB.html.
Mandatory and optional parameters:
- Parameters
atol : float | None, optional
The absolute tolerance for convergence, norm(RHS.dot(sol)) <= max(tol*norm(LHS), atol).
By default it is set to None.
inner_m : int, optional
By default it is set to 30.
max_iter : int, optional
The maximum number of iterations.
By default it is set to 1000.
outer_k : int, optional
The number of vectors to carry between inner GMRES iterations.
By default it is set to 3.
outer_v : list[tuple] | None, optional
The data used to augment the Krylov subspace.
By default it is set to None.
preconditioner : ndarray | LinearOperator | None, optional
The preconditionner, approximation of RHS^-1. If None, no preconditioner is used.
By default it is set to None.
prepend_outer_v : bool, optional
Whether to put outer_v augmentation vectors before the Krylov iterates.
By default it is set to False.
save_when_fail : bool, optional
Whether to save the linear system to the disk when the solver failed to converge.
By default it is set to False.
store_outer_av : bool, optional
By default it is set to True.
store_residuals : bool, optional
Whether to store the residuals convergence history.
By default it is set to False.
tol : float, optional
The relative tolerance for convergence, norm(RHS.dot(sol)) <= max(tol*norm(LHS), atol).
By default it is set to 1e-12.
use_ilu_precond : bool, optional
Whether to use superLU to compute an incomplete LU factorization as preconditioner.
By default it is set to True.
x0 : ndarray | None, optional
The initial guess for the solution. M{sparse matrix, dense matrix, LinearOperator}. If None, solvers usually start from the null vector. inner_m int: The number of inner GMRES iterations per outer iteration.
By default it is set to None.
DEFAULT¶
Module: gemseo.algos.linear_solvers.lib_scipy_linalg
This starts by LGMRES, but if it fails, switches to GMRES, then direct method super LU factorization.
More details about the algorithm and its options on https://docs.scipy.org/doc/scipy/reference/generated/DEFAULT.html.
Mandatory and optional parameters:
- Parameters
atol : float | None, optional
The absolute tolerance for convergence, norm(RHS.dot(sol)) <= max(tol*norm(LHS), atol).
By default it is set to None.
inner_m : int, optional
By default it is set to 30.
max_iter : int, optional
The maximum number of iterations.
By default it is set to 1000.
outer_k : int, optional
The number of vectors to carry between inner GMRES iterations.
By default it is set to 3.
outer_v : list[tuple] | None, optional
The data used to augment the Krylov subspace.
By default it is set to None.
preconditioner : ndarray | LinearOperator | None, optional
The preconditionner, approximation of RHS^-1. If None, no preconditioner is used.
By default it is set to None.
prepend_outer_v : bool, optional
Whether to put outer_v augmentation vectors before the Krylov iterates.
By default it is set to False.
save_when_fail : bool, optional
Whether to save the linear system to the disk when the solver failed to converge.
By default it is set to False.
store_outer_av : bool, optional
By default it is set to True.
store_residuals : bool, optional
Whether to store the residuals convergence history.
By default it is set to False.
tol : float, optional
The relative tolerance for convergence, norm(RHS.dot(sol)) <= max(tol*norm(LHS), atol).
By default it is set to 1e-12.
use_ilu_precond : bool, optional
Whether to use superLU to compute an incomplete LU factorization as preconditioner.
By default it is set to True.
x0 : ndarray | None, optional
The initial guess for the solution. M{sparse matrix, dense matrix, LinearOperator}. If None, solvers usually start from the null vector. inner_m int: The number of inner GMRES iterations per outer iteration.
By default it is set to None.
GMRES¶
Module: gemseo.algos.linear_solvers.lib_scipy_linalg
Linear solver implemented in the SciPy library.
More details about the algorithm and its options on https://docs.scipy.org/doc/scipy/reference/generated/GMRES.html.
Mandatory and optional parameters:
- Parameters
atol : float | None, optional
The absolute tolerance for convergence, norm(RHS.dot(sol)) <= max(tol*norm(LHS), atol).
By default it is set to None.
inner_m : int, optional
By default it is set to 30.
max_iter : int, optional
The maximum number of iterations.
By default it is set to 1000.
outer_k : int, optional
The number of vectors to carry between inner GMRES iterations.
By default it is set to 3.
outer_v : list[tuple] | None, optional
The data used to augment the Krylov subspace.
By default it is set to None.
preconditioner : ndarray | LinearOperator | None, optional
The preconditionner, approximation of RHS^-1. If None, no preconditioner is used.
By default it is set to None.
prepend_outer_v : bool, optional
Whether to put outer_v augmentation vectors before the Krylov iterates.
By default it is set to False.
save_when_fail : bool, optional
Whether to save the linear system to the disk when the solver failed to converge.
By default it is set to False.
store_outer_av : bool, optional
By default it is set to True.
store_residuals : bool, optional
Whether to store the residuals convergence history.
By default it is set to False.
tol : float, optional
The relative tolerance for convergence, norm(RHS.dot(sol)) <= max(tol*norm(LHS), atol).
By default it is set to 1e-12.
use_ilu_precond : bool, optional
Whether to use superLU to compute an incomplete LU factorization as preconditioner.
By default it is set to True.
x0 : ndarray | None, optional
The initial guess for the solution. M{sparse matrix, dense matrix, LinearOperator}. If None, solvers usually start from the null vector. inner_m int: The number of inner GMRES iterations per outer iteration.
By default it is set to None.
LGMRES¶
Module: gemseo.algos.linear_solvers.lib_scipy_linalg
Linear solver implemented in the SciPy library.
More details about the algorithm and its options on https://docs.scipy.org/doc/scipy/reference/generated/LGMRES.html.
Mandatory and optional parameters:
- Parameters
atol : float | None, optional
The absolute tolerance for convergence, norm(RHS.dot(sol)) <= max(tol*norm(LHS), atol).
By default it is set to None.
inner_m : int, optional
By default it is set to 30.
max_iter : int, optional
The maximum number of iterations.
By default it is set to 1000.
outer_k : int, optional
The number of vectors to carry between inner GMRES iterations.
By default it is set to 3.
outer_v : list[tuple] | None, optional
The data used to augment the Krylov subspace.
By default it is set to None.
preconditioner : ndarray | LinearOperator | None, optional
The preconditionner, approximation of RHS^-1. If None, no preconditioner is used.
By default it is set to None.
prepend_outer_v : bool, optional
Whether to put outer_v augmentation vectors before the Krylov iterates.
By default it is set to False.
save_when_fail : bool, optional
Whether to save the linear system to the disk when the solver failed to converge.
By default it is set to False.
store_outer_av : bool, optional
By default it is set to True.
store_residuals : bool, optional
Whether to store the residuals convergence history.
By default it is set to False.
tol : float, optional
The relative tolerance for convergence, norm(RHS.dot(sol)) <= max(tol*norm(LHS), atol).
By default it is set to 1e-12.
use_ilu_precond : bool, optional
Whether to use superLU to compute an incomplete LU factorization as preconditioner.
By default it is set to True.
x0 : ndarray | None, optional
The initial guess for the solution. M{sparse matrix, dense matrix, LinearOperator}. If None, solvers usually start from the null vector. inner_m int: The number of inner GMRES iterations per outer iteration.
By default it is set to None.
QMR¶
Module: gemseo.algos.linear_solvers.lib_scipy_linalg
Linear solver implemented in the SciPy library.
More details about the algorithm and its options on https://docs.scipy.org/doc/scipy/reference/generated/QMR.html.
Mandatory and optional parameters:
- Parameters
atol : float | None, optional
The absolute tolerance for convergence, norm(RHS.dot(sol)) <= max(tol*norm(LHS), atol).
By default it is set to None.
inner_m : int, optional
By default it is set to 30.
max_iter : int, optional
The maximum number of iterations.
By default it is set to 1000.
outer_k : int, optional
The number of vectors to carry between inner GMRES iterations.
By default it is set to 3.
outer_v : list[tuple] | None, optional
The data used to augment the Krylov subspace.
By default it is set to None.
preconditioner : ndarray | LinearOperator | None, optional
The preconditionner, approximation of RHS^-1. If None, no preconditioner is used.
By default it is set to None.
prepend_outer_v : bool, optional
Whether to put outer_v augmentation vectors before the Krylov iterates.
By default it is set to False.
save_when_fail : bool, optional
Whether to save the linear system to the disk when the solver failed to converge.
By default it is set to False.
store_outer_av : bool, optional
By default it is set to True.
store_residuals : bool, optional
Whether to store the residuals convergence history.
By default it is set to False.
tol : float, optional
The relative tolerance for convergence, norm(RHS.dot(sol)) <= max(tol*norm(LHS), atol).
By default it is set to 1e-12.
use_ilu_precond : bool, optional
Whether to use superLU to compute an incomplete LU factorization as preconditioner.
By default it is set to True.
x0 : ndarray | None, optional
The initial guess for the solution. M{sparse matrix, dense matrix, LinearOperator}. If None, solvers usually start from the null vector. inner_m int: The number of inner GMRES iterations per outer iteration.
By default it is set to None.