source: issm/trunk/src/m/model/outflow.m@ 8298

Last change on this file since 8298 was 8298, checked in by seroussi, 14 years ago

changed grid to node in matlab

File size: 259 bytes
Line 
1function flag=outflow(md);
2
3A=md.segments(:,1);
4B=md.segments(:,2);
5Nx=-(md.y(A)-md.y(B));
6Ny= md.x(A)-md.x(B);
7Vx=(md.vx(A)+md.vy(B))/2;
8Vy=(md.vy(A)+md.vy(B))/2;
9
10%dot product
11VdotN=Vx.*Nx+Vy.*Ny;
12
13flag=zeros(md.numberofnodes,1);
14flag(A(find(VdotN>0)))=1;
Note: See TracBrowser for help on using the repository browser.