Changeset 3103
- Timestamp:
- 02/23/10 16:27:41 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/public/plot/plot_pressureload.m
r3099 r3103 21 21 hold on; 22 22 23 %highlight elements on neumann in Green 24 pos=pressureload(:,end-1); 23 %highlight elements on neumann 24 pos=find(pressureload(:,end)==WaterEnum()); 25 pos=pressureload(pos,end-1); 25 26 A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); 26 h2=patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','green','EdgeColor','black'); 27 hold on; 27 h2=patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','blue','EdgeColor','black'); 28 pos=find(pressureload(:,end)==AirEnum()); 29 pos=pressureload(pos,end-1); 30 A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); 31 h3=patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','green','EdgeColor','black'); 28 32 29 33 %display arrows pointing outward … … 36 40 yend=ystart+length.*normal(:,2); 37 41 q=quiver(xstart,ystart,xend-xstart,yend-ystart); hold on; 38 h 3=plot(xstart,ystart,'r*');42 h4=plot(xstart,ystart,'r*'); 39 43 else 40 44 … … 48 52 hold on; 49 53 50 %highlight elements on neumann in Green 51 pos=pressureload(:,end-1); 54 %highlight elements on neumann 55 pos=find(pressureload(:,end)==WaterEnum()); 56 pos=pressureload(pos,end-1); 52 57 A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); D=elements(pos,4); E=elements(pos,5); F=elements(pos,6); 53 h2=patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','green','EdgeColor','black'); 58 h2=patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','blue','EdgeColor','black'); 59 patch( 'Faces', [D E F], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','blue','EdgeColor','black'); 60 patch( 'Faces', [A B E D], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','blue','EdgeColor','black'); 61 patch( 'Faces', [B E F C ], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','blue','EdgeColor','black'); 62 patch( 'Faces', [C A D F ], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','blue','EdgeColor','black'); 63 pos=find(pressureload(:,end)==AirEnum()); 64 pos=pressureload(pos,end-1); 65 A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); D=elements(pos,4); E=elements(pos,5); F=elements(pos,6); 66 h3=patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','green','EdgeColor','black'); 54 67 patch( 'Faces', [D E F], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','green','EdgeColor','black'); 55 68 patch( 'Faces', [A B E D], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','green','EdgeColor','black'); 56 69 patch( 'Faces', [B E F C ], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','green','EdgeColor','black'); 57 70 patch( 'Faces', [C A D F ], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','green','EdgeColor','black'); 58 hold on;59 71 60 72 %display arrows pointing outward … … 73 85 %legend (disable warnings) 74 86 warning off 75 legend([h2, q],'element on ice front','normal vectors')87 legend([h2,h3,q],'element on ice front (Water)','element on ice front (Air)','normal vectors') 76 88 warning on 77 89
Note:
See TracChangeset
for help on using the changeset viewer.