c
c
c ==================================================================
subroutine rpt3ad1(ixyz,icoor,maxm,meqn,mwaves,mbc,mx,
& ql,qr,maux,aux1,aux2,aux3,imp,asdq,
& bmasdq,bpasdq)
c ==================================================================
implicit double precision(a-h,o-z)
c
c # Riemann solver in the transverse direction for the
c # advection equations.
c #
c # On input,
c
c # ql,qr is the data along some one-dimensional slice, as in rpn3
c # This slice is
c # in the x-direction if ixyz=1,
c # in the y-direction if ixyz=2, or
c # in the z-direction if ixyz=3.
c # asdq is an array of flux differences (A^* \Delta q).
c # asdq(i,:) is the flux difference propagating away from
c # the interface between cells i-1 and i.
c # imp = 1 if asdq = A^- \Delta q, the left-going flux difference
c # 2 if asdq = A^+ \Delta q, the right-going flux difference
c
c # aux2 is the auxiliary array (if method(7)=maux>0) along
c # the plane where this slice lies, say at j=J if ixyz=1.
c # aux2(:,:,1) contains data along j=J, k=k-1
c # aux2(:,:,2) contains data along j=J, k=k
c # aux2(:,:,3) contains data along j=J, k=k+1
c # aux1 is the auxiliary array along the plane with j=J-1
c # aux3 is the auxiliary array along the plane with j=J+1
c
c # if ixyz=2 then aux2 is in some plane k=K, and
c # aux2(:,:,1) contains data along i=I-1, k=K, etc.
c
c # if ixyz=3 then aux2 is in some plane i=I, and
c # aux2(:,:,1) contains data along j=j-1, i=I, etc.
c
c # On output,
c # If data is in x-direction (ixyz=1) then this routine does the
c # splitting of asdq (= A^* \Delta q, where * = + or -) ...
c
c # into down-going flux difference bmasdq (= B^- A^* \Delta q)
c # and up-going flux difference bpasdq (= B^+ A^* \Delta q)
c # when icoor = 2,
c
c # or
c
c # into down-going flux difference bmasdq (= C^- A^* \Delta q)
c # and up-going flux difference bpasdq (= C^+ A^* \Delta q)
c # when icoor = 3.
c #
c
c # More generally, ixyz specifies what direction the slice of data is
c # in, and icoor tells which transverse direction to do the splitting in:
c
c # If ixyz = 1, data is in x-direction and then
c # icoor = 2 => split in the y-direction (iuvw=2)
c # icoor = 3 => split in the z-direction (iuvw=3)
c
c # If ixyz = 2, data is in y-direction and then
c # icoor = 2 => split in the z-direction (iuvw=3)
c # icoor = 3 => split in the x-direction (iuvw=1)
c
c # If ixyz = 3, data is in z-direction and then
c # icoor = 2 => split in the x-direction (iuvw=1)
c # icoor = 3 => split in the y-direction (iuvw=2)
c
dimension ql(1-mbc:maxm+mbc, meqn)
dimension qr(1-mbc:maxm+mbc, meqn)
dimension asdq(1-mbc:maxm+mbc, meqn)
dimension bmasdq(1-mbc:maxm+mbc, meqn)
dimension bpasdq(1-mbc:maxm+mbc, meqn)
dimension aux1(1-mbc:maxm+mbc, maux, 3)
dimension aux2(1-mbc:maxm+mbc, maux, 3)
dimension aux3(1-mbc:maxm+mbc, maux, 3)
c
c
c # set iuvw = 1 for u, 2 for v, 3 for w component of velocity
c # depending on transverse direction:
iuvw = ixyz + icoor - 1
if (iuvw.gt.3) iuvw = iuvw-3
c
do 10 i=2-mbc,mx+mbc
i1 = i-2+imp !# = i-1 for amdq, i for apdq
bmasdq(i,1) = dmin1(aux2(i1,iuvw,2), 0.d0) * asdq(i,1)
if (icoor.eq.2) then
bpasdq(i,1) = dmax1(aux3(i1,iuvw,2), 0.d0) * asdq(i,1)
else
bpasdq(i,1) = dmax1(aux2(i1,iuvw,3), 0.d0) * asdq(i,1)
endif
10 continue
c
return
end