2D AMRCLAW
setPhysBndry.f
Go to the documentation of this file.
1 c
2 c -----------------------------------------------------------
3 c
4  subroutine setphysbndry(rectflags,ilo,ihi,jlo,jhi,mbuff,level)
5 
6  use amr_module
7  implicit double precision (a-h, o-z)
8 
9  dimension rectflags(ilo-mbuff:ihi+mbuff, jlo-mbuff:jhi+mbuff)
10 
11 c ****************************************************************
12 c setPhysBndry = if grid borders the physical domain then
13 c turn off any flagged points in buffer zone = those points
14 c are not properly nested (and it doesnt matter).
15 c But last row/col interior to grid if flagged is ok
16 c
17 c if periodic, then have to look elsewhere to see if
18 c last interior row/col that is flagged is ok.
19 c (done in rest of colate2)
20 c ****************************************************************
21 
22  if (ilo .eq. 0 .and. .not. xperdom) then
23 c set left flagged points to be ok
24  do j = jlo-mbuff, jhi+mbuff
25  do i = ilo-mbuff, ilo-1
26  rectflags(i,j) = goodpt
27  end do
28 c 1st interior cell ok if on bndry. set back to pos if flagged
29  rectflags(0,j) = abs(rectflags(0,j))
30  end do
31  endif
32 
33  if (ihi .eq. iregsz(level)-1 .and. .not. xperdom) then
34 c set right flagged points to be ok
35  do j = jlo-mbuff, jhi+mbuff
36  do i = ihi+1, ihi+mbuff
37  rectflags(i,j) = goodpt
38  end do
39  rectflags(ihi,j) = abs(rectflags(ihi,j))
40  end do
41  endif
42 
43 
44  if (jlo .eq. 0 .and. .not. yperdom) then
45 c set bottom flagged points to be ok
46  do i = ilo-mbuff, ihi+mbuff
47  do j = jlo-mbuff, jlo-1
48  rectflags(i,j) = goodpt
49  end do
50  rectflags(i,0) = abs(rectflags(i,0))
51  end do
52  endif
53 
54  if (jhi .eq. jregsz(level)-1 .and. .not. yperdom) then
55 c set top flagged points to be ok
56  do i = ilo-mbuff, ihi+mbuff
57  do j = jhi+1, jhi+mbuff
58  rectflags(i,j) = goodpt
59  end do
60  rectflags(i,jhi) = abs(rectflags(i,jhi))
61  end do
62  endif
63 
64  return
65  end
subroutine setphysbndry(rectflags, ilo, ihi, jlo, jhi, mbuff, level)
Definition: setPhysBndry.f:4