2D AMRCLAW
setPhysBndryFlags.f
Go to the documentation of this file.
1 c ****************************************************************
23 c ****************************************************************
24 
25 c
26 c -----------------------------------------------------------
27 c
28  subroutine setphysbndryflags(iflags,ilo,ihi,jlo,jhi,mbuff,level)
29 
30  use amr_module
31  implicit double precision (a-h, o-z)
32 
33  integer*1 iflags(ilo-mbuff:ihi+mbuff, jlo-mbuff:jhi+mbuff)
34 
35  if (ilo-mbuff .lt. 0 .and. .not. xperdom) then ! grid extends out of left side of domain
36 c set left flagged points to be ok
37  do j = jlo-mbuff, jhi+mbuff
38  do i = ilo-mbuff, -1
39 c iflags(i,j) = iflags(0,j) ! extend using whatever 1st col inside is
40  iflags(i,j) = 1 ! set to 1 for bndry buffers that touch exterior domain
41  end do
42  end do
43  endif
44 
45  if (ihi+mbuff .ge. iregsz(level) .and. .not. xperdom) then
46 c set right flagged points to be ok
47  do j = jlo-mbuff, jhi+mbuff
48  do i = iregsz(level), ihi+mbuff
49 c iflags(i,j) = iflags(iregsz(level)-1,j)
50  iflags(i,j) = 1
51  end do
52  end do
53  endif
54 
55 
56  if (jlo-mbuff .lt. 0 .and. .not. yperdom) then
57 c set bottom flagged points to be ok
58  do j = jlo-mbuff, -1
59  do i = ilo-mbuff, ihi+mbuff
60 c iflags(i,j) = iflags(i,0)
61  iflags(i,j) = 1
62  end do
63  end do
64  endif
65 
66  if (jhi+mbuff .ge. jregsz(level) .and. .not. yperdom) then
67 c set top flagged points to be ok
68  do j = jregsz(level), jhi+mbuff
69  do i = ilo-mbuff, ihi+mbuff
70 c iflags(i,j) = iflags(i,jregsz(level)-1) ! extend using last flag in domain
71  iflags(i,j) = 1
72  end do
73  end do
74  endif
75 
76 
77  return
78  end
subroutine setphysbndryflags(iflags, ilo, ihi, jlo, jhi, mbuff, level)
If grid borders the physical domain then set domain flags to 1 in buffer zone (which is outside the p...
integer, dimension(maxlv) iregsz
Definition: amr_module.f90:198
integer, dimension(maxlv) jregsz
Definition: amr_module.f90:198
logical yperdom
Definition: amr_module.f90:230
logical xperdom
Definition: amr_module.f90:230
The module contains the definition of a "node descriptor" as well as other global variables used duri...
Definition: amr_module.f90:21