Changeset 6705
- Timestamp:
- 12/09/10 11:13:45 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/model/setelementstype.m
r5969 r6705 67 67 68 68 %Stokes can only be used alone for now: 69 if any(stokesflag) &any(hutterflag +macayealflag),69 if any(stokesflag) &any(hutterflag), 70 70 error('setelementstype error message: stokes cannot be used with any other model for now, put stokes everywhere') 71 71 end … … 123 123 gridonmacayealpattyn=zeros(md.numberofgrids,1); 124 124 gridonpattynstokes=zeros(md.numberofgrids,1); 125 gridonmacayealstokes=zeros(md.numberofgrids,1); 125 126 if strcmpi(coupling_method,'penalties'), 126 127 %Create the border grids between Pattyn and MacAyeal and extrude them … … 177 178 gridonpattynstokes=zeros(md.numberofgrids,1); 178 179 gridonpattynstokes(md.elements(find(pattynstokesflag),:))=1; 179 elseif any(stokesflag) & any(macayealflag+hutterflag), 180 elseif any(stokesflag) & any(macayealflag), 181 %Find grid at the border 182 gridonmacayealstokes(find(gridonmacayeal & gridonstokes))=1; 183 %Stokes elements in contact with this layer become MacAyealStokes elements 184 matrixelements=ismember(md.elements,find(gridonmacayealstokes)); 185 commonelements=sum(matrixelements,2)~=0; 186 commonelements(find(macayealflag))=0; %only one layer: the elements previously in macayeal 187 stokesflag(find(commonelements))=0; %these elements are now macayealmacayealelements 188 macayealstokesflag=zeros(md.numberofelements,1); 189 macayealstokesflag(find(commonelements))=1; 190 gridonstokes=zeros(md.numberofgrids,1); 191 gridonstokes(md.elements(find(stokesflag),:))=1; 192 md.gridonstokes=gridonstokes; 193 194 %Create MacaAyealMacAyealApproximation where needed 195 md.elements_type(find(macayealstokesflag))=MacAyealStokesApproximationEnum(); 196 197 %Now recreate gridonmacayealstokes 198 gridonmacayealstokes=zeros(md.numberofgrids,1); 199 gridonmacayealstokes(md.elements(find(macayealstokesflag),:))=1; 200 elseif any(stokesflag) & any(hutterflag), 180 201 error('type of coupling not supported yet'); 181 202 end … … 206 227 pos=find(gridonpattynstokes); 207 228 md.vertices_type(pos)=PattynStokesApproximationEnum(); 229 pos=find(gridonmacayealstokes); 230 md.vertices_type(pos)=MacAyealStokesApproximationEnum(); 208 231 209 232 %figure out solution types
Note:
See TracChangeset
for help on using the changeset viewer.