Changeset 11249
- Timestamp:
- 01/30/12 09:36:04 (13 years ago)
- Location:
- issm/trunk-jpl/src/m/model/plot
- Files:
-
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/model/plot/plot_BC.m
r10429 r11249 2 2 3 3 %plot neuman 4 plot_ pressureload(md,options,width,i,data)4 plot_icefront(md,options,width,i,data) 5 5 6 6 hold on -
issm/trunk-jpl/src/m/model/plot/plot_icefront.m
r11235 r11249 1 function plot_ pressureload(md,options,width,i,data);2 %PLOT_ PRESSURELOAD- plot segment on neumann BC1 function plot_icefront(md,options,width,i,data); 2 %PLOT_ICEFRONT - plot segment on neumann BC 3 3 % 4 4 % Usage: 5 % plot_ pressureload(md,options,width,i);5 % plot_icefront(md,options,width,i); 6 6 % 7 7 % See also: PLOTMODEL … … 12 12 %process mesh and data 13 13 [x y z elements is2d isplanet]=processmesh(md,[],options); 14 pressureload=md.diagnostic.icefront;14 icefront=md.diagnostic.icefront; 15 15 16 16 if (md.mesh.dimension==2), … … 22 22 23 23 %highlight elements on neumann 24 pos=find( pressureload(:,end)==1);25 pos= pressureload(pos,end-1);24 pos=find(icefront(:,end)==1); 25 pos=icefront(pos,end-1); 26 26 A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); 27 27 h2=patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','blue','EdgeColor','black'); 28 pos=find( pressureload(:,end)==0);29 pos= pressureload(pos,end-1);28 pos=find(icefront(:,end)==0); 29 pos=icefront(pos,end-1); 30 30 A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); 31 31 h3=patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','green','EdgeColor','black'); 32 32 33 pos=find( pressureload(:,end)==2);34 pos= pressureload(pos,end-1);33 pos=find(icefront(:,end)==2); 34 pos=icefront(pos,end-1); 35 35 A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); 36 36 h3bis=patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','cyan','EdgeColor','black'); 37 37 38 38 %display arrows pointing outward 39 xstart=mean(x( pressureload(:,1:end-2)),2);40 ystart=mean(y( pressureload(:,1:end-2)),2);41 length=sqrt((x( pressureload(:,1))-x(pressureload(:,2))).^2 + (y(pressureload(:,1))-y(pressureload(:,2))).^2 );42 normal(:,1)=cos(atan2((x( pressureload(:,1))-x(pressureload(:,2))) , (y(pressureload(:,2))-y(pressureload(:,1)))));43 normal(:,2)=sin(atan2((x( pressureload(:,1))-x(pressureload(:,2))) , (y(pressureload(:,2))-y(pressureload(:,1)))));39 xstart=mean(x(icefront(:,1:end-2)),2); 40 ystart=mean(y(icefront(:,1:end-2)),2); 41 length=sqrt((x(icefront(:,1))-x(icefront(:,2))).^2 + (y(icefront(:,1))-y(icefront(:,2))).^2 ); 42 normal(:,1)=cos(atan2((x(icefront(:,1))-x(icefront(:,2))) , (y(icefront(:,2))-y(icefront(:,1))))); 43 normal(:,2)=sin(atan2((x(icefront(:,1))-x(icefront(:,2))) , (y(icefront(:,2))-y(icefront(:,1))))); 44 44 xend=xstart+length.*normal(:,1); 45 45 yend=ystart+length.*normal(:,2); … … 58 58 59 59 %highlight elements on neumann 60 pos=find( pressureload(:,end)==1);61 pos= pressureload(pos,end-1);60 pos=find(icefront(:,end)==1); 61 pos=icefront(pos,end-1); 62 62 A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); D=elements(pos,4); E=elements(pos,5); F=elements(pos,6); 63 63 h2=patch( 'Faces', [A B C],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','blue','EdgeColor','black'); … … 66 66 patch( 'Faces', [B E F C],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','blue','EdgeColor','black'); 67 67 patch( 'Faces', [C A D F],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','blue','EdgeColor','black'); 68 pos=find( pressureload(:,end)==0);69 pos= pressureload(pos,end-1);68 pos=find(icefront(:,end)==0); 69 pos=icefront(pos,end-1); 70 70 A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); D=elements(pos,4); E=elements(pos,5); F=elements(pos,6); 71 71 h3=patch( 'Faces', [A B C],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','green','EdgeColor','black'); … … 74 74 patch( 'Faces', [B E F C],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','green','EdgeColor','black'); 75 75 patch( 'Faces', [C A D F],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','green','EdgeColor','black'); 76 pos=find( pressureload(:,end)==2);77 pos= pressureload(pos,end-1);76 pos=find(icefront(:,end)==2); 77 pos=icefront(pos,end-1); 78 78 A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); D=elements(pos,4); E=elements(pos,5); F=elements(pos,6); 79 79 h3bis=patch( 'Faces', [A B C],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','cyan','EdgeColor','black'); … … 84 84 85 85 %display arrows pointing outward 86 xstart=mean(x( pressureload(:,1:end-2)),2);87 ystart=mean(y( pressureload(:,1:end-2)),2);88 zstart=mean(z( pressureload(:,1:end-2)),2);89 length=sqrt((x( pressureload(:,1))-x(pressureload(:,2))).^2 + (y(pressureload(:,1))-y(pressureload(:,2))).^2 );90 normal(:,1)=cos(atan2((x( pressureload(:,1))-x(pressureload(:,2))) , (y(pressureload(:,2))-y(pressureload(:,1)))));91 normal(:,2)=sin(atan2((x( pressureload(:,1))-x(pressureload(:,2))) , (y(pressureload(:,2))-y(pressureload(:,1)))));86 xstart=mean(x(icefront(:,1:end-2)),2); 87 ystart=mean(y(icefront(:,1:end-2)),2); 88 zstart=mean(z(icefront(:,1:end-2)),2); 89 length=sqrt((x(icefront(:,1))-x(icefront(:,2))).^2 + (y(icefront(:,1))-y(icefront(:,2))).^2 ); 90 normal(:,1)=cos(atan2((x(icefront(:,1))-x(icefront(:,2))) , (y(icefront(:,2))-y(icefront(:,1))))); 91 normal(:,2)=sin(atan2((x(icefront(:,1))-x(icefront(:,2))) , (y(icefront(:,2))-y(icefront(:,1))))); 92 92 xend=xstart+length.*normal(:,1); 93 93 yend=ystart+length.*normal(:,2); -
issm/trunk-jpl/src/m/model/plot/plot_manager.m
r11221 r11249 112 112 plot_sarpwr(md,options,subplotwidth,i) 113 113 return 114 case ' pressureload'115 plot_ pressureload(md,options,subplotwidth,i,data)114 case 'icefront' 115 plot_icefront(md,options,subplotwidth,i,data) 116 116 return 117 117 case 'segments' -
issm/trunk-jpl/src/m/model/plot/plotdoc.m
r10429 r11249 15 15 disp(' - ''basal_dragx'' or ''basal_dragy'' : plot a component of the basal drag on the bed (in kPa)'); 16 16 disp(' - ''boundaries'': this will draw all the segment boundaries to the model, including rifts.'); 17 disp(' - ''icefront'': this will show segments that are used to define the icefront of the model (Neumann boundary conditions).'); 17 18 disp(' - ''BC'': this will draw all the boundary conditions (Dirichlet and Neumann).'); 18 19 disp(' - ''deviatoricstress_tensor'': plot the components of the deviatoric stress tensor (tauxx,tauyy,tauzz,tauxy,tauxz,tauyz) if computed');
Note:
See TracChangeset
for help on using the changeset viewer.