0001 function plot_2dmodal
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 addpath ../Level_0
0016 nx=6;
0017 lm1='0';
0018 l0='1'; l1='x';
0019 l2=pol_legendre(1,l1,l0);
0020 l3=pol_legendre(2,l2,l1);
0021 l4=pol_legendre(3,l3,l2);
0022 l5=pol_legendre(3,l4,l3);
0023 l6=pol_legendre(3,l5,l4);
0024 eta0='0.5*(1-x)';
0025 eta1=pol_modal(1,l2,l0);
0026 eta2=pol_modal(2,l3,l1);
0027 eta3=pol_modal(3,l4,l2);
0028 eta4=pol_modal(4,l5,l3);
0029 eta5=pol_modal(5,l6,l4);
0030 eta6='0.5*(1+x)';
0031
0032 nx1=25;
0033 x=linspace(-1,1,nx1)';
0034 y0=eval(eta0); y2=eval(eta2);
0035
0036 [x,y]=meshgrid(linspace(-1,1,nx1));
0037 fig=figure(...
0038 'Name','2D Modal (vertex) polynomial',...
0039 'Visible','on');
0040
0041 graymon
0042 z=y0*y0'; mesh(x,y,z)
0043 xlabel('x'); ylabel('y')
0044 view([116,32])
0045 print(fig,'-deps2','modvertex2d')
0046
0047
0048 fig=figure(...
0049 'Name','2D Modal (edge) polynomial',...
0050 'Visible','on');
0051 graymon
0052 z=y0*y2'; mesh(x,y,z)
0053 xlabel('x'); ylabel('y')
0054 view([116,32])
0055 print(2,'-deps2','modedge2d')
0056
0057
0058 fig=figure(...
0059 'Name','2D Modal (bubble) polynomial',...
0060 'Visible','on');
0061 graymon
0062 z=y2*y2'; mesh(x,y,z)
0063 xlabel('x'); ylabel('y')
0064 view([116,32])
0065 print(3,'-deps2','modbubble2d')
0066
0067
0068
0069 return
0070