2D AMRCLAW
shiftset2.f
Go to the documentation of this file.
1 c :::::::::::::::::::::: CSHIFT :::::::::::::::::::::::::::::::
21 c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
22 c
23 c ----------------------------------------------------------
24 c
25  subroutine shiftset2(rectflags,ilo,ihi,jlo,jhi,mbuff)
26 
27  use amr_module
28  implicit double precision (a-h, o-z)
29  dimension rectflags(ilo-mbuff:ihi+mbuff,jlo-mbuff:jhi+mbuff)
30  dimension copyflags(ilo-mbuff:ihi+mbuff,jlo-mbuff:jhi+mbuff)
31 
32  do j = jlo-mbuff, jhi+mbuff
33  do i = ilo-mbuff, ihi+mbuff
34  copyflags(i,j) = 0
35  end do
36  end do
37 
38 c note: not looking at ghost cells, only real cells should be flagged
39 c but can buffer the flags into the ghost zone
40  do j = jlo, jhi
41  do i = ilo, ihi
42  rflag = rectflags(i,j)
43  if (rflag .gt. 0) then
44 c cell is flagged, buffer in all dirs by ibuff
45 c (note this is not nec same as mbuff)
46 c use second array to avoid propagation
47  mlo = i - ibuff
48  mhi = i + ibuff
49  klo = j - ibuff
50  khi = j + ibuff
51  do k = klo, khi
52  do m = mlo, mhi
53  copyflags(m,k) = rflag ! copy the flag (doesnt distinguish buffer flag from orig flag)
54  end do
55  end do
56  endif
57 
58  end do
59  end do
60 
61 
62 c copy back. need flags in original array, not temp scratch array
63 
64  do 60 j = jlo-mbuff, jhi+mbuff
65  do 60 i = ilo-mbuff, ihi+mbuff
66  rectflags(i,j) = copyflags(i,j)
67  60 continue
68 
69 
70  return
71  end
subroutine shiftset2(rectflags, ilo, ihi, jlo, jhi, mbuff)
For an input grid, flag cells near the previously flagged cells for creating buffer zone...
Definition: shiftset2.f:26
integer ibuff
Definition: amr_module.f90:198
The module contains the definition of a "node descriptor" as well as other global variables used duri...
Definition: amr_module.f90:21