Changeset 22889


Ignore:
Timestamp:
07/02/18 10:31:17 (7 years ago)
Author:
Eric.Larour
Message:

CHG: clever handling of corners which get duplicated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/branches/trunk-larour-NatGeoScience2016/src/m/mesh/modelmerge2d.m

    r22481 r22889  
    121121                bound2=zeros(md.mesh.numberofvertices,1); bound2(md.mesh.extractedvertices{2})=md2.mesh.vertexonboundary;
    122122                boundary=bound1 & bound2;
     123               
     124                %identify corners between both basins
     125                ends=[];
     126                for i=1:length(pos),
     127                        v=pos(i); [indi,indj]=find(md.mesh.elements==v);
     128                        conn=unique(md.mesh.elements(indi,:));
     129                        if (sum(boundary(conn))==2),
     130                                ends(end+1)=v;
     131                        end
     132                end
     133                boundary(ends)=0; %exclude these ends from the boundary that is going to become neumann.
    123134                pos=find(boundary); md.stressbalance.spcvx(pos)=NaN; md.stressbalance.spcvy(pos)=NaN; md.stressbalance.spcvz(pos)=NaN;
     135
    124136        end
    125137
Note: See TracChangeset for help on using the changeset viewer.