<< sp_cgs Sparse functions sp_lu >>

SciGetFem >> SciGetFem > Sparse functions > sp_cgs

sp_cgs

Use a conjugate gradient to solve the system A.x = b

Calling Sequence

[xsol[,iter[,residual]]] = sp_cgs(A,b,tol[,maxit[,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.

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.

residual

the residual vector of the system of equations.

Description

Use a conjugate gradient to solve the system A.x = b

Example

See Also

Authors

<< sp_cgs Sparse functions sp_lu >>