Changeset 7380


Ignore:
Timestamp:
02/07/11 16:23:42 (14 years ago)
Author:
seroussi
Message:

added all type of elements in plot_elements_type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/model/plot/plot_elementstype.m

    r6501 r7380  
    3535        p5=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',MacAyealPattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    3636        %Stokes elements
    37         alpha=0.35;
    3837        posS=find(data==StokesApproximationEnum);
    39         if ~isempty(posS)
    40                 A=elements(posS,1); B=elements(posS,2); C=elements(posS,3);
    41         %       p4=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',StokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor,'EdgeAlpha',alpha,'FaceAlpha',alpha);
    42         %       legend([p1 p2 p3 p4],'Hutter''s elements','MacAyeal''s elements','Pattyn''s elements','Stokes''s elements');
    43         else
    44                 legend([p1 p2 p3 p5],'Hutter''s elements','MacAyeal''s elements','Pattyn''s elements','MacAyealPattyn''s elements');
    45         end
     38        A=elements(posS,1); B=elements(posS,2); C=elements(posS,3);
     39        p6=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',StokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     40        %MacAyealStokes elements
     41        posMS=find(data==MacAyealStokesApproximationEnum);
     42        A=elements(posMS,1); B=elements(posMS,2); C=elements(posMS,3);
     43        p7=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',MacAyealStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     44        %PattynStokes elements
     45        posPS=find(data==PattynStokesApproximationEnum);
     46        A=elements(posPS,1); B=elements(posPS,2); C=elements(posPS,3);
     47        p8=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',PattynStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     48        legend([p1 p2 p3 p5 p6 p7 p8],'Hutter''s elements','MacAyeal''s elements','Pattyn''s elements','MacAyealPattyn''s elements','Stokes''s elements','MacAyealStokes''s elements','PattynStokes''s elements');
    4649else
    4750        %Hutter elements
     
    7073        patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', PattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    7174        %Stokes elements
     75        save data data
    7276        posS=find(data==StokesApproximationEnum);
    7377        A=elements(posS,1); B=elements(posS,2); C=elements(posS,3); D=elements(posS,4); E=elements(posS,5); F=elements(posS,6);
     
    9397        patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', PattynStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    9498        patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', PattynStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    95         legend([p1 p2 p3 p4 p5 p6],'Hutter''s elements','MacAyeal''s elements','Pattyn''s elements','Stokes''s elements','MacAyealPattyn''s elements','PattynStokes''s elements');
     99        %MacAyealStokes elements
     100        PosMS=find(data==MacAyealStokesApproximationEnum);
     101        A=elements(PosMS,1); B=elements(PosMS,2); C=elements(PosMS,3); D=elements(PosMS,4); E=elements(PosMS,5); F=elements(PosMS,6);
     102        p7=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', MacAyealStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     103        patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', MacAyealStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     104        patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', MacAyealStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     105        patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', MacAyealStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     106        patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', MacAyealStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     107        legend([p1 p2 p3 p4 p5 p6 p7],'Hutter''s elements','MacAyeal''s elements','Pattyn''s elements','Stokes''s elements','MacAyealPattyn''s elements','PattynStokes''s elements','MacAyealStokes''s elements');
    96108end
    97109
Note: See TracChangeset for help on using the changeset viewer.