0001 function x=iblss(A,b,p,lam)
0002
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