Home > Src > Eigenvalues_1d > fig4_7.m

fig4_7

PURPOSE ^

FIG4_7 Script to produce Fig 4.7, pag. 199 CHQZ2.

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 FIG4_7  Script to produce Fig 4.7, pag. 199 CHQZ2. 

 Extreme eigenvalues of 
 Legendre G-NI stiffness matrices for the 2nd order derivative operator

 Reference: CHQZ2 = C. Canuto, M.Y. Hussaini, A. Quarteroni, T.A. Zang,
                    "Spectral Methods. Fundamentals in Single Domains"
                    Springer Verlag, Berlin Heidelberg New York, 2006.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % FIG4_7  Script to produce Fig 4.7, pag. 199 CHQZ2.
0002 %
0003 % Extreme eigenvalues of
0004 % Legendre G-NI stiffness matrices for the 2nd order derivative operator
0005 %
0006 % Reference: CHQZ2 = C. Canuto, M.Y. Hussaini, A. Quarteroni, T.A. Zang,
0007 %                    "Spectral Methods. Fundamentals in Single Domains"
0008 %                    Springer Verlag, Berlin Heidelberg New York, 2006.
0009 
0010 %   Written by Paola Gervasio
0011 %   $Date: 2007/04/01$
0012 
0013 
0014 dmin=[];dmax=[];
0015 N=(8:8:96);
0016     nu=1;
0017     pbl=31;
0018 % left
0019 for nx=N
0020     [d,A]=lgl_eig(nx,nu,pbl);
0021     dmin=[dmin;min(d)];
0022     dmax=[dmax;max(d)];
0023 end
0024 fig=figure(...,
0025     'Name','Fig. 4.7 left',...
0026     'Visible','on')
0027 loglog(N,dmin,'k-.',N,dmax,'k-')
0028 set(gca,'Xlimmode','manual','Xlim',[5,100],...
0029     'Ylimmode','manual','Ylim',[1.e-4,1.e6],...
0030     'Xgrid','on','XminorGrid','off','Ygrid','on','YminorGrid','off',...
0031 'LineWidth',1,...
0032 'FontName','Times','Fontsize',16,'FontWeight','normal')
0033 
0034 % right
0035 dmin1=[];dmax1=[];
0036 pbl=41;
0037 for nx=N
0038     [d,A]=lgl_eig(nx,nu,pbl);
0039 temp=[];
0040 for i=1:length(A);
0041 if abs(d(i))>1.d-12
0042 temp=[temp;d(i)];
0043 end
0044 end
0045 dmin1=[dmin1;min(abs(temp))];
0046 dmax1=[dmax1;max(d)];
0047 end
0048 fig=figure(...,
0049     'Name','Fig. 4.7 right',...
0050     'Visible','on')
0051 loglog(N,dmin1,'k-.',N,dmax1,'k-')
0052 set(gca,'Xlimmode','manual','Xlim',[5,100],...
0053     'Ylimmode','manual','Ylim',[1.e-4,1.e6],...
0054     'Xgrid','on','XminorGrid','off','Ygrid','on','YminorGrid','off',...
0055 'LineWidth',1,...
0056 'FontName','Times','Fontsize',16,'FontWeight','normal')
0057

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