Find a root of a function, using Krylov approximation for inverse Jacobian.
This method is suitable for solving large-scale problems.
Parameters : | F : function(x) -> f
x0 : array_like
rdiff : float, optional
method : {‘lgmres’, ‘gmres’, ‘bicgstab’, ‘cgs’, ‘minres’} or function
inner_M : LinearOperator or InverseJacobian
inner_tol, inner_maxiter, ... :
outer_k : int, optional
iter : int, optional
verbose : bool, optional
maxiter : int, optional
f_tol : float, optional
f_rtol : float, optional
x_tol : float, optional
x_rtol : float, optional
tol_norm : function(vector) -> scalar, optional
line_search : {None, ‘armijo’ (default), ‘wolfe’}, optional
callback : function, optional
|
---|---|
Returns : | sol : ndarray
|
Raises : | NoConvergence :
|
Notes
This function implements a Newton-Krylov solver. The basic idea is to compute the inverse of the Jacobian with an iterative Krylov method. These methods require only evaluating the Jacobian-vector products, which are conveniently approximated by numerical differentiation:
Due to the use of iterative matrix inverses, these methods can deal with large nonlinear problems.
Scipy’s scipy.sparse.linalg module offers a selection of Krylov solvers to choose from. The default here is lgmres, which is a variant of restarted GMRES iteration that reuses some of the information obtained in the previous Newton steps to invert Jacobians in subsequent steps.
For a review on Newton-Krylov methods, see for example [KK], and for the LGMRES sparse inverse method, see [BJM].
References
[KK] | (1, 2) D.A. Knoll and D.E. Keyes, J. Comp. Phys. 193, 357 (2003). |
[BJM] | (1, 2) A.H. Baker and E.R. Jessup and T. Manteuffel, SIAM J. Matrix Anal. Appl. 26, 962 (2005). |