15.12.2012 Views

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SciPy Reference Guide, Release 0.8.dev<br />

gmres(A, b, x0=None, tol=1.0000000000000001e-05, restrt=20, maxiter=None, xtype=None, M=None, callback=None)<br />

Use Generalized Minimal RESidual iteration to solve A x = b<br />

See Also:<br />

Parameters<br />

A : {sparse matrix, dense matrix, LinearOperator}<br />

LinearOperator<br />

The N-by-N matrix of the linear system.<br />

b : {array, matrix}<br />

Right hand side of the linear system. Has shape (N,) or (N,1).<br />

lgmres(A, b, x0=None, tol=1.0000000000000001e-05, maxiter=1000, M=None, callback=None, inner_m=30,<br />

outer_k=3, outer_v=None, store_outer_Av=True)<br />

Solve a matrix equation using the LGMRES algorithm.<br />

The LGMRES algorithm [BJM] [BPh] is designed to avoid some problems in the convergence in restarted<br />

GMRES, and often converges in fewer iterations.<br />

Parameters<br />

A : {sparse matrix, dense matrix, LinearOperator}<br />

The N-by-N matrix of the linear system.<br />

b : {array, matrix}<br />

Right hand side of the linear system. Has shape (N,) or (N,1).<br />

x0 : {array, matrix}<br />

tol : float<br />

Starting guess for the solution.<br />

Tolerance to achieve. The algorithm terminates when either the relative or the absolute<br />

residual is below tol.<br />

maxiter : integer<br />

Maximum number of iterations. Iteration will stop after maxiter steps even if the<br />

specified tolerance has not been achieved.<br />

M : {sparse matrix, dense matrix, LinearOperator}<br />

Preconditioner for A. The preconditioner should approximate the inverse of A. Effective<br />

preconditioning dramatically improves the rate of convergence, which implies<br />

that fewer iterations are needed to reach a given error tolerance.<br />

callback : function<br />

User-supplied function to call after each iteration. It is called as callback(xk), where<br />

xk is the current solution vector.<br />

Returns<br />

x : array or matrix<br />

The converged solution.<br />

info : integer<br />

396 Chapter 3. Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!