vtf-logo

clawpack/applications/euler/2d/Box/src/init2.f


c
c
c     =====================================================
       subroutine ic(maxmx,maxmy,meqn,mbc,mx,my,x,y,dx,dy,q)
c     =====================================================
       implicit double precision (a-h,o-z)
c
       include  "cuser.i"
c
       dimension q(meqn,1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc)
       dimension x(1-mbc:maxmx+mbc),y(1-mbc:maxmy+mbc)
c
c
       pi   = 4.d0*datan(1.d0)
       pi2  = 2.d0*pi
       disp = 0.0d0
c
c
c     # circle of high-density gas
c
      idisc = 2
      r0    = 0.3d0
      x0    = .4d0
      y0    = .4d0

      rhol  = 5.d0
      rhor  = 1.d0
      pl    = 5.d0
      pr    = 1.d0


       do 60 i = 1, mx
          do 60 j = 1, my
             
c             call cellave(x(i)-dx/2.d0,y(j)-dy/2.d0,dx,dy,wl)
             wl = 1.d0
             if (y(j).le.0.5d0) wl = 0.d0
             q(1,i,j) = wl*rhol + (1.d0-wl)*rhor
             q(2,i,j) = 0.d0
             q(3,i,j) = 0.d0
             q(4,i,j) = wl*(pl/gamma1) + (1.d0-wl)*(pr/gamma1)
 60       continue
         
       return
       end