4 subroutine colate2 (badpts, len, lcheck, nUniquePts, lbase)
7 implicit double precision (a-h,o-z)
8 dimension badpts(2,len)
9 dimension ist(3), iend(3), jst(3), jend(3), ishift(3), jshift(3)
11 integer*8 largestintequiv
16 iadd(i,j) = locamrflags + i-(ilo-mbuff) + mibuff*(j-(jlo-mbuff))
40 mbuff = max(nghost,ibuff+1)
50 ilo = node(ndilo,mptr)
51 ihi = node(ndihi,mptr)
52 jlo = node(ndjlo,mptr)
53 jhi = node(ndjhi,mptr)
56 mibuff = nx + 2 *mbuff
57 mjbuff = ny + 2 *mbuff
60 locamrflags = node(storeflags,mptr)
61 if (node(numflags,mptr) .eq. 0) go to 70
70 if (.not. xperdom)
then
72 imax = min(ihi+mbuff,iregsz(lcheck)-1)
74 if (.not. yperdom)
then
76 jmax = min(jhi+mbuff,jregsz(lcheck)-1)
93 call
flagcheck(alloc(locamrflags),ilo,ihi,jlo,jhi,mbuff,
94 . alloc(node(domflags2,mptr)),
95 . imin,imax,jmin,jmax,mptr)
102 if (alloc(
iadd(i,j)) .lt. 0)
then
103 write(outunit,939) i,j
104 939
format(
"NOT NESTED: ignoring point ",2i5)
105 write(*,*)
" still have neg points"
108 if (alloc(
iadd(i,j)) .eq. goodpt) go to 60
121 if (i .lt. 0) iwrap = i + iregsz(lcheck)
122 if (i .ge. iregsz(lcheck)) iwrap = i - iregsz(lcheck)
126 if (j .lt. 0) jwrap = j + jregsz(lcheck)
127 if (j .ge. jregsz(lcheck)) jwrap = j - jregsz(lcheck)
131 badpts(1,index) = dble(iwrap)+.5
132 badpts(2,index) = dble(jwrap)+.5
133 if (db)
write(outunit,101) badpts(1,index), badpts(2,index)
145 call
reclam(locamrflags,mibuff*mjbuff)
148 iflagsize = (mibuff*mjbuff)/ibytesperdp+1
149 call
reclam(node(domflags_base,mptr),iflagsize)
150 call
reclam(node(domflags2,mptr),iflagsize)
153 mptr = node(levelptr, mptr)
154 if (mptr .ne. 0) go to 10
159 write(outunit,100) npts, lcheck,len
160 100
format( i9,
' flagged points initially colated on level ',i4,
161 .
" badpts len = ",i10)
173 largestintequiv = iregsz(lcheck)+mbuff +
174 . (iregsz(lcheck)+2*mbuff)*(jregsz(lcheck)+mbuff)
175 largestsingle = 2**30
176 if (largestsingle .le. largestintequiv)
then
179 call
drivesort(npts,badpts,lcheck,nuniquepts,mbuff)
subroutine colate2(badpts, len, lcheck, nUniquePts, lbase)
subroutine flagcheck(rectflags, ilo, ihi, jlo, jhi, mbuff, iflags, imin, imax, jmin, jmax, mptr)
subroutine reclam(index, nwords)
integer pure function iadd(ivar, i, j)
subroutine drivesort(npts, badpts, level, index, mbuff)