0001
0002
0003 [uex,uex_x,uex_y,f,g,h,gam]=setfun_lap_2d;
0004
0005 xa=-2;xb=2;
0006 ya=0;yb=1;
0007 cb=['nndd'];
0008 for nex=4;
0009 ney=nex;
0010 for nx=4:10
0011 ny=nx;
0012 param=zeros(20,1);
0013 param(1)=1;
0014 param(2)=2;
0015 param(3)=1;
0016
0017
0018
0019 param(4)=1;
0020 param(5)=1;
0021 param(6)=nx*2;
0022 param(7)=1;
0023 param(8)=0;
0024 param(9)=(nx+1);
0025 gammax=[]; gammay=[];
0026
0027
0028
0029
0030 [xy,un,D,param]=lap_2d(xa,xb,ya,yb,gam,uex,uex_x,uex_y,f,g,h,cb,...
0031 nex,nx,ney,ny,gammax,gammay,param);
0032
0033
0034 if (param(3)==1 | param(3)==3)
0035 fprintf('nx=%d,nex=%d,err_inf=%11.4e, err_h1=%11.4e,err_l2=%11.4e \n',...
0036 nx,nex,param(29),param(30),param(31))
0037 elseif(param(3)==2)
0038 fprintf('nx=%d,nex=%d,lam_max(A)=%11.4e, lam_min(A)=%11.4e, k(A)=%11.4e \n',...
0039 nx,nex,param(23),param(24),abs(param(23))/abs(param(24)));
0040 elseif(param(3)==4)
0041 fprintf('nx=%d,nex=%d,lam_max(S)=%11.4e, lam_min(S)=%11.4e, k(S)=%11.4e \n',...
0042 nx,nex,param(25),param(26),abs(param(25))/abs(param(26)));
0043 elseif(param(3)==6)
0044 fprintf('nx=%d,nex=%d,lam_max(M^{-1}A)=%11.4e, lam_min(M^{-1}A)=%11.4e, k(M^{-1}A)=%11.4e \n',...
0045 nx,nex,param(27),param(28),abs(param(27))/abs(param(28)));
0046 end
0047
0048 end
0049 end