Name

sp_cgs — Use a generalized minimum residual algorithm of Saad & Schultz to solve the system A.x = b

Calling Sequence

[xsol[,iter]] = sp_gmres(A,b,tol[,maxit[,k[,M[,x0]]]])

Parameters

A

the A real sparse matrix of the system to be solved.

b

the b real vector of the system to be solved.

tol

the tolerance for the resolution of the equation system.

k

no. of direction (search) vectors; = 0 - none.

maxit

the maximum number of iteration of the solver.

M

the preconditionning matrix (an identity matrix by default).

x0

an initial starting solution.

xsol

the solution vector of the system.

iter

the number of iterations performed to solve the system.

Description

Use a generalized minimum residual algorithm of Saad & Schultz to solve the system A.x = b

Example

 
 

See Also

sp_luinc, sp_chol, sp_cholinc, sp_lu, sp_cgne, sp_mgcr, sp_cgs, sp_chsolve, sp_lusolve

Authors

Yann COLLETTE