philim.f.html | ![]() |
Source file: philim.f | |
Directory: /Users/rjl/git/rjleveque/clawpack-4.6.3/book/chap9/acoustics/layered | |
Converted: Mon Jan 21 2013 at 20:15:48 using clawcode2html | |
This documentation file will not reflect any later changes in the source file. |
c c c ===================================================== double precision function philim(a,b,meth) c ===================================================== implicit real*8(a-h,o-z) c c # Compute a limiter based on wave strengths a and b. c # meth determines what limiter is used. c # a is assumed to be nonzero. c if (a .eq. 0.d0) then philim = 0.d0 return endif r = b/a c 10 continue c -------- c # minmod c -------- philim = dmax1(0.d0, dmin1(1.d0, r)) return c 20 continue c ---------- c # superbee c ---------- philim = dmax1(0.d0, dmin1(1.d0, 2.d0*r), dmin1(2.d0, r)) return c 30 continue c ---------- c # van Leer c ---------- philim = (r + dabs(r)) / (1.d0 + dabs(r)) return c 40 continue c ------------------------------ c # monotinized centered c ------------------------------ c = (1.d0 + r)/2.d0 philim = dmax1(0.d0, dmin1(c, 2.d0, 2.d0*r)) return c 50 continue c ------------------------------ c # Beam-Warming c ------------------------------ philim = r return end