Changeset 4040
- Timestamp:
- 06/11/10 15:57:13 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/utils/Mesh/ProfileProjectOntoMesh.m
r3735 r4040 25 25 processed_y=[]; 26 26 for i=1:numel(indices), 27 if(((indices(i)-floor(indices(i)))~=0) & ((ceil(indices(i))-indices(i))~=0))27 if(((indices(i)-floor(indices(i)))~=0) && ((ceil(indices(i))-indices(i))~=0)) 28 28 processed_indices=[processed_indices;floor(indices(i))]; 29 29 processed_x=[processed_x;x0(i)]; … … 32 32 end 33 33 34 %now merge profile.x,profile.y with processed_x,processed_y, at locat oins processed_indices:34 %now merge profile.x,profile.y with processed_x,processed_y, at locations processed_indices: 35 35 newx=profile.x; 36 36 newy=profile.y; … … 49 49 node_in_element=NodeInElement(newx,newy,md.elements,md.x,md.y,md.nodeconnectivity); 50 50 51 % eliminate nodes that don't fall in any element 52 % (profile may start and/or end externally and/or cross holes in the model) 53 54 ind=find(node_in_element(:,9)>0); 55 newx=newx(ind,:); 56 newy=newy(ind,:); 57 node_in_element=node_in_element(ind,:); 58 51 59 mesh_profile=[newx(1:end-1) newy(1:end-1) newx(2:end) newy(2:end) zeros(length(newy(2:end)),1)]; 52 60
Note:
See TracChangeset
for help on using the changeset viewer.