| src1.f.html | clawcode2html |
| Source file: src1.f | |
| Directory: /Users/rjl/rjlsvn/papers/pathconwb10/code | |
| Converted: Fri Jan 8 2010 at 15:48:01 | |
| 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}}$
c
c
c =========================================================
subroutine src1(maxmx,meqn,mbc,mx,xlower,dx,q,maux,aux,t,dt)
c =========================================================
c # Source term is incorporated in fwave in rp1 if mthsrc > 1.
implicit double precision (a-h,o-z)
dimension q(1-mbc:maxmx+mbc, meqn)
dimension aux(1-mbc:maxmx+mbc, 1)
c
common /comrp/ u
common /comsrc/ mthsrc
if (mthsrc.eq.1) then
|
|
Fractional step for source term: Solve $q_t = -q \sigma'(x)$ over timestep of length dt. Approximate $\sigma'(x)$ using centered difference and then solve exactly. |
do i=1,mx
x = xlower + (i-0.5d0)*dx
sigp = (aux(i+1,1) - aux(i-1,1)) / (2.d0*dx)
q(i,1) = q(i,1) * dexp(-sigp*dt)
enddo
c # else do nothing in this routine: source term in Riemann solver.
endif
c
return
end