Home > p2plib > iblss.m

iblss

PURPOSE ^

IterativeBorderedLinearSystemSolver, template for customization by user

SYNOPSIS ^

function x=iblss(A,b,p,lam)

DESCRIPTION ^

 IterativeBorderedLinearSystemSolver, template for customization by user

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function x=iblss(A,b,p,lam) 
0002 % IterativeBorderedLinearSystemSolver, template for customization by user
0003 global bL bU bgmcount;
0004 flag=1; 
0005 while(flag~=0)
0006   if(size(bL,1)~=size(A,1)) fprintf('new LU ...'); tic;
0007       [bL,bU]=luinc(A,1e-6);toc; gmcount=0;end 
0008   tic;[x,flag,rr]=gmres(A,b,5,1e-6,10,bL,bU);s1=toc; gmcount=gmcount+1; 
0009   fprintf('flag=%i, res=%g, gmresc=%i, time=%g\n',flag, rr, gmcount,s1);
0010   if(flag~=0) fprintf('gmres, flag=%i, res=%g\n', flag, rr);
0011      fprintf('new LU ...'); tic;[bL,bU]=luinc(A,1e-6); toc; gmcount=0;
0012   end
0013 end

Generated on Wed 15-Aug-2012 10:09:15 by m2html © 2005