c c c c ===================================================== subroutine ic2(maxmx,maxmy,meqn,mbc,mx,my,x,y,dx,dy,q) c ===================================================== c c # Set initial conditions for q. c c # Arbitrary smooth initial data in rectangular tank c # for the 2D shallow water equations c implicit double precision (a-h,o-z) dimension q(1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc, meqn) dimension x(1-mbc:maxmx+mbc),y(1-mbc:maxmy+mbc) dimension rph(4),rpu(4),rpv(4) common /param/ g common /geom/ alph,hnot c c xmid = 0.5d0 ymid = 0.5d0 do 15 i=1,mx do 15 j=1,my r=dsqrt((x(i)-xmid)**2 + (y(j)-ymid)**2) q(i,j,1) = 1.0d0 + hnot*dexp(-alph*(r)**2) q(i,j,2) = 0.0d0 q(i,j,3) = 0.0d0 15 continue return end