source:
issm/trunk/src/m/model/outflow.m@
8298
      
      | Last change on this file since 8298 was 8298, checked in by , 14 years ago | |
|---|---|
| File size: 259 bytes | |
| Line | |
|---|---|
| 1 | function flag=outflow(md); | 
| 2 | |
| 3 | A=md.segments(:,1); | 
| 4 | B=md.segments(:,2); | 
| 5 | Nx=-(md.y(A)-md.y(B)); | 
| 6 | Ny= md.x(A)-md.x(B); | 
| 7 | Vx=(md.vx(A)+md.vy(B))/2; | 
| 8 | Vy=(md.vy(A)+md.vy(B))/2; | 
| 9 | |
| 10 | %dot product | 
| 11 | VdotN=Vx.*Nx+Vy.*Ny; | 
| 12 | |
| 13 | flag=zeros(md.numberofnodes,1); | 
| 14 | flag(A(find(VdotN>0)))=1; | 
  Note:
 See   TracBrowser
 for help on using the repository browser.
    ![(please configure the [header_logo] section in trac.ini)](/trac/issm/chrome/common/trac_banner.png)
