source: issm/oecreview/Archive/23390-24306/ISSM-24110-24111.diff

Last change on this file was 24307, checked in by Mathieu Morlighem, 5 years ago

NEW: adding Archive/23390-24306

File size: 1.3 KB
RevLine 
[24307]1Index: ../trunk-jpl/src/m/parameterization/killberg.m
2===================================================================
3--- ../trunk-jpl/src/m/parameterization/killberg.m (revision 24110)
4+++ ../trunk-jpl/src/m/parameterization/killberg.m (revision 24111)
5@@ -16,9 +16,14 @@
6 mask = zeros(md.mesh.numberofvertices,1);
7 element_flag = zeros(md.mesh.numberofelements,1);
8
9-%Step 1, go through all elements and put 1 in local_mask if the element is grounded
10 disp('Looking for isolated patches of floating ice (icebergs)');
11-isice = min(md.mask.ice_levelset(md.mesh.elements),[],2)<0;
12+
13+%do not go through elements that don't have ice, mark flag as 1 (done)
14+isice = min(md.mask.ice_levelset(md.mesh.elements),[],2)<0;
15+element_flag(find(~isice)) = 1;
16+
17+%do not go through elements that are grounded, mark flag as 1 (done)
18+%and initialize mask as 1 for all vertices of these elements
19 isgrounded = max(md.mask.groundedice_levelset(md.mesh.elements),[],2)>0;
20 pos = find(isgrounded);
21 element_flag(pos) = 1;
22@@ -30,12 +35,7 @@
23 disp([' -- iteration ' num2str(iter)]);
24 more = false;
25
26- pos = find(~element_flag & isice);
27- if numel(pos)==0
28- break;
29- end
30-
31- for i=pos'
32+ for i=find(~element_flag)'
33 indices = md.mesh.elements(i,:);
34 MAX=max(mask(indices));
35 if(MAX==0)
Note: See TracBrowser for help on using the repository browser.