c c c ========================================================= subroutine qinit(maxmx,meqn,mbc,mx,xlower,dx,q,maux,aux) c ========================================================= c c # Set initial conditions for q. c # shock tube problem c c implicit double precision (a-h,o-z) dimension q(1-mbc:maxmx+mbc, meqn) dimension aux(1-mbc:maxmx+mbc, *) common /cqinit/ sloc,rhol,ul,rhor,ur c c c # data in left state: rhoul = rhol*ul c c # data in right state: rhour = rhor*ur c do 150 i=1,mx xedge = xlower + (i-1)*dx if (xedge .lt. sloc) then q(i,1) = rhol q(i,2) = rhoul else q(i,1) = rhor q(i,2) = rhour endif 150 continue c return end