vtf-logo

clawpack/applications/euler_chem/3d/ConvReflDet/src/lset3.f

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)
c
       include  "ck.i"
       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
             do 60 k = 1-mbc, mz+mbc
                phi(i,j,k) = rd - dsqrt((x(i)-x0)**2+
     &               (y(j)-y0)**2+(z(k)-z0)**2)
 60    continue
         
       return
       end
c
c     =====================================================
       subroutine lsrfl(maxmx,maxmy,maxmz,mbc,mx,my,mz,x,y,z,
     &     dx,dy,dz,phi,t)
c     =====================================================
       implicit double precision (a-h,o-z)
c
       include  "ck.i"
       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
       vnx =  dsin(angpl)
       vny = -dcos(angpl)
       do 60 i = 1-mbc, mx+mbc
          do 60 j = 1-mbc, my+mbc
             do 60 k = 1-mbc, mz+mbc
                phi(i,j,k) = vnx*dsqrt(x(i)**2+z(k)**2) + vny*y(j)
 60    continue
c         
       return
       end
c
c     =====================================================
       subroutine lsrdi(maxmx,maxmy,maxmz,mbc,mx,my,mz,x,y,z,
     &     dx,dy,dz,phi,t)
c     =====================================================
       implicit double precision (a-h,o-z)
c
       include  "ck.i"
       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
             do 60 k = 1-mbc, mz+mbc
                phi(i,j,k) = dsqrt((x(i)-x0)**2+
     &               (y(j)-y0)**2+(z(k)-z0)**2) - rdi
 60    continue
         
       return
       end