Name

gf_linsolve — The linear solver

Calling Sequence

gf_linsolve('gmres', spmat M, vec b [, int restart=50][, precond P][, 'noisy'][,'res', r][,'maxiter', n])
gf_linsolve('cg', spmat M, vec b [, precond P][, 'noisy'][,'res', r][,'maxiter', n])
gf_linsolve('bicgstab', spmat M, vec b [, precond P][, 'noisy'][,'res', r][,'maxiter', n])[U,cond] = gf_linsolve('lu'|'superlu', spmat M, vec b [, precond P])

Description

  • X = gf_linsolve('gmres',Spmat M, vec b[, int restart][, Precond P][,'noisy'][,'res', r][,'maxiter', n]) Solve M.X = b with the generalized minimum residuals method. Optionally using P as preconditioner. The default value of the restart parameter is 50.

  • X = gf_linsolve('cg',Spmat M, vec b [, Precond P][,'noisy'][,'res', r][,'maxiter', n]) Solve M.X = b with the conjugated gradient method. Optionally using P as preconditioner.

  • X = gf_linsolve('bicgstab',Spmat M, vec b [, Precond P][,'noisy'][,'res', r][,'maxiter', n]) Solve M.X = b with the bi-conjugated gradient stabilized method. Optionally using P as a preconditioner.

  • list(U, cond) = gf_linsolve('lu',Spmat M, vec b) Alias for gf_linsolve('superlu',...)

  • list(U, cond) = gf_linsolve('superlu',Spmat M, vec b) Solve M.U = b apply the SuperLU solver (sparse LU factorization). The condition number estimate cond is returned with the solution U.

See Also

gf_precond_get, gf_precond

Authors

Y. Collette