c c ========================================================= subroutine flx3(ixyz,maxmx,meqn,mbc,mx,q,maux,aux,f) c ========================================================= c c # Flux-function for the three-dimensional Euler equations. c c # The flux is computed in x-direction if ixyz=1 c # or in y-direction if ixyz=2 c # or in z-direction if ixyz=3. c c # Copyright (C) 2002 Ralf Deiterding c # Brandenburgische Universitaet Cottbus 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) dimension q(1-mbc:maxmx+mbc, meqn) dimension aux(1-mbc:maxmx+mbc, maux, 3) dimension f(1-mbc:maxmx+mbc, meqn) common /param/ gamma,gamma1 c if(ixyz .eq. 1)then mu = 2 mv = 3 mw = 4 else if(ixyz .eq. 2)then mu = 3 mv = 4 mw = 2 else mu = 4 mv = 2 mw = 3 endif c do i=1-mbc,mx+mbc u = q(i,mu)/q(i,1) v = q(i,mv)/q(i,1) w = q(i,mw)/q(i,1) p = gamma1*(q(i,5) - 0.5d0*q(i,1)*(u**2+v**2+w**2)) f(i,1) = q(i,mu) f(i,mu) = u*q(i,mu)+p f(i,mv) = v*q(i,mu) f(i,mw) = w*q(i,mu) f(i,5) = u*(q(i,5)+p) enddo c return end