function smooth_pt_ave_error_est () % Copyright 2000 J.E. Akin. All rights reserved. % plot finite element ave node error est as a surface % convert any type of mesh to a structured square mesh % x,y == nodal coordinates of the FEA % f == nodal solution of the FEA % X,Y == nodal coordinates of the structured square mesh % F == interpolated solution for the structured square mesh % NX == number of nodes in x-direction for structured mesh % NY == number of nodes in y-direction for structured mesh % clear load msh_bc_xyz.tmp; np = size (msh_bc_xyz, 1); load pt_ave_error_est.tmp nr = size (pt_ave_error_est, 1); if ( nr == 0 ) error ('Error missing file pt_ave_error_est.tmp') end % if error % NX, NY = 31 are default values, these can be altered by user NX = 31; NY = 31; x = msh_bc_xyz (:, 2); y = msh_bc_xyz (:, 3); f = pt_ave_error_est (:); xlin = linspace (min(x), max(x), NX); ylin = linspace (min(y), max(y), NY); [X, Y] = meshgrid (xlin, ylin); F = griddata (x, y, f, X, Y, 'cubic'); clf meshc (X, Y, F) hold on xlabel ('X') ; ylabel (['Y: ', int2str(np),' Nodes']) %xlabel ('X'); ylabel ('Y'); zlabel ('FEA SCP Average Nodal Error Est, % * 100'); title ('Matlab Smoothed FEA SCP Average Nodal Energy Norm Error, % * 100') % -depsc -tiff % for an eps version print -dpsc smooth_pt_ave_error_est hold off fprintf ('Created file smooth_pt_ave_error_est.ps \n') % end of smooth_pt_ave_error_est