12 subroutine flagregions(mx,my,mbuff,xlower,ylower,dx,dy,level,t, &
13 amrflags,DONTFLAG,DOFLAG)
20 integer,
intent(in) :: mx,my,level,mbuff
21 real(kind=8),
intent(in) :: xlower,ylower,dx,dy,t
24 real(kind=8),
intent(inout) :: amrflags(1-mbuff:mx+mbuff,1-mbuff:my+mbuff)
25 real(kind=8),
intent(in) :: DONTFLAG
26 real(kind=8),
intent(in) :: DOFLAG
32 integer :: i,j,m,minlevel,maxlevel
33 real(kind=8) :: x_low,y_low,x_hi,y_hi
39 y_low = ylower + (j - 1) * dy
40 y_hi = ylower + j * dy
43 x_low = xlower + (i - 1) * dx
44 x_hi = xlower + i * dx
53 minlevel = max(minlevel,
regions(m)%min_level)
54 maxlevel = max(maxlevel,
regions(m)%max_level)
58 if (minlevel > maxlevel)
then 59 write(6,*)
'*** Error: this should never happen!' 60 write(6,*)
'*** minlevel > maxlevel in flagregions' 64 if (maxlevel /= 0)
then 67 if (level < minlevel)
then 69 amrflags(i,j) = doflag
70 else if (level >= maxlevel)
then 72 amrflags(i,j) = dontflag
type(region_type), dimension(:), allocatable regions
subroutine flagregions(mx, my, mbuff, xlower, ylower, dx, dy, level, t, amrflags, DONTFLAG, DOFLAG)
Modify array of flagged points to respect minlevels and maxlevels specified by regions.