c c ===================================================== subroutine ic(maxmx,maxmy,maxmz,meqn,mbc,mx,my,mz, & x,y,z,dx,dy,dz,q) c ===================================================== c c Copyright (C) 2003-2007 California Institute of Technology c Ralf Deiterding, ralf@cacr.caltech.edu c implicit double precision (a-h,o-z) c include "cuser.i" c dimension q(meqn, 1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc, & 1-mbc:maxmz+mbc) dimension x(1-mbc:maxmx+mbc),y(1-mbc:maxmy+mbc), & z(1-mbc:maxmz+mbc) c do 60 k = 1, mz do 60 j = 1, my do 60 i = 1, mx call cellave(z(k)-dz/2.d0,x(i)-dx/2.d0,dz,dx,fl) rho = (1.d0-fl)*rhoamb+ fl*rhoshk u = (1.d0-fl)*uamb + fl*ushk v = (1.d0-fl)*vamb + fl*vshk w = (1.d0-fl)*wamb + fl*wshk p = (1.d0-fl)*pamb + fl*pshk q(1,i,j,k) = rho q(2,i,j,k) = rho * u q(3,i,j,k) = rho * v q(4,i,j,k) = rho * w q(5,i,j,k) = p/gamma1 + .5d0*rho*(u*u+v*v+w*w) 60 continue c return end