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

Last change on this file since 9714 was 9714, checked in by Mathieu Morlighem, 14 years ago

moved some stuff to mesh

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