4 logical function nestck2(mnew,lbase,badpts,npts,numptc,icl,
8 implicit double precision (a-h,o-z)
9 dimension badpts(2,npts)
13 integer numptc(maxcl), zerobuff
33 levnew = node(nestlevel,mnew)
34 lratiox = intratx(levnew-1)
35 lratioy = intraty(levnew-1)
38 if (lbase .eq. 1)
then
48 isnested1 =
basecheck(mnew,lbase,node(ndilo,mnew),
49 . node(ndihi,mnew),node(ndjlo,mnew),
50 . node(ndjhi,mnew),nvar,naux,zerobuff)
55 levtocheck = levnew - 2
56 if (levtocheck .le. 1)
then
58 else if (levtocheck .le. lbase)
then
61 mbuff = max(nghost,ibuff+1)
62 isnested2 =
basecheck(mnew,levtocheck,node(ndilo,mnew),
63 . node(ndihi,mnew),node(ndjlo,mnew),
64 . node(ndjhi,mnew),nvar,naux,mbuff)
68 if (isnested1 .and. isnested2)
then
79 50
if (npts .gt. 1) go to 55
80 write(outunit,101) levnew
82 101
format(
' nestck2: 1 pt. cluster at level ',i5,
' still not',
83 1
' nested',/,
' pt. too close to boundary')
84 write(outunit,104) badpts(1,npts),badpts(2,npts)
85 write(*,104) badpts(1,npts),badpts(2,npts)
86 104
format(
' non-nested flagged pt. at: ',2e15.7)
87 call
outtre(mstart, .false.,nvar,naux)
88 call
outmsh(mnew, .false.,nvar,naux)
91 55
if (nclust .lt. maxcl) go to 60
92 write(outunit,102) maxcl
94 102
format(
' too many clusters: > ',i5,
' (from nestck2) ')
97 60
if (nprint)
write(outunit,103) icl, npts
98 103
format(
' bisecting cluster ',i5,
' with ',i5,
' pts. in nestck2')
99 if (rnode(cornxhi,mnew)-rnode(cornxlo,mnew) .gt.
100 1 rnode(cornyhi,mnew) - rnode(cornylo,mnew))
then
101 rmid = (rnode(cornxhi,mnew) + rnode(cornxlo,mnew) ) / 2.
102 rmid = (node(ndihi,mnew) + node(ndilo,mnew) + 1 ) / 2.
103 rmid = rmid / lratiox
106 rmid = (rnode(cornyhi,mnew) + rnode(cornylo,mnew) ) / 2.
107 rmid = (node(ndjhi,mnew) + node(ndjlo,mnew) + 1) / 2.
108 rmid = rmid / lratioy
115 90
if (badpts(idir,ipt) .lt. rmid) go to 100
121 badpts(1,ipt) = badpts(1,ntop)
122 badpts(1,ntop) = temp
124 badpts(2,ipt) = badpts(2,ntop)
125 badpts(2,ntop) = temp
127 if (ipt .le. ntop) go to 90
130 if (ipt .le. ntop) go to 90
134 110 numptc(icl) = npts - ntop
135 do 120 i = icl, nclust
136 nmove = nclust + icl - i
137 120 numptc(nmove+1) = numptc(nmove)
logical function basecheck(mnew, lbase, ilo, ihi, jlo, jhi, nvar, naux, thisBuff)
logical function nestck2(mnew, lbase, badpts, npts, numptc, icl, nclust, nvar, naux)
subroutine outtre(mlev, outgrd, nvar, naux)
subroutine outmsh(mptr, outgrd, nvar, naux)