c c ===================================================== subroutine ic(maxmx,maxmy,meqn,mbc,mx,my,x,y,dx,dy,q) c ===================================================== c c Copyright (C) 2003-2007 California Institute of Technology c Ralf Deiterding, David Hill c implicit double precision (a-h,o-z) c include "cuser.i" c dimension q(meqn,1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc) dimension x(1-mbc:maxmx+mbc),y(1-mbc:maxmy+mbc) c Y10 = 1.d0 Y11 = 0.d0 Y20 = 0.d0 Y21 = 1.d0 c do 60 i = 1, mx do 60 j = 1, my if (x(i).gt.xs) then p = p0 u = u0 v = 0.d0 rhoavg = 0.5d0*(rho0+rho1) rhodiff = 0.5d0*(rho0-rho1) xint = x0+ai*dabs(dsin(2.d0*pi*y(j)*aw)) rho = rhoavg - rhodiff*dtanh(ap*(x(i)-xint)) Y1 = 0.5d0 - 0.5d0*(Y10-Y11)*dtanh(ap*(x(i)-xint)) Y2 = 1.d0 - Y1 else rho = rhoshk u = ushk v = 0.d0 p = pshk Y1 = Y10 Y2 = Y20 endif c q(1,i,j) = rho*Y1 q(2,i,j) = rho*Y2 q(3,i,j) = rho*u q(4,i,j) = rho*v q(5,i,j) = p/gamma1 + .5d0*rho*(u*u+v*v) + q(2,i,j)*q0 60 continue c return end c