c
c
c =========================================================
       subroutine qinit(maxmx,meqn,mbc,mx,xlower,dx,q,maux,aux)
c =========================================================
c
c     # Set initial conditions for q.
c
c
      implicit double precision (a-h,o-z)
      dimension q(1-mbc:maxmx+mbc, meqn)
      dimension aux(1-mbc:maxmx+mbc, *)
      common /comsrc/ eps
c
c
      write(6,*) 'eps = ', eps
      do 150 i=1,mx
         xcell = xlower + (i-0.5d0)*dx
         xi = xcell / (4.d0*eps)
         if (xi .lt. -20.d0) then 
             tanhxi = -1.d0
            else if (xi .gt. 20.d0) then
             tanhxi = 1.d0
            else
             tanhxi = (dexp(xi) - dexp(-xi)) / (dexp(xi) + dexp(-xi))
            endif
         q(i,1) =  0.5d0*(1 - tanhxi)
  150    continue
c
      return
      end
