vtf-logo

clawpack/applications/advection/3d/Swirl/src/init3.f

c
c     =====================================================
       subroutine ic(maxmx,maxmy,maxmz,meqn,mbc,mx,my,mz,
     &     x,y,z,dx,dy,dz,q)
c     =====================================================
c
c      Copyright (C) 2002 Ralf Deiterding
c      Brandenburgische Universitaet Cottbus
c
       implicit double precision (a-h,o-z)
c
       include  "cuser.i"
c
       dimension q(meqn, 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
c
c     # set concentration profile
c     ---------------------------
c
c     # discontinuous across x = 1/2
      do 215 i=1,mx
         if (x(i).lt. 0.5d0) then
            do 211 k=1,mz
               do 211 j=1,my
                  q(1,i,j,k) = 1.d0
 211        continue
         else
            do 212 k=1,mz
               do 212 j=1,my
                  q(1,i,j,k) = 0.d0
 212           continue
            endif
 215     continue

       return
       end