4 subroutine limiter(maxm,meqn,mwaves,mbc,mx,wave,s,mthlim)
32 implicit double precision (a-h,o-z)
34 dimension wave(meqn,
mwaves, 1-mbc:maxm+mbc)
35 dimension s(
mwaves, 1-mbc:maxm+mbc)
39 if (
mthlim(mw) .eq. 0)
go to 200
46 wnorm2 = wnorm2 + wave(m,mw,i)**2
47 dotr = dotr + wave(m,mw,i)*wave(m,mw,i+1)
50 if (wnorm2.eq.0.d0)
go to 190
52 if (s(mw,i) .gt. 0.d0)
then 58 go to (10,20,30,40,50)
mthlim(mw)
64 wlimitr = dmax1(0.d0, dmin1(1.d0, r))
71 wlimitr = dmax1(0.d0, dmin1(1.d0, 2.d0*r), dmin1(2.d0, r))
78 wlimitr = (r + dabs(r)) / (1.d0 + dabs(r))
86 wlimitr = dmax1(0.d0, dmin1(c, 2.d0, 2.d0*r))
101 wave(m,mw,i) = wlimitr * wave(m,mw,i)
integer, dimension(:), allocatable mthlim
subroutine limiter(maxm, meqn, mwaves, mbc, mx, wave, s, mthlim)