      subroutine noh (xx,vx,mass,den,p,u,hh,gamma,xmax,xmin,partno
     &     ,hfac,n,ientro)

c This subroutine sets up the initial conditions for the `shocks of Noh',
c i.e. a discontinuity in velocity.

      real * 4 xx(n),vx(n),mass(n),den(n),p(n),u(n),hh(n)
      real * 4 delx
      real * 4 xmin,xmax,hfac,gamma

      integer * 4 partno(n)

      p=0.01
      den=1.0
      vx=0.0
      u=p/den
      u=u/(gamma-1.0)
      if (ientro.eq.1) u=p/(den**gamma)

      do i=1,n
         partno(i)=i
      end do

      delx=(xmax-xmin)/n
      hh=hfac*delx
      mass=den*delx

      do i=1,n

         if (i.eq.1) then
            xx(i)=0.0
         else
            xx(i)=xx(i-1)+delx
         end if

         if (i.le.(n/2)) then
            vx(i)=1.0
         else
            vx(i)=-1.0
         end if

      end do

      end subroutine








