CALL_SCHUR_2D Script for pre and post processing schur_2d.m help schur_2d to set input data
0001 % CALL_SCHUR_2D Script for pre and post processing schur_2d.m 0002 % 0003 % help schur_2d to set input data 0004 0005 % Written by Paola Gervasio 0006 % $Date: 2007/04/01$ 0007 0008 [uex,uex_x,uex_y,ff,g,h,gam]=setfun_lap_2d; % -Delta u + gam *u =f 0009 % 0010 xa=-1;xb=1; % Omega=(xa,xb) x (ya,yb) 0011 ya=-1;yb=1; 0012 cb='dddd'; % schur_2d works only if cb='dddd'; 0013 param=zeros(20,1); 0014 param(1)=2; % 1:P=I, 2: P=NN, 3: P=bNN 0015 param(4)=1; % computes errors 0016 fprintf('nx nex iter res err_inf err_h1 err_l2\n') 0017 for nex=4:4:16; 0018 ney=nex; % decomposition of Omega in nex x ney rectangles 0019 for nx=4 % polynomial degree in each element along x-direction 0020 ny=nx; % polynomial degree in each element along y-direction 0021 param(5)=1; % 0 exact norms, 1= discrete norms 0022 param(6)=nx*2; % nq for LG quadrature formulas 0023 param(7)=1; % 0 =absolute errors, 1=relative errors 0024 param(8)=0; % 0 no plot, 1 mesh, 2 surf, 3 contour 0025 param(9)=(nx+1); % nodes used to plot numerical solution 0026 param(10)=1.d-12; % tolerance for pcg 0027 param(11)=400; % maxit for pcg 0028 gammax=[]; gammay=[]; % if SEM decomposition is not uniform: 0029 % they are the arrays with intefaces positions 0030 0031 % call schur 0032 0033 [xy,un,param]=schur_2d(xa,xb,ya,yb,gam,... 0034 uex,uex_x,uex_y,ff,g,h,cb,nex,nx,ney,ny,gammax,gammay,param); 0035 0036 % output 0037 fprintf('%d %d %d %11.4e %11.4e %11.4e %11.4e \n',... 0038 nx,nex,param(21), param(22), param(25),param(26),param(27)) 0039 0040 end 0041 end