qinit.f.html CLAWPACK  
 Source file:   qinit.f
 Directory:   /Users/rjl/clawpack_src/clawpack_master/amrclaw/examples/advection_2d_annulus
 Converted:   Mon Feb 19 2024 at 18:00:16   using clawcode2html
 This documentation file will not reflect any later changes in the source file.

 
c     =====================================================
      subroutine qinit(meqn,mbc,mx,my,xlower,ylower,
     &     dx,dy,q,maux,aux)
c     =====================================================
c
c
      implicit double precision (a-h,o-z)
      dimension q(meqn, 1-mbc:mx+mbc, 1-mbc:my+mbc)
      dimension aux(maux, 1-mbc:mx+mbc, 1-mbc:my+mbc)
      common /cqinit/ A1,beta1,x1,y1, A2,beta2,x2,y2

      do i=1,mx
        xc = xlower + (i-0.5d0)*dx
        do j=1,my
            yc = ylower + (j-0.5d0)*dy
            call mapc2p(xc,yc,xp,yp)
            q(1,i,j) = A1*exp(-beta1*((xp - x1)**2 + (yp - y1)**2)) 
     &                  +A2*exp(-beta2*((xp - x2)**2 + (yp - y2)**2))
        enddo
      enddo

      return
      end