comparison scripts/sparse/gmres.m @ 12763:f511bfe00d14

maint: Periodic merge of stable to default
author Rik <octave@nomad.inbox5.com>
date Tue, 21 Jun 2011 08:58:56 -0700
parents scripts/linear-algebra/gmres.m@13bcd62824a7 scripts/linear-algebra/gmres.m@25d4e163ee38
children e5aaba072d2b
comparison
equal deleted inserted replaced
12759:34cd2fcfdcb8 12763:f511bfe00d14
13 ## for more details. 13 ## for more details.
14 ## 14 ##
15 ## You should have received a copy of the GNU General Public License 15 ## You should have received a copy of the GNU General Public License
16 ## along with Octave; see the file COPYING. If not, see 16 ## along with Octave; see the file COPYING. If not, see
17 ## <http://www.gnu.org/licenses/>. 17 ## <http://www.gnu.org/licenses/>.
18 18
19 ## -*- texinfo -*- 19 ## -*- texinfo -*-
20 ## @deftypefn {Function File} {@var{x} =} gmres (@var{A}, @var{b}, @var{m}, @var{rtol}, @var{maxit}, @var{M1}, @var{M2}, @var{x0}) 20 ## @deftypefn {Function File} {@var{x} =} gmres (@var{A}, @var{b}, @var{m}, @var{rtol}, @var{maxit}, @var{M1}, @var{M2}, @var{x0})
21 ## @deftypefnx {Function File} {@var{x} =} gmres (@var{A}, @var{b}, @var{m}, @var{rtol}, @var{maxit}, @var{P}) 21 ## @deftypefnx {Function File} {@var{x} =} gmres (@var{A}, @var{b}, @var{m}, @var{rtol}, @var{maxit}, @var{P})
22 ## @deftypefnx {Function File} {[@var{x}, @var{flag}, @var{relres}, @var{iter}, @var{resvec}] =} gmres (@dots{}) 22 ## @deftypefnx {Function File} {[@var{x}, @var{flag}, @var{relres}, @var{iter}, @var{resvec}] =} gmres (@dots{})
23 ## Solve @code{A x = b} using the Preconditioned GMRES iterative method 23 ## Solve @code{A x = b} using the Preconditioned GMRES iterative method
67 ## 67 ##
68 ## @item @var{resvec} is a vector containing the relative residual at each 68 ## @item @var{resvec} is a vector containing the relative residual at each
69 ## iteration. 69 ## iteration.
70 ## @end itemize 70 ## @end itemize
71 ## 71 ##
72 ## @seealso{pcg, cgs, bigcstab} 72 ## @seealso{pcg, cgs, bicgstab}
73 ## @end deftypefn 73 ## @end deftypefn
74 74
75 function [x, flag, prec_res_norm, itcnt] = gmres (A, b, restart, rtol, maxit, M1, M2, x0) 75 function [x, flag, prec_res_norm, itcnt] = gmres (A, b, restart, rtol, maxit, M1, M2, x0)
76 76
77 if (nargin < 2 || nargin > 8) 77 if (nargin < 2 || nargin > 8)