Changeset 12959
- Timestamp:
- 08/09/12 16:13:42 (13 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/model/setflowequation.m
r12950 r12959 135 135 %rule out elements that don't touch the 2 boundaries 136 136 pos=find(macayealpattynflag); 137 list=zeros(length(pos),1);138 list =list + any(sum(nodeonmacayeal(md.mesh.elements(pos,:)),2),2);139 list =list - any(sum(nodeonpattyn(md.mesh.elements(pos,:)) ,2),2);140 pos1=find( list==1);137 elist=zeros(length(pos),1); 138 elist = elist + any(sum(nodeonmacayeal(md.mesh.elements(pos,:)),2),2); 139 elist = elist - any(sum(nodeonpattyn(md.mesh.elements(pos,:)) ,2),2); 140 pos1=find(elist==1); 141 141 macayealflag(pos(pos1))=1; 142 142 macayealpattynflag(pos(pos1))=0; 143 pos2=find( list==-1);143 pos2=find(elist==-1); 144 144 pattynflag(pos(pos2))=1; 145 145 macayealpattynflag(pos(pos2))=0; … … 167 167 %rule out elements that don't touch the 2 boundaries 168 168 pos=find(pattynstokesflag); 169 list=zeros(length(pos),1);170 list =list + any(sum(nodeonstokes(md.mesh.elements(pos,:)),2),2);171 list =list - any(sum(nodeonpattyn(md.mesh.elements(pos,:)),2),2);172 pos1=find( list==1);169 elist=zeros(length(pos),1); 170 elist = elist + any(sum(nodeonstokes(md.mesh.elements(pos,:)),2),2); 171 elist = elist - any(sum(nodeonpattyn(md.mesh.elements(pos,:)),2),2); 172 pos1=find(elist==1); 173 173 stokesflag(pos(pos1))=1; 174 174 pattynstokesflag(pos(pos1))=0; 175 pos2=find( list==-1);175 pos2=find(elist==-1); 176 176 pattynflag(pos(pos2))=1; 177 177 pattynstokesflag(pos(pos2))=0; … … 199 199 %rule out elements that don't touch the 2 boundaries 200 200 pos=find(macayealstokesflag); 201 list=zeros(length(pos),1);202 list =list + any(sum(nodeonmacayeal(md.mesh.elements(pos,:)),2),2);203 list =list - any(sum(nodeonstokes(md.mesh.elements(pos,:)) ,2),2);204 pos1=find( list==1);201 elist=zeros(length(pos),1); 202 elist = elist + any(sum(nodeonmacayeal(md.mesh.elements(pos,:)),2),2); 203 elist = elist - any(sum(nodeonstokes(md.mesh.elements(pos,:)) ,2),2); 204 pos1=find(elist==1); 205 205 macayealflag(pos(pos1))=1; 206 206 macayealstokesflag(pos(pos1))=0; 207 pos2=find( list==-1);207 pos2=find(elist==-1); 208 208 stokesflag(pos(pos2))=1; 209 209 macayealstokesflag(pos(pos2))=0; -
issm/trunk-jpl/test/NightlyRun/runme.m
r12631 r12959 72 72 % }}} 73 73 %GET ids {{{1 74 list=dir;%use dir, as it seems to act OS independent74 flist=dir;%use dir, as it seems to act OS independent 75 75 list_ids=[]; 76 for i=1:numel( list),77 if ( strncmp( list(i).name,'test',4) &... %File name must start with 'test'78 strncmp(fliplr( list(i).name),fliplr('.m'),2)&... %File name must end by '.m'79 ~strcmp( list(i).name,'test.m')) %File name must be different than 'test.m'80 list_ids(end+1)=eval( list(i).name(5:end-2)); %Keep test id only (skip 'test' and '.m')76 for i=1:numel(flist), 77 if ( strncmp(flist(i).name,'test',4) &... %File name must start with 'test' 78 strncmp(fliplr(flist(i).name),fliplr('.m'),2)&... %File name must end by '.m' 79 ~strcmp(flist(i).name,'test.m')) %File name must be different than 'test.m' 80 list_ids(end+1)=eval(flist(i).name(5:end-2)); %Keep test id only (skip 'test' and '.m') 81 81 end 82 82 end
Note:
See TracChangeset
for help on using the changeset viewer.