src1.f.html CLAWPACK  
 Source file:   src1.f
 Directory:   /Users/rjl/clawpack_src/clawpack_master/apps/fvmbook/chap17/onramp
 Converted:   Sat Mar 23 2024 at 11:05:12   using clawcode2html
 This documentation file will not reflect any later changes in the source file.

 

c
c
c =========================================================
      subroutine src1(meqn,mbc,mx,xlower,dx,q,maux,aux,t,dt)
c =========================================================
      implicit double precision (a-h,o-z)
      dimension q(meqn,1-mbc:mx+mbc)
      common /comsrc/ xramp,alf
c
c     delta-function source term for on-ramp
c
      do i=1,mx
	xleft = xlower + (i-1)*dx
        if (xramp.ge.xleft .and. xramp.lt.(xleft+dx)) then
            q(1,i) = q(1,i) + alf*dt/dx
	    endif
        enddo
       
      return
      end