vtf-logo

src/2d/integrator_extended/step2ex.f

c
c
c     ==========================================================
      subroutine step2(mp,maxm,maxmx,maxmy,mvar,meqn,maux,mwaves,mbc,
     &                 mx,my,qold,aux,dx,dy,t,dt,method,mthlim,cfl,
     &                 fm,fp,gm,gp,faddm,faddp,gaddm,gaddp,
     &                 q1d,dtdx1d,dtdy1d,aux1,aux2,aux3,
     &                 work,mwork,rpn2,rpt2)
c     ==========================================================
c
c     # Main entry from AMROC. Selects between the wave propagation method 
c     # of Randall J. LeVeque and Godunov's dimensional splitting.
c
      implicit double precision (a-h,o-z)
      include "call.i"
c
      dimension  qold(mvar, 1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc)
      dimension    fm(mvar, 1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc)
      dimension    fp(mvar, 1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc)
      dimension    gm(mvar, 1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc)
      dimension    gp(mvar, 1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc)
      dimension   q1d(1-mbc:maxm+mbc, meqn)
      dimension faddm(1-mbc:maxm+mbc, meqn)
      dimension faddp(1-mbc:maxm+mbc, meqn)
      dimension gaddm(1-mbc:maxm+mbc, meqn, 2)
      dimension gaddp(1-mbc:maxm+mbc, meqn, 2)
      dimension aux(maux, 1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc)
      dimension aux1(1-mbc:maxm+mbc, maux)
      dimension aux2(1-mbc:maxm+mbc, maux)
      dimension aux3(1-mbc:maxm+mbc, maux)
      dimension dtdx1d(1-mbc:maxm+mbc)
      dimension dtdy1d(1-mbc:maxm+mbc)
      dimension method(7),mthlim(mwaves)
      dimension work(mwork)
      external rpn2,rpt2
c
      tcom = t
      dtcom = dt
      dxcom = dx
      dycom = dy
      mpass = mp
c
      if( method(3) .ge. 0 )then
c
c            # unsplit version
c             
         call unsp2(maxm,maxmx,maxmy,mvar,meqn,maux,mwaves,mbc,mx,my,
     &              qold,aux,dx,dy,dt,method,mthlim,cfl,
     &              fm,fp,gm,gp,faddm,faddp,gaddm,gaddp,
     &              q1d,dtdx1d,dtdy1d,aux1,aux2,aux3,
     &              work,mwork,rpn2,rpt2)
c
      else
c           # dimensional splitting (fractional steps)
c
         call dimsp2(maxm,maxmx,maxmy,mvar,meqn,maux,mwaves,mbc,mx,my,
     &               qold,aux,dx,dy,dt,method,mthlim,cfl,
     &               fm,fp,gm,gp,faddm,faddp,gaddm,gaddp,
     &               q1d,dtdx1d,dtdy1d,aux1,aux2,aux3,
     &               work,mwork,rpn2,rpt2)
c
      endif
c
      return
      end

<