
c
c
c =========================================================
      subroutine src1(maxmx,meqn,mbc,mx,xlower,dx,q,maux,aux,t,dt)
c =========================================================

c     # Source term is incorporated in fwave in rp1 if mthsrc > 1.

      implicit double precision (a-h,o-z)
      dimension q(1-mbc:maxmx+mbc, meqn)
      dimension aux(1-mbc:maxmx+mbc, 1)
c
      common /comrp/ u
      common /comsrc/ mthsrc

      if (mthsrc.eq.1) then
c         # begin_html [use:jsMath]
c         # Fractional step for source term:
c         # Solve $q_t = -q \sigma'(x)$ over timestep of length dt.
c         # Approximate $\sigma'(x)$ using centered difference and then
c         # solve exactly.
c         # end_html
          do i=1,mx
             x = xlower + (i-0.5d0)*dx
             sigp = (aux(i+1,1) - aux(i-1,1)) / (2.d0*dx)
             q(i,1) = q(i,1) * dexp(-sigp*dt)
             enddo
c     # else do nothing in this routine: source term in Riemann solver.
      endif
c
      return
      end
