source:
issm/oecreview/Archive/23390-24306/ISSM-24110-24111.diff@
28275
Last change on this file since 28275 was 24307, checked in by , 5 years ago | |
---|---|
File size: 1.3 KB |
-
../trunk-jpl/src/m/parameterization/killberg.m
16 16 mask = zeros(md.mesh.numberofvertices,1); 17 17 element_flag = zeros(md.mesh.numberofelements,1); 18 18 19 %Step 1, go through all elements and put 1 in local_mask if the element is grounded20 19 disp('Looking for isolated patches of floating ice (icebergs)'); 21 isice = min(md.mask.ice_levelset(md.mesh.elements),[],2)<0; 20 21 %do not go through elements that don't have ice, mark flag as 1 (done) 22 isice = min(md.mask.ice_levelset(md.mesh.elements),[],2)<0; 23 element_flag(find(~isice)) = 1; 24 25 %do not go through elements that are grounded, mark flag as 1 (done) 26 %and initialize mask as 1 for all vertices of these elements 22 27 isgrounded = max(md.mask.groundedice_levelset(md.mesh.elements),[],2)>0; 23 28 pos = find(isgrounded); 24 29 element_flag(pos) = 1; … … 30 35 disp([' -- iteration ' num2str(iter)]); 31 36 more = false; 32 37 33 pos = find(~element_flag & isice); 34 if numel(pos)==0 35 break; 36 end 37 38 for i=pos' 38 for i=find(~element_flag)' 39 39 indices = md.mesh.elements(i,:); 40 40 MAX=max(mask(indices)); 41 41 if(MAX==0)
Note:
See TracBrowser
for help on using the repository browser.