c c Signed distance for a surrounding tube c c Copyright (C) 2003-2007 California Institute of Technology c Ralf Deiterding, ralf@amroc.net c c ===================================================== subroutine ls(maxmx,maxmy,maxmz,mbc,mx,my,mz,x,y,z, & dx,dy,dz,phi,t) c ===================================================== implicit double precision (a-h,o-z) include "cuser.i" c dimension phi(1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc, & 1-mbc:maxmz+mbc) dimension x(1-mbc:maxmx+mbc),y(1-mbc:maxmy+mbc), & z(1-mbc:maxmz+mbc) c do 60 i = 1-mbc, mx+mbc do 60 j = 1-mbc, my+mbc dist = rf - dsqrt(x(i)**2+y(j)**2) do 60 k = 1-mbc, mz+mbc phi(i,j,k) = dist 60 continue c return end c