rp1.html CLAWPACK  
 Source file:   rp1.txt
 Directory:   /Users/rjl/git/rjleveque/clawpack-4.6.3/doc
 Converted:   Mon Jan 21 2013 at 20:15:52   using clawcode2html
 This documentation file will not reflect any later changes in the source file.

$\phantom{******** If you see this on the webpage then the browser could not locate *********}$
$\phantom{******** the jsMath file load.js *********}$

$\newcommand{\vector}[1]{\left[\begin{array}{c} #1 \end{array}\right]}$ $\newenvironment{matrix}{\left[\begin{array}{cccccccccc}} {\end{array}\right]}$ $\newcommand{\A}{{\cal A}}$ $\newcommand{\W}{{\cal W}}$

 

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 FVMHP .

The rp1 subroutine should have the following form:


 

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


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$