begin_html [use: jsMath]

[www.clawpack.org Clawpack] Fortran file rp1.f

The file can have a different name, but should contain a subroutine called rp1. For additional documentation on Riemann solvers, see the CLAWPACK documentation at [www.clawpack.org/doc.html], or the book [www.clawpack.org/book.html FVMHP]. The rp1 subroutine should have the following form:
end_html c c c ===================================================== subroutine rp1(maxm,meqn,mwaves,mbc,mx,ql,qr,auxl,auxr, & wave,s,amdq,apdq) c ===================================================== c implicit double precision (a-h,o-z) dimension ql(1-mbc:maxmx+mbc, meqn) dimension qr(1-mbc:maxmx+mbc, meqn) dimension auxl(1-mbc:maxmx+mbc, *) dimension auxr(1-mbc:maxmx+mbc, *) dimension s(1-mbc:maxmx+mbc, mwaves) dimension wave(1-mbc:maxmx+mbc, meqn, mwaves) dimension amdq(1-mbc:maxmx+mbc, meqn) dimension apdq(1-mbc:maxmx+mbc, meqn) c c Compute wave, s, amdq, apdq... c return end begin_html
On input:
maxm = leading dimension of the q and aux arrays.
meqn = number of equations in the system (second dimension of q).
mwaves = number of waves returned from the Riemann solver,
mbc = number of ghost cells on left and on right.
mx = number of interior grid cells.
ql contains the state vector at the left edge of each cell,
qr contains the state vector at the right edge of each cell,
auxl contains the auxiliary array at the left edge,
auxr contains the auxiliary array at the right edge,

The i'th Riemann problem has left state qr(i-1,:) and right state ql(i,:).

The Riemann solver may use data in the aux array, in which case the values auxr(i-1,:) and auxl(i,:) should generally be used.

From the basic clawpack routine step1, rp1 is called with ql = qr = q and auxl = auxr = aux.

On output:
wave contains the waves,
s the speeds,
amdq the left-going flux difference $\A^-\Delta Q$,
apdq the right-going flux difference $\A^+\Delta Q$