c c Copyright (C) 2003-2007 California Institute of Technology c Ralf Deiterding, ralf@amroc.net c c ===================================================== subroutine ls(maxmx,maxmy,mbc,mx,my,x,y,dx,dy,phi,t) c ===================================================== implicit double precision (a-h,o-z) c include "cuser.i" c dimension phi(1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc) dimension x(1-mbc:maxmx+mbc),y(1-mbc:maxmy+mbc) c do 60 i = 1-mbc, mx+mbc do 60 j = 1-mbc, my+mbc phi(i,j) = rl0 - dsqrt((x(i)-xlc)**2 & +(y(j)-ylc)**2) phitest = dsqrt((x(i)-xlc)**2 & +(y(j)-ylc)**2) - rl1 if (dabs(phi(i,j)).ge.dabs(phitest)) & phi(i,j) = phitest 60 continue c return end c c c Return velocities. c c ===================================================== subroutine ipvel(meqn,nc,qex,xc,phi,vn,maux,auex,dx,time) c ===================================================== c implicit none c integer mx, my, meqn, maux, nc double precision qex(meqn,nc), xc(2,nc), phi(nc), vn(2,nc), & auex(maux,nc), dx(2), time, vnx, vny c include "cuser.i" c c Local variables c integer n double precision ph c do 100 n = 1, nc ph = datan( (xc(2,n)-ylc) / (xc(1,n)-xlc) ) if( xc(1,n)-xlc .lt. 0 ) ph=ph+pi auex(1,n) = -sin(ph)*uw auex(2,n) = cos(ph)*uw 100 continue c return end c