www.pudn.com > 87361026FEA.rar > lstest.m, change:2002-10-01,size:472b



numx=5;
node=square_node_array([-1 -1],[1 -1],[1 1],[-1 1],numx,numx);
nn=size(node,1); 
element=[make_elem([1 2 numx+1],numx-1,numx-1,1,numx);
         make_elem([numx+2 numx+1 2],numx-1,numx-1,1,numx)];
       
phi = sqrt(node(:,1).^2+node(:,2).^2)-0.5; 

[gradPhi,M,A]=getGradientField(node,element,phi);
kappa=getCurvature(node,element,gradPhi);

[gradPhi(1:nn) gradPhi(nn+1:2*nn)];
 
clf
plot_field(node,element,'T3',kappa)
hold on
plot_mesh(node,element,'T3','k-')