Changeset 5126


Ignore:
Timestamp:
08/10/10 14:33:22 (15 years ago)
Author:
seroussi
Message:

same in matlab Formulation -> Approximation

Location:
issm/trunk/src/m/classes/public
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/public/extrude.m

    r5071 r5126  
    186186        %dead grids
    187187        md.deadgrids=ones(md.numberofgrids,1);
    188         md.deadgrids(md.elements(md.elements_type(:,1)~=MacAyealFormulationEnum,:))=0;%non macayeal grids are not dead
     188        md.deadgrids(md.elements(md.elements_type(:,1)~=MacAyealApproximationEnum,:))=0;%non macayeal grids are not dead
    189189        md.deadgrids(find(md.gridonbed))=0;%grids from elements on bed are not dead
    190190end
  • issm/trunk/src/m/classes/public/ismodelselfconsistent.m

    r5071 r5126  
    5858checksize(md,fields,[md.numberofelements 2]);
    5959%Check the values of elements_type(1)
    60 checkvalues(md,{'elements_type(:,1)'},[MacAyealFormulationEnum() HutterFormulationEnum() PattynFormulationEnum()]);
     60checkvalues(md,{'elements_type(:,1)'},[MacAyealApproximationEnum() HutterApproximationEnum() PattynApproximationEnum()]);
    6161%Check the values of elements_type(2)
    62 checkvalues(md,{'elements_type(:,2)'},[StokesFormulationEnum() NoneFormulationEnum()]);
     62checkvalues(md,{'elements_type(:,2)'},[StokesApproximationEnum() NoneApproximationEnum()]);
    6363if (md.dim==2),
    64         checkvalues(md,{'elements_type(:,1)'},[MacAyealFormulationEnum() HutterFormulationEnum()]);
     64        checkvalues(md,{'elements_type(:,1)'},[MacAyealApproximationEnum() HutterApproximationEnum()]);
    6565end
    6666if (md.ismacayealpattyn==0 && md.ishutter==0 && md.isstokes==0),
     
    7373checksize(md,fields,[md.numberofgrids 2]);
    7474%Check the values of elements_type(1)
    75 checkvalues(md,{'elements_type(:,1)'},[MacAyealFormulationEnum() HutterFormulationEnum() PattynFormulationEnum() MacAyealPattynFormulationEnum()]);
     75checkvalues(md,{'elements_type(:,1)'},[MacAyealApproximationEnum() HutterApproximationEnum() PattynApproximationEnum() MacAyealPattynApproximationEnum()]);
    7676%Check the values of elements_type(2)
    77 checkvalues(md,{'elements_type(:,2)'},[StokesFormulationEnum() NoneFormulationEnum()]);
     77checkvalues(md,{'elements_type(:,2)'},[StokesApproximationEnum() NoneApproximationEnum()]);
    7878if (md.dim==2),
    79         checkvalues(md,{'elements_type(:,1)'},[MacAyealFormulationEnum() HutterFormulationEnum()]);
     79        checkvalues(md,{'elements_type(:,1)'},[MacAyealApproximationEnum() HutterApproximationEnum()]);
    8080end
    8181if (md.ismacayealpattyn==0 && md.ishutter==0 && md.isstokes==0),
     
    205205
    206206        %HUTTER ON ICESHELF WARNING
    207         if any(md.elements_type(:,1)==HutterFormulationEnum & md.elementoniceshelf),
     207        if any(md.elements_type(:,1)==HutterApproximationEnum & md.elementoniceshelf),
    208208                disp(sprintf('\n !!! Warning: Hutter''s model is not consistent on ice shelves !!!\n'));
    209209        end
  • issm/trunk/src/m/classes/public/mechanicalproperties.m

    r3994 r5126  
    2020        error('only 2d model supported yet');
    2121end
    22 if any(md.elements_type(:,1)~=MacAyealFormulationEnum),
     22if any(md.elements_type(:,1)~=MacAyealApproximationEnum),
    2323        disp('Warning: the model has some non macayeal elements. These will be treated like MacAyeal''s elements');
    2424end
  • issm/trunk/src/m/classes/public/modelextract.m

    r4690 r5126  
    212212                pos=find(sum(md2.spcvelocity(:,1:3),2));                 %find all the grids on the boundary of the domain without icefront
    213213                md2.gridonstokes(pos)=0;                               %we have to constrain all the boundary of the domain without icefront
    214                 stokes_elements=find(md2.elements_type(:,2)==StokesFormulationEnum()); %find the elements on the stokes domain
     214                stokes_elements=find(md2.elements_type(:,2)==StokesApproximationEnum()); %find the elements on the stokes domain
    215215                borderflags=zeros(numberofgrids2,1);
    216216                borderflags(md2.elements(stokes_elements,:))=1; %find all the grids of the elements on stokes domain, ie stokes grids and borderstokes
  • issm/trunk/src/m/classes/public/plot/plot_elementstype.m

    r4330 r5126  
    2121if is2d
    2222        %Hutter elements
    23         posH=find(data(:,1)==HutterFormulationEnum);
     23        posH=find(data(:,1)==HutterApproximationEnum);
    2424        A=elements(posH,1); B=elements(posH,2); C=elements(posH,3);
    25         p1=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',HutterFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     25        p1=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',HutterApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    2626        %MacAyeal element
    27         posH=find(data(:,1)==MacAyealFormulationEnum);
     27        posH=find(data(:,1)==MacAyealApproximationEnum);
    2828        A=elements(posH,1); B=elements(posH,2); C=elements(posH,3);
    29         p2=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',MacAyealFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     29        p2=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',MacAyealApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    3030        %Pattyn element
    31         posH=find(data(:,1)==PattynFormulationEnum);
     31        posH=find(data(:,1)==PattynApproximationEnum);
    3232        A=elements(posH,1); B=elements(posH,2); C=elements(posH,3);
    33         p3=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',PattynFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     33        p3=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',PattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    3434        %Stokes elements
    3535        alpha=0.35;
    36         posS=find(data(:,2)==StokesFormulationEnum);
     36        posS=find(data(:,2)==StokesApproximationEnum);
    3737        if ~isempty(posS)
    3838                A=elements(posS,1); B=elements(posS,2); C=elements(posS,3);
    39         %       p4=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',StokesFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor,'EdgeAlpha',alpha,'FaceAlpha',alpha);
     39        %       p4=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',StokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor,'EdgeAlpha',alpha,'FaceAlpha',alpha);
    4040        %       legend([p1 p2 p3 p4],'Hutter''s elements','MacAyeal''s elements','Pattyn''s elements','Stokes''s elements');
    4141        else
     
    4444else
    4545        %Hutter elements
    46         posH=find(data(:,1)==HutterFormulationEnum);
     46        posH=find(data(:,1)==HutterApproximationEnum);
    4747        A=elements(posH,1); B=elements(posH,2); C=elements(posH,3); D=elements(posH,4); E=elements(posH,5); F=elements(posH,6);
    48         p1=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', HutterFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    49         patch( 'Faces', [D E F], 'Vertices', [x y z],'CData', HutterFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    50         patch( 'Faces', [A B E D], 'Vertices', [x y z],'CData', HutterFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    51         patch( 'Faces', [B E F C ], 'Vertices', [x y z],'CData', HutterFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    52         patch( 'Faces', [C A D F ], 'Vertices', [x y z],'CData', HutterFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     48        p1=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', HutterApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     49        patch( 'Faces', [D E F], 'Vertices', [x y z],'CData', HutterApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     50        patch( 'Faces', [A B E D], 'Vertices', [x y z],'CData', HutterApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     51        patch( 'Faces', [B E F C ], 'Vertices', [x y z],'CData', HutterApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     52        patch( 'Faces', [C A D F ], 'Vertices', [x y z],'CData', HutterApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    5353        %MacAyeal elements
    54         posM=find(data(:,1)==MacAyealFormulationEnum);
     54        posM=find(data(:,1)==MacAyealApproximationEnum);
    5555        A=elements(posM,1); B=elements(posM,2); C=elements(posM,3); D=elements(posM,4); E=elements(posM,5); F=elements(posM,6);
    56         p2=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', MacAyealFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    57         patch( 'Faces', [D E F], 'Vertices', [x y z],'CData', MacAyealFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    58         patch( 'Faces', [A B E D], 'Vertices', [x y z],'CData', MacAyealFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    59         patch( 'Faces', [B E F C ], 'Vertices', [x y z],'CData', MacAyealFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    60         patch( 'Faces', [C A D F ], 'Vertices', [x y z],'CData', MacAyealFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     56        p2=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', MacAyealApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     57        patch( 'Faces', [D E F], 'Vertices', [x y z],'CData', MacAyealApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     58        patch( 'Faces', [A B E D], 'Vertices', [x y z],'CData', MacAyealApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     59        patch( 'Faces', [B E F C ], 'Vertices', [x y z],'CData', MacAyealApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     60        patch( 'Faces', [C A D F ], 'Vertices', [x y z],'CData', MacAyealApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    6161        %Pattyn elements
    62         posP=find(data(:,1)==PattynFormulationEnum);
     62        posP=find(data(:,1)==PattynApproximationEnum);
    6363        A=elements(posP,1); B=elements(posP,2); C=elements(posP,3); D=elements(posP,4); E=elements(posP,5); F=elements(posP,6);
    64         p3=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', PattynFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    65         patch( 'Faces', [D E F], 'Vertices', [x y z],'CData', PattynFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    66         patch( 'Faces', [A B E D], 'Vertices', [x y z],'CData', PattynFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    67         patch( 'Faces', [B E F C ], 'Vertices', [x y z],'CData', PattynFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    68         patch( 'Faces', [C A D F ], 'Vertices', [x y z],'CData', PattynFormulationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     64        p3=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', PattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     65        patch( 'Faces', [D E F], 'Vertices', [x y z],'CData', PattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     66        patch( 'Faces', [A B E D], 'Vertices', [x y z],'CData', PattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     67        patch( 'Faces', [B E F C ], 'Vertices', [x y z],'CData', PattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
     68        patch( 'Faces', [C A D F ], 'Vertices', [x y z],'CData', PattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
    6969        %Stokes elements
    7070        alpha=0.35;
    71         posS=find(data(:,2)==StokesFormulationEnum);
     71        posS=find(data(:,2)==StokesApproximationEnum);
    7272        if ~isempty(posS)
    7373                A=elements(posS,1); B=elements(posS,2); C=elements(posS,3); D=elements(posS,4); E=elements(posS,5); F=elements(posS,6);
  • issm/trunk/src/m/classes/public/setelementstype.m

    r5071 r5126  
    7777gridonhutter(md.elements(find(hutterflag),:))=1;
    7878md.gridonhutter=gridonhutter;
    79 md.elements_type(find(hutterflag),1)=HutterFormulationEnum();
     79md.elements_type(find(hutterflag),1)=HutterApproximationEnum();
    8080
    8181%2: MacAyeal elements
     
    8383gridonmacayeal(md.elements(find(macayealflag),:))=1;
    8484md.gridonmacayeal=gridonmacayeal;
    85 md.elements_type(find(macayealflag),1)=MacAyealFormulationEnum();
     85md.elements_type(find(macayealflag),1)=MacAyealApproximationEnum();
    8686
    8787%3: Pattyn elements
     
    8989gridonpattyn(md.elements(find(pattynflag),:))=1;
    9090md.gridonpattyn=gridonpattyn;
    91 md.elements_type(find(pattynflag),1)=PattynFormulationEnum();
     91md.elements_type(find(pattynflag),1)=PattynApproximationEnum();
    9292
    9393%4: Stokes elements
    9494md.gridonstokes=gridonstokes;
    95 md.elements_type(find(stokesflag),2)=StokesFormulationEnum();
     95md.elements_type(find(stokesflag),2)=StokesApproximationEnum();
    9696
    9797%5: None elements (non Stokes)
    98 md.elements_type(find(~stokesflag),2)=NoneFormulationEnum();
     98md.elements_type(find(~stokesflag),2)=NoneApproximationEnum();
    9999
    100100%Create vertices_type
    101101md.vertices_type=zeros(md.numberofgrids,2);
    102102pos=find(gridonhutter);
    103 md.vertices_type(pos,1)=HutterFormulationEnum();
     103md.vertices_type(pos,1)=HutterApproximationEnum();
    104104pos=find(gridonmacayeal);
    105 md.vertices_type(pos,1)=MacAyealFormulationEnum();
     105md.vertices_type(pos,1)=MacAyealApproximationEnum();
    106106pos=find(gridonpattyn);
    107 md.vertices_type(pos,1)=PattynFormulationEnum();
     107md.vertices_type(pos,1)=PattynApproximationEnum();
    108108pos=find(gridonhutter);
    109 md.vertices_type(pos,1)=HutterFormulationEnum();
     109md.vertices_type(pos,1)=HutterApproximationEnum();
    110110pos=find(gridonpattyn & gridonmacayeal);
    111 md.vertices_type(pos,1)=MacAyealPattynFormulationEnum();
     111md.vertices_type(pos,1)=MacAyealPattynApproximationEnum();
    112112pos=find(gridonstokes);
    113 md.vertices_type(pos,2)=StokesFormulationEnum();
     113md.vertices_type(pos,2)=StokesApproximationEnum();
    114114pos=find(~gridonstokes);
    115 md.vertices_type(pos,2)=NoneFormulationEnum();
     115md.vertices_type(pos,2)=NoneApproximationEnum();
    116116
    117117%Create the border grids between Pattyn and MacAyeal and extrude them
     
    138138
    139139%figure out the border stokes grids
    140 stokes_elements=find(md.elements_type(:,2)==StokesFormulationEnum()); %find the elements on the stokes domain
     140stokes_elements=find(md.elements_type(:,2)==StokesApproximationEnum()); %find the elements on the stokes domain
    141141borderflags=zeros(md.numberofgrids,1);
    142142borderflags(md.elements(stokes_elements,:))=1; %find all the grids of the elements on stokes domain, ie stokes grids and borderstokes
     
    144144
    145145%figure out solution types
    146 md.ishutter=double(any(md.elements_type(:,1)==HutterFormulationEnum));
    147 md.ismacayealpattyn=double(any(md.elements_type(:,1)==MacAyealFormulationEnum | md.elements_type(:,1)==PattynFormulationEnum));
    148 md.isstokes=double(any(md.elements_type(:,2)==StokesFormulationEnum));
     146md.ishutter=double(any(md.elements_type(:,1)==HutterApproximationEnum));
     147md.ismacayealpattyn=double(any(md.elements_type(:,1)==MacAyealApproximationEnum | md.elements_type(:,1)==PattynApproximationEnum));
     148md.isstokes=double(any(md.elements_type(:,2)==StokesApproximationEnum));
    149149
    150150end
Note: See TracChangeset for help on using the changeset viewer.