27 use amr_module, only: timesetaux, timesetauxcpu
32 integer,
intent(in) :: level, nvar, naux, mitot, mjtot, nrowst, ncolst
33 integer,
intent(in) :: ilo,ihi,jlo,jhi
34 real(kind=8),
intent(in) :: time
38 real(kind=8),
intent(in out) :: valbig(nvar,mitot,mjtot)
39 real(kind=8),
intent(in out) :: aux(naux,mitot,mjtot)
42 integer :: i, j, ii, jj, ivar, nr, nc, ng, i1, i2, j1, j2, iputst, jputst
43 integer :: jbump, iwrap1, iwrap2, jwrap1, tmp, locflip, rect(4)
44 real(kind=8) :: xlwrap, ybwrap
46 integer :: ist(3), iend(3), jst(3), jend(3), ishift(3), jshift(3)
47 real(kind=8) :: scratch(max(mitot,mjtot)*nghost*nvar)
48 real(kind=8) :: scratchaux(max(mitot,mjtot)*nghost*naux)
51 integer :: clock_start, clock_finish, clock_rate
52 real(kind=8) :: cpu_start, cpu_finish
62 ist(3) = iregsz(level)
64 iend(2) = iregsz(level)-1
66 ishift(1) = iregsz(level)
68 ishift(3) = -iregsz(level)
70 ist(1) = iregsz(level)
72 ist(3) = iregsz(level)
81 if (yperdom .or. spheredom)
then 84 jst(3) = jregsz(level)
86 jend(2) = jregsz(level)-1
88 jshift(1) = jregsz(level)
90 jshift(3) = -jregsz(level)
92 jst(1) = jregsz(level)
94 jst(3) = jregsz(level)
110 i1 = max(ilo, ist(i))
111 i2 = min(ihi, iend(i))
112 if (i1 .gt. i2)
go to 20
114 j1 = max(jlo, jst(j))
115 j2 = min(jhi, jend(j))
122 if (.not. spheredom .or. j == 2 )
then 123 iputst = (i1 - ilo) + nrowst
124 jputst = (j1 - jlo) + ncolst
126 call filrecur(level,nvar,valbig,aux,naux,time,mitot,mjtot, &
127 iputst,jputst,i1+ishift(i),i2+ishift(i),j1+jshift(j),j2+jshift(j),.false.)
134 if (j1 < 0) jbump = abs(j1)
135 if (j2 >= jregsz(level)) jbump = -(j2+1-jregsz(level))
138 iwrap1 = i1 + ishift(i)
139 iwrap2 = i2 + ishift(i)
141 iwrap1 = iregsz(level) - iwrap1 -1
142 iwrap2 = iregsz(level) - iwrap2 -1
149 xlwrap = xlower + iwrap1*hxposs(level)
150 ybwrap = ylower + jwrap1*hyposs(level)
153 scratchaux = needs_to_be_set
155 call system_clock(clock_start,clock_rate)
156 call cpu_time(cpu_start)
157 call setaux(ng,nr,nc,xlwrap,ybwrap,hxposs(level),hyposs(level),naux,scratchaux)
158 call system_clock(clock_finish,clock_rate)
159 call cpu_time(cpu_finish)
160 timesetaux = timesetaux + clock_finish - clock_start
161 timesetauxcpu = timesetauxcpu + cpu_finish - cpu_start
164 rect = [iwrap1,iwrap2,j1+jbump,j2+jbump]
165 call filrecur(level,nvar,scratch,scratchaux,naux,time,nr, &
166 nc,1,1,iwrap1,iwrap2,j1+jbump,j2+jbump,.false.)
174 valbig(ivar,nrowst+(ii-ilo),ncolst+(jj-jlo)) = &
187 integer pure function iadd(n,i,j)
189 integer,
intent(in) :: n, i, j
190 iadd = locflip + n-1 + nvar*((j-1)*nr+i-1)
195 integer,
intent(in) :: n, i, j
integer, dimension(maxlv) iregsz
real(kind=8), dimension(maxlv) hyposs
real(kind=8), dimension(maxlv) hxposs
integer, dimension(maxlv) jregsz
integer pure function iaddscratch(n, i, j)
integer pure function iadd(ivar, i, j)
real(kind=8), parameter needs_to_be_set
recursive subroutine filrecur(level, nvar, valbig, aux, naux, t, mitot, mjtot, nrowst, ncolst, ilo, ihi, jlo, jhi, patchOnly, msrc)
Fill a region (patch) described by:
The module contains the definition of a "node descriptor" as well as other global variables used duri...
subroutine setaux(mbc, mx, my, xlower, ylower, dx, dy, maux, aux)