2D AMRCLAW
Functions/Subroutines
domup.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine domup (iflags2, iflags, ibase, jbase, isize, jsize, lev)
 

Function/Subroutine Documentation

◆ domup()

subroutine domup ( integer(kind=1), dimension(0:isize+1,0:jsize+1)  iflags2,
integer(kind=1), dimension (0:ibase+1,0:jbase+1)  iflags,
  ibase,
  jbase,
  isize,
  jsize,
  lev 
)

domain flags are in iflags. copy into iflags2, allowing for change of level and dimension

Definition at line 5 of file domup.f.

References amr_module::dprint, amr_module::intratx, amr_module::intraty, amr_module::outunit, amr_module::spheredom, amr_module::xperdom, and amr_module::yperdom.

5 
6  use amr_module
7  implicit double precision (a-h, o-z)
8 
9 
10  integer(kind=1) iflags2(0:isize+1,0:jsize+1)
11  integer(kind=1) iflags (0:ibase+1,0:jbase+1)
12 
13 c
14 c ::::::::::::::::::::::::::: DOMUP :::::::::::::::::::::
15 c
18 c
19 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::
20 
21  if (dprint) then
22  write(outunit,*)" from domup: domflags (before expansion)"
23  do 5 jj = 1, jbase
24  j = jbase + 1 - jj
25  write(outunit,100)(iflags(i,j),i=1,ibase)
26  5 continue
27  endif
28 
29  do 10 j = 0, jsize+1
30  do 10 i = 0, isize+1
31  iflags2(i,j) = 0
32  10 continue
33 
34  do 20 j = 1, jbase
35  do 20 i = 1, ibase
36  ifine = (i-1) * intratx(lev)
37  jfine = (j-1) * intraty(lev)
38  do 25 mj = 1, intraty(lev)
39  do 25 mi = 1, intratx(lev)
40  iflags2(ifine+mi,jfine+mj) = iflags(i,j)
41  25 continue
42  20 continue
43 c
44 c take care of periodicity again or if border of domain touches a
45 c physical boundary then set domain in ghost cell as well
46 c
47  if (xperdom) then
48  do 35 j = 0, jsize+1
49  iflags2(0,j) = iflags2(isize,j)
50  iflags2(isize+1,j) = iflags2(1,j)
51  35 continue
52  else
53  do 55 j = 1, jsize
54  if (iflags2(1,j) .eq. 1) iflags2(0,j) = 1
55  if (iflags2(isize,j) .eq. 1) iflags2(isize+1,j) = 1
56  55 continue
57  endif
58  if (yperdom) then
59  do 45 i = 0, isize+1
60  iflags2(i,0) = iflags2(i,jsize)
61  iflags2(i,jsize+1) = iflags2(i,1)
62  45 continue
63  else if (spheredom) then
64  do 46 i = 0, isize+1
65  iflags2(i,0) = iflags2(isize+1-i,1)
66  iflags2(i,jsize+1) = iflags2(isize+1-i,jsize)
67  46 continue
68 
69  else
70  do 65 i = 1, isize
71  if (iflags2(i,1) .eq. 1) iflags2(i,0) = 1
72  if (iflags2(i,jsize) .eq. 1) iflags2(i,jsize+1) = 1
73  65 continue
74  endif
75 
76 c
77 c the 4 corners
78 c
79  if (iflags2(0,1)+iflags2(1,0) .eq. 2) iflags2(0,0)=1
80  if (iflags2(isize,0)+iflags2(isize+1,1) .eq. 2)
81  . iflags2(isize+1,0)=1
82  if (iflags2(isize,jsize+1)+iflags2(isize+1,jsize) .eq. 2)
83  . iflags2(isize+1,jsize+1)=1
84  if (iflags2(0,jsize)+iflags2(1,jsize+1) .eq. 2)
85  . iflags2(0,jsize+1)=1
86 
87 
88  if (dprint) then
89  write(outunit,*)" from domup: domflags (after expansion)"
90  do 70 jj = 1, jsize
91  j = jsize + 1 - jj
92  write(outunit,100)(iflags2(i,j),i=1,isize)
93  100 format(80i1)
94  70 continue
95  endif
96 
97  return
logical yperdom
Definition: amr_module.f90:230
logical spheredom
Definition: amr_module.f90:230
integer, dimension(maxlv) intraty
Definition: amr_module.f90:198
integer, parameter outunit
Definition: amr_module.f90:290
logical dprint
Definition: amr_module.f90:297
logical xperdom
Definition: amr_module.f90:230
integer, dimension(maxlv) intratx
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