vtf-logo

src/3d/equations/euler/rpznd/flx3euznd.f

c
c =========================================================
      subroutine flx3(ixyz,maxmx,meqn,mbc,mx,q,maux,aux,f)
c =========================================================
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@amroc.net
c
      implicit double precision (a-h,o-z)
      dimension q(1-mbc:maxmx+mbc, meqn)
      dimension aux(1-mbc:maxmx+mbc, maux)
      dimension f(1-mbc:maxmx+mbc, meqn)
      common /param/  gamma,gamma1,q0
c
      if(ixyz .eq. 1)then
         mu = 3
         mv = 4
         mw = 5
      else if(ixyz .eq. 2)then
         mu = 4
         mv = 5
         mw = 3
      else
         mu = 5
         mv = 3
         mw = 4
      endif
c
      do i=1-mbc,mx+mbc
         rho = q(i,1)+q(i,2)
         u = q(i,mu)/rho
         v = q(i,mv)/rho
         w = q(i,mw)/rho
         p = gamma1*(q(i,6) - q(i,2)*q0 - 0.5d0*rho*(u**2+v**2+w**2))
         f(i,1)  = u*q(i,1)
         f(i,2)  = u*q(i,2)
         f(i,mu) = u*q(i,mu)+p
         f(i,mv) = u*q(i,mv)
         f(i,mw) = u*q(i,mw)
         f(i,6)  = u*(q(i,6)+p)
      enddo
c
      return
      end
c

<