Changeset 6712


Ignore:
Timestamp:
12/10/10 09:04:49 (14 years ago)
Author:
seroussi
Message:

fixed some problems with setelementstype macayeal/stokes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/model/setelementstype.m

    r6705 r6712  
    4141        hutterflag(find(~macayealflag & ~pattynflag))=1;
    4242elseif strcmpi(filltype,'macayeal'),
    43         macayealflag(find(~hutterflag & ~pattynflag))=1;
     43        macayealflag(find(~hutterflag & ~pattynflag & ~stokesflag))=1;
    4444elseif strcmpi(filltype,'pattyn'),
    4545        pattynflag(find(~hutterflag & ~macayealflag & ~stokesflag))=1;
     
    113113                md.gridonpattyn=gridonpattyn;
    114114                md.elements_type(find(~stokesflag))=PattynApproximationEnum();
     115        elseif any(macayealflag), %fill with macayeal
     116                macayealflag(~stokesflag)=1;
     117                gridonmacayeal(md.elements(find(macayealflag),:))=1;
     118                md.gridonmacayeal=gridonmacayeal;
     119                md.elements_type(find(~stokesflag))=MacAyealApproximationEnum();
    115120        else %fill with none
    116121        %5: None elements (non Stokes)
     
    184189                matrixelements=ismember(md.elements,find(gridonmacayealstokes));
    185190                commonelements=sum(matrixelements,2)~=0;
     191                plotmodel(md,'data',gridonmacayeal,'view',2,'edgecolor','k')
    186192                commonelements(find(macayealflag))=0; %only one layer: the elements previously in macayeal
    187193                stokesflag(find(commonelements))=0; %these elements are now macayealmacayealelements
     
    221227if any(stokesflag),
    222228        pos=find(~gridonstokes);
    223         if(~any(pattynflag)),
     229        if(~any(pattynflag) & ~any(macayealflag)),
    224230                md.vertices_type(pos)=NoneApproximationEnum();
    225231        end
Note: See TracChangeset for help on using the changeset viewer.