2D AMRCLAW
domshrink.f
Go to the documentation of this file.
1 c
2 c ----------------------------------------------------
3 c
4  subroutine domshrink(iflags2,iflags,idim,jdim)
5 
6  use amr_module
7  implicit double precision (a-h, o-z)
8 
9 
10  integer(kind=1) iflags2(0:idim+1,0:jdim+1)
11  integer(kind=1) iflags (0:idim+1,0:jdim+1)
12 
13 c
14 c ::::::::::::::::::::::::: DOMSHRINK ::::::::::::::::::::::::::::
15 c
19 c
20 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
21 
22  if (dprint) then
23  write(outunit,*)" from domshrink: on entry, iflags2"
24  do 10 jj = 1, jdim
25  j = jdim + 1 - jj
26  write(outunit,100)(iflags2(i,j),i=1,idim)
27  100 format(80i1)
28  10 continue
29  endif
30 
31  do 40 j = 1, jdim
32  do 40 i = 1, idim
33  iflags(i,j) = iflags2(i,j)
34  if (iflags2(i ,j ) .le. 0 .or.
35  1 iflags2(i+1,j ) .le. 0 .or. iflags2(i-1,j ) .le. 0 .or.
36  2 iflags2(i+1,j+1) .le. 0 .or. iflags2(i-1,j+1) .le. 0 .or.
37  3 iflags2(i ,j-1) .le. 0 .or. iflags2(i ,j+1) .le. 0 .or.
38  4 iflags2(i+1,j-1) .le. 0 .or. iflags2(i-1,j-1) .le. 0) then
39  iflags(i,j) = 0
40  endif
41  40 continue
42 c
43 c if border of domain touches a physical boundary then set domain in
44 c ghost cell as well
45 c
46 C WHY DOESNT THIS HAVE TO HAVE PERIODIC CLAUSE(AND spheredom)
47  if (.not. xperdom) then
48  do 55 j = 1, jdim
49  if (iflags(1,j) .eq. 1) iflags(0,j) = 1
50  if (iflags(idim,j) .eq. 1) iflags(idim+1,j) = 1
51  55 continue
52  endif
53  if (.not. yperdom) then
54  do 65 i = 1, idim
55  if (iflags(i,1) .eq. 1) iflags(i,0) = 1
56  if (iflags(i,jdim) .eq. 1) iflags(i,jdim+1) = 1
57  65 continue
58  endif
59 
60  if (dprint) then
61  write(outunit,*)" from domshrink: on exit, iflags"
62  do 70 jj = 1, jdim
63  j = jdim + 1 - jj
64  write(outunit,100)(iflags(i,j),i=1,idim)
65  70 continue
66  endif
67 
68  return
69  end
logical yperdom
Definition: amr_module.f90:230
integer, parameter outunit
Definition: amr_module.f90:290
logical dprint
Definition: amr_module.f90:297
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
subroutine domshrink(iflags2, iflags, idim, jdim)
Definition: domshrink.f:5