0001 function plot_quivervel(md,options_structure,width,i);
0002
0003
0004
0005
0006
0007
0008
0009
0010 [x y z elements is2d]=processmesh(md,options_structure);
0011 [vx isongrid]=processdata(md,md.vx,options_structure);
0012 [vy isongrid]=processdata(md,md.vy,options_structure);
0013 if ~isnan(md.vz)
0014 [vz isongrid]=processdata(md,md.vz,options_structure);
0015 end
0016
0017
0018 if ~isnan(options_structure.edgecolor),
0019 edgecolor=options_structure.edgecolor;
0020 else
0021 edgecolor='none';
0022 end
0023
0024
0025 subplot(width,width,i);
0026
0027 if is2d
0028 hold on
0029 colormap('default')
0030 A=elements(:,1); B=elements(:,2); C=elements(:,3);
0031 patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', data,'FaceColor','interp','EdgeColor',edgecolor);
0032 colorbar;
0033 quiver(x,y,vx,vy,'k')
0034 alpha(0.7)
0035 else
0036 hold on
0037 colormap('default')
0038 A=elements(:,1); B=elements(:,2); C=elements(:,3); D=elements(:,4); E=elements(:,5); F=elements(:,6);
0039 patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', data,'FaceColor','interp','EdgeColor',edgecolor);
0040 patch( 'Faces', [D E F], 'Vertices', [x y z],'FaceVertexCData', data,'FaceColor','interp','EdgeColor',edgecolor);
0041 patch( 'Faces', [A B E D], 'Vertices', [x y z],'FaceVertexCData', data,'FaceColor','interp','EdgeColor',edgecolor);
0042 patch( 'Faces', [B E F C ], 'Vertices', [x y z],'FaceVertexCData', data,'FaceColor','interp','EdgeColor',edgecolor);
0043 patch( 'Faces', [C A D F ], 'Vertices', [x y z],'FaceVertexCData', data,'FaceColor','interp','EdgeColor',edgecolor);
0044 colorbar;
0045 quiver3(x,y,z,vx,vy,vz);
0046 alpha(0.7)
0047 end
0048
0049
0050 if isnan(options_structure.title)
0051 options_structure.title='Velocity';
0052 end
0053 if isnan(options_structure.colorbar)
0054 options_structure.colorbar=1;
0055 end
0056 applyoptions(md,[],options_structure);