Home > Src > Elliptic_1d > call_ellprecofem_1d.m

call_ellprecofem_1d

PURPOSE ^

CALL_ELLPRECOFEM_1D Script to set data for calling ellprecofem_1d.

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 CALL_ELLPRECOFEM_1D Script to set data for calling ellprecofem_1d. 

 See help of ellprecofem_1d.m for a description of inputs

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % CALL_ELLPRECOFEM_1D Script to set data for calling ellprecofem_1d.
0002 %
0003 % See help of ellprecofem_1d.m for a description of inputs
0004 
0005 xa=-1;xb=1;
0006 param=zeros(20,1);
0007 param(1)=1;  % preconditioner
0008 param(2)=11; % solver or eigenvalues computation
0009 param(3)=1.d-14; % tolerance
0010 param(4)=400;    % maximum number of iterations
0011 [uex,uexx,ff,nu,beta,gam]=setfun_ell_1d;
0012 ne=1;
0013 cb='dd';  ub=[uex(xa),uex(xb)];
0014 % cb='nn';  ub=[uexx(xa),uexx(xb)];
0015 % cb='dn';  ub=[uex(xa),uexx(xb)];
0016 % cb='nd';  ub=[uexx(xa),uex(xb)];
0017 % ub=[0,0];
0018 % fprintf('nx       ne   err_h1            iter           res\n');
0019 if(param(2)>10)
0020     fprintf('nx   ne   kapit\n');
0021 else
0022     fprintf('nx   ne   err_h1      iter       res\n');
0023 end
0024 for nx=16:16:48;
0025 [xy,un,A,M,AFE,MFE,MFEd,d,kappa,param]=ellprecofem_1d(xa,xb,nu,beta,gam,ff,cb,...
0026     ub,ne,nx,param);
0027 if(param(2)>10)
0028     fprintf('%d   %d   %13.6e \n',nx,ne,kappa)
0029 elseif(param(2)<=10)
0030     % errors computation
0031 param1=zeros(10,1);
0032 param1(1:6)=[1,0,nx*2,1,1,64]; % see help ellprecofem_1d
0033 [err_inf,err_h1,err_l2]=errors_1d(nx,ne,xa,xb,un,uex,uexx,param1);
0034 fprintf('%d   %d   %13.6e   %d     %13.6e \n',nx,ne,err_h1,param(11),param(12))
0035 end    
0036 end
0037 
0038 return

Generated on Fri 21-Sep-2007 10:07:00 by m2html © 2003