vtf-logo

clawpack/applications/euler_chem/1d/Shocktube/src/src1euchem.f

c =========================================================
      subroutine src(maxmx,meqn,mbc,ibx,mx,q,
     &               aux,maux,t,dt,ibnd)
c =========================================================
c
c     Copyright (C) 2002 Ralf Deiterding
c     Brandenburgische Universitaet Cottbus
c
      implicit double precision(a-h,o-z)
      include  "ck.i"    
      include  "cuser.i"
c      
      dimension q(meqn, 1-ibx*mbc:maxmx+ibx*mbc)
      dimension aux(maux, 1-ibx*mbc:maxmx+ibx*mbc)
c
      do 10 i=1-ibnd*ibx*mbc,mx+ibnd*ibx*mbc
         rho  = 0.d0
         rhoW = 0.d0
         do k=1,Nsp
            rhoW = rhoW + q(k,i)/Wk(k)
            rho  = rho  + q(k,i)
         enddo
         e = q(Nsp+2,i)-0.5d0*q(Nsp+1,i)**2/rho  
         call SolveTrhok(q(Nsp+3,i),e,rhoW,q(1,i),Nsp,ifail) 
c     
 10   continue
      return
      end
c