Changeset 11249


Ignore:
Timestamp:
01/30/12 09:36:04 (13 years ago)
Author:
seroussi
Message:

appropriate name of plot is plot_icefront not plot_pressureload

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  
    22
    33%plot neuman
    4 plot_pressureload(md,options,width,i,data)
     4plot_icefront(md,options,width,i,data)
    55
    66hold 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 BC
     1function plot_icefront(md,options,width,i,data);
     2%PLOT_ICEFRONT - plot segment on neumann BC
    33%
    44%   Usage:
    5 %      plot_pressureload(md,options,width,i);
     5%      plot_icefront(md,options,width,i);
    66%
    77%   See also: PLOTMODEL
     
    1212%process mesh and data
    1313[x y z elements is2d isplanet]=processmesh(md,[],options);
    14 pressureload=md.diagnostic.icefront;
     14icefront=md.diagnostic.icefront;
    1515
    1616if (md.mesh.dimension==2),
     
    2222
    2323        %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);
    2626        A=elements(pos,1); B=elements(pos,2); C=elements(pos,3);
    2727        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);
    3030        A=elements(pos,1); B=elements(pos,2); C=elements(pos,3);
    3131        h3=patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','green','EdgeColor','black');
    3232
    33         pos=find(pressureload(:,end)==2);
    34         pos=pressureload(pos,end-1);
     33        pos=find(icefront(:,end)==2);
     34        pos=icefront(pos,end-1);
    3535        A=elements(pos,1); B=elements(pos,2); C=elements(pos,3);
    3636        h3bis=patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','cyan','EdgeColor','black');
    3737
    3838        %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)))));
    4444        xend=xstart+length.*normal(:,1);
    4545        yend=ystart+length.*normal(:,2);
     
    5858
    5959        %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);
    6262        A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); D=elements(pos,4); E=elements(pos,5); F=elements(pos,6);
    6363        h2=patch( 'Faces', [A B C],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','blue','EdgeColor','black');
     
    6666        patch( 'Faces', [B E F C],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','blue','EdgeColor','black');
    6767        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);
    7070        A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); D=elements(pos,4); E=elements(pos,5); F=elements(pos,6);
    7171        h3=patch( 'Faces', [A B C],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','green','EdgeColor','black');
     
    7474        patch( 'Faces', [B E F C],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','green','EdgeColor','black');
    7575        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);
    7878        A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); D=elements(pos,4); E=elements(pos,5); F=elements(pos,6);
    7979        h3bis=patch( 'Faces', [A B C],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','cyan','EdgeColor','black');
     
    8484
    8585        %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)))));
    9292        xend=xstart+length.*normal(:,1);
    9393        yend=ystart+length.*normal(:,2);
  • issm/trunk-jpl/src/m/model/plot/plot_manager.m

    r11221 r11249  
    112112                        plot_sarpwr(md,options,subplotwidth,i)
    113113                        return
    114                 case 'pressureload'
    115                         plot_pressureload(md,options,subplotwidth,i,data)
     114                case 'icefront'
     115                        plot_icefront(md,options,subplotwidth,i,data)
    116116                        return
    117117                case 'segments'
  • issm/trunk-jpl/src/m/model/plot/plotdoc.m

    r10429 r11249  
    1515disp('                  - ''basal_dragx'' or ''basal_dragy'' : plot a component of the basal drag on the bed (in kPa)');
    1616disp('                  - ''boundaries'': this will draw all the segment boundaries to the model, including rifts.');
     17disp('                  - ''icefront'': this will show segments that are used to define the icefront of the model (Neumann boundary conditions).');
    1718disp('                  - ''BC'': this will draw all the boundary conditions (Dirichlet and Neumann).');
    1819disp('                  - ''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.