42 #include <petsc/finclude/petsc.h>
47 integer(kind=intType),
intent(in) :: nZipFam
48 integer(kind=intType),
intent(in),
dimension(nZipFam) :: zipperFamList
51 integer(kind=intType) :: i, j, k, ii, jj, kk, iStart, iSize, sps, level, iStr
52 integer(kind=intType) :: iDom, jDom, nn, mm, n, ierr, iProc, iWork, nodeFam(3)
53 integer(kind=intType) :: nNodeTotal, nTriTotal, offset, iBCGroup, nFam
54 integer(kind=intType),
dimension(:),
allocatable :: famList
56 integer(kind=intType),
dimension(:, :),
allocatable :: tmpInt2D, work
57 logical,
dimension(:),
allocatable :: oSurfReady
58 type(
oversetwall),
dimension(:),
allocatable :: oSurfs
59 integer(kind=intType),
dimension(:),
allocatable :: intRecvBuf
62 integer(kind=intType),
dimension(:),
allocatable :: nodeIndices
64 integer(kind=intType) :: nFullStrings, nUnique
65 integer(kind=intType) :: nOSurfRecv, nOSurfSend
66 integer(kind=intType),
dimension(:, :),
allocatable :: oSurfRecvList, oSurfSendList
68 integer mpiStatus(MPI_STATUS_SIZE)
69 integer(kind=intType),
dimension(:, :),
allocatable :: bufSizes
70 integer(kind=intType),
dimension(:, :),
allocatable :: recvInfo
71 integer(kind=intType) :: sendCount, recvCount, index
76 integer(kind=intType) :: ncells
77 type(
oversetwall),
dimension(:),
allocatable,
target :: walls
100 if (zipper%allocated)
then
101 call vecscatterdestroy(zipper%scatter, ierr)
102 call echk(ierr, __file__, __line__)
103 call vecdestroy(zipper%localVal, ierr)
104 call echk(ierr, __file__, __line__)
105 zipper%allocated = .false.
110 if (
allocated(zipper%conn))
then
111 deallocate (zipper%conn, zipper%fam, zipper%indices)
118 if (
allocated(famlist))
then
124 do j = 1,
size(zipperfamlist)
125 if (
bcfamgroups(ibcgroup)%famList(i) == zipperfamlist(j))
then
134 allocate (zipper%conn(3, 0), zipper%fam(0), zipper%indices(0))
139 allocate (famlist(nfam))
142 do j = 1,
size(zipperfamlist)
143 if (
bcfamgroups(ibcgroup)%famList(i) == zipperfamlist(j))
then
145 famlist(nfam) = zipperfamlist(j)
152 write (*,
"(a)", advance=
"no")
'-> Creating zipper for families : '
153 do i = 1,
size(famlist)
154 write (*,
"(a,1x)", advance=
"no") trim(
famnames(famlist(i)))
183 tmpint2d(idom, 6), .true.)
186 call mpi_allreduce(tmpint2d, bufsizes, 6 *
ndomtotal, adflow_integer, mpi_sum, &
188 call echk(ierr, __file__, __line__)
193 ii = ndom * (
nproc - 1)
194 allocate (osurfsendlist(2, ii))
199 allocate (osurfrecvlist(2, ii))
202 osurfsendlist, nosurfsend, osurfrecvlist, nosurfrecv, bufsizes(:, 6))
203 deallocate (tmpint2d, bufsizes)
207 nn = max(
nproc, 2 * nosurfsend, 2 * nosurfrecv)
219 tmpint2d(idom, 2), .false.)
223 call mpi_allreduce(tmpint2d, bufsizes, 2 *
ndomtotal, adflow_integer, mpi_sum, &
225 call echk(ierr, __file__, __line__)
226 deallocate (tmpint2d)
231 if (bufsizes(idom, 1) == 0)
then
232 osurfready(idom) = .true.
234 osurfready(idom) = .false.
243 call packosurf(famlist, osurfs(idom), .false.)
244 osurfready(idom) = .true.
249 do jj = 1, nosurfsend
250 iproc = osurfsendlist(1, jj)
251 idom = osurfsendlist(2, jj)
252 call sendosurf(osurfs(idom), idom, iproc, 0, sendcount)
256 do jj = 1, nosurfrecv
257 iproc = osurfrecvlist(1, jj)
258 idom = osurfrecvlist(2, jj)
259 call recvosurf(osurfs(idom), idom, iproc, 0, &
260 bufsizes(idom, 1), bufsizes(idom, 2), recvcount, recvinfo)
265 call mpi_waitany(recvcount,
recvrequests, index, mpistatus, ierr)
266 call echk(ierr, __file__, __line__)
270 call mpi_waitany(sendcount,
sendrequests, index, mpistatus, ierr)
271 call echk(ierr, __file__, __line__)
278 idom = recvinfo(1, i)
279 if (.not. osurfs(idom)%allocated)
then
288 do jj = 1, nosurfsend
290 idom = osurfsendlist(2, jj)
291 ii = ii + osurfs(idom)%maxCells
293 allocate (intrecvbuf(max(1, ii)))
298 do iwork = 1,
size(work, 2)
299 idom = work(1, iwork)
300 jdom = work(2, iwork)
307 do jj = 1, nosurfrecv
308 iproc = osurfrecvlist(1, jj)
309 idom = osurfrecvlist(2, jj)
310 sendcount = sendcount + 1
311 call mpi_isend(osurfs(idom)%iBlank, osurfs(idom)%maxCells, adflow_integer, &
313 call echk(ierr, __file__, __line__)
318 do jj = 1, nosurfsend
319 iproc = osurfsendlist(1, jj)
320 idom = osurfsendlist(2, jj)
321 isize = osurfs(idom)%maxCells
322 recvcount = recvcount + 1
324 call mpi_irecv(intrecvbuf(istart), isize, adflow_integer, &
326 call echk(ierr, __file__, __line__)
327 istart = istart + isize
332 call mpi_waitany(sendcount,
sendrequests, index, mpistatus, ierr)
333 call echk(ierr, __file__, __line__)
337 call mpi_waitany(recvcount,
recvrequests, index, mpistatus, ierr)
338 call echk(ierr, __file__, __line__)
351 if (osurfs(idom)%iBlank(ii) == -2)
then
352 bcdata(mm)%iblank(i, j) = -2
362 do kk = 1, nosurfsend
364 idom = osurfsendlist(2, kk)
375 if (intrecvbuf(ii) == -2)
then
376 bcdata(mm)%iBlank(i, j) = -2
384 deallocate (bufsizes, osurfsendlist, osurfrecvlist, osurfready, recvinfo, work)
388 deallocate (osurfs, intrecvbuf)
405 rootproc:
if (
myid == 0)
then
420 ntritotal = master%ntris + pocketmaster%ntris
421 nnodetotal = master%nNodes + pocketmaster%nNodes
422 allocate (zipper%conn(3, ntritotal), zipper%fam(ntritotal), zipper%indices(nnodetotal))
426 outerloop:
do istr = 1, 2
433 offset = master%nNodes
441 nodefam(j) = str%family(str%tris(j, i))
451 zipper%conn(:, ii) = str%tris(:, i) + offset
461 zipper%indices(jj) = str%ind(j)
469 allocate (zipper%conn(3, 0), zipper%fam(0), zipper%indices(0))
473 zipper%localVal, ierr)
474 call echk(ierr, __file__, __line__)
479 zipper%indices - 1, petsc_copy_values, is1, ierr)
480 call echk(ierr, __file__, __line__)
482 #if PETSC_VERSION_GE(3,8,0)
483 call vecscattercreate(
bcfamexchange(ibcgroup, sps)%nodeValLocal, is1, &
484 zipper%localVal, petsc_null_is, zipper%scatter, ierr)
486 call vecscattercreate(
bcfamexchange(ibcgroup, sps)%nodeValLocal, is1, &
487 zipper%localVal, petsc_null_object, zipper%scatter, ierr)
489 call echk(ierr, __file__, __line__)
491 call isdestroy(is1, ierr)
492 call echk(ierr, __file__, __line__)
495 zipper%allocated = .true.
502 integer(kind=intType),
dimension(3) :: nodefam
507 if (nodefam(1) == nodefam(2) .and. nodefam(1) == nodefam(3))
then
513 else if (nodefam(1) == nodefam(2))
then
519 else if (nodefam(2) == nodefam(3))
then
525 else if (nodefam(1) == nodefam(3))
then
537 print *,
'Family for triangle could not be uniquely determined. Nodes are from 3 different families!'
551 character(*),
intent(in) :: fileName
554 type(oversetstring) :: master, pocketMaster
559 print *,
'Zipper successfully completed'
571 type(oversetstring),
intent(inout) :: master, pocketMaster
572 logical,
intent(in) :: debugZipper
575 type(oversetstring),
dimension(:),
allocatable,
target :: strings
576 type(oversetstring),
pointer :: str
577 integer(kind=intType) :: nStrings, i, j, nTriSelf
579 if (debugzipper)
then
580 open (unit=101, file=
"master_beforeStrings.dat", form=
'formatted')
581 write (101, *)
'TITLE = "Master Data" '
582 write (101, *)
'Variables = "X" "Y" "Z"'
597 allocate (master%edges(4 * master%nElems))
604 master%nEdges = master%nEdges + 1
605 master%edges(master%nEdges)%n1 = str%p%conn(1, str%pElems(j))
606 master%edges(master%nEdges)%n2 = str%p%conn(2, str%pElems(j))
613 allocate (master%tris(3, master%nElems))
622 if (debugzipper)
then
623 open (unit=101, file=
"strings_beforeSelfZip.dat", form=
'formatted')
624 write (101, *)
'TITLE = "Gap Strings Data" '
625 write (101, *)
'Variables = "X" "Y" "Z" "Nx" "Ny" "Nz" "Vx" "Vy" "Vz" "ind" &
626 &"gapID" "gapIndex" "otherID" "otherIndex" "ratio"'
636 ntriself = master%nTris
638 if (debugzipper)
then
643 if (debugzipper)
then
644 open (unit=101, file=
"strings_afterSelfZip.dat", form=
'formatted')
645 write (101, *)
'TITLE = "Gap Strings Data" '
646 write (101, *)
'Variables = "X" "Y" "Z" "Nx" "Ny" "Nz" "Vx" "Vy" "Vz" "ind" &
647 &"gapID" "gapIndex" "otherID" "otherIndex" "ratio"'
655 call makecrosszip(master, strings, nstrings, debugzipper)
658 if (debugzipper)
then
666 if (debugzipper)
then
667 print *,
'Doing pocket zip'
669 call makepocketzip(master, strings, nstrings, pocketmaster, debugzipper)
671 if (debugzipper)
then
700 integer(kind=intType),
intent(in),
dimension(:) :: famList
703 integer(kind=intType) :: i, j, mm, nn, clusterID, ierr, nPts, nCells
704 integer(kind=intType) :: iBeg, iEnd, jBeg, jEnd
705 real(kind=realtype),
dimension(:),
allocatable :: localareas
706 integer(kind=intType),
dimension(:),
allocatable :: localCount, globalCount
707 real(kind=realtype),
dimension(:, :),
allocatable :: pts
708 real(kind=realtype) :: fact, v1(3), v2(3), sss(3), da
721 domains:
do nn = 1, ndom
742 v1(:) =
xx(i + 1, j + 1, :) -
xx(i, j, :)
743 v2(:) =
xx(i, j + 1, :) -
xx(i + 1, j, :)
747 da =
half * sqrt(sss(1)**2 + sss(2)**2 + sss(3)**2)
748 localareas(clusterid) = localareas(clusterid) + da
749 localcount(clusterid) = localcount(clusterid) + 1
761 call echk(ierr, __file__, __line__)
763 call mpi_allreduce(localcount, globalcount,
nclusters, adflow_integer, &
765 call echk(ierr, __file__, __line__)
772 deallocate (localareas, localcount, globalcount)
785 integer(kind=intType),
intent(in) :: level, sps
788 integer(kind=intType) :: mm, nn, i, j, k, iBeg, iEnd, jBeg, jEnd
791 integer(kind=intType),
dimension(:, :),
pointer :: ibp, gcp, frx
792 integer(kind=intType),
dimension(:, :),
allocatable :: toFlip
797 domainloop:
do nn = 1, ndom
801 bocoloop:
do mm = 1,
nbocos
827 do j = jbeg - 1, jend + 1
828 do i = ibeg - 1, iend + 1
829 bcdata(mm)%iBlank(i, j) = ibp(i + 1, j + 1)
847 integer(kind=intType),
intent(in),
dimension(:) :: famList
848 integer(kind=intType),
intent(in) :: level, sps
851 integer(kind=intType) :: mm, nn, i, j, k, iBeg, iEnd, jBeg, jEnd
854 integer(kind=intType),
dimension(:, :),
pointer :: ibp, gcp, frx
855 integer(kind=intType),
dimension(:, :),
allocatable :: toFlip
893 domainloop:
do nn = 1, ndom
897 bocoloop:
do mm = 1,
nbocos
947 allocate (toflip(ibeg:iend, jbeg:jend))
976 if ((side(1) .and. side(2)) .or. (side(3) .and. side(4)))
then
988 if (toflip(i, j) == 1)
then
989 bcdata(mm)%iBlank(i, j) = 1
1002 integer(kind=intType),
intent(in) :: i, j
1010 if (gcp(i + 1, j + 1) >= 0 .and. frx(i + 1, j + 1) == 0)
then
1034 integer(kind=intType),
intent(in),
dimension(:) :: famList
1035 integer(kind=intType),
intent(in) :: level, sps
1038 integer(kind=intType) :: i, j, k, ii, jj, kk, nn, iBeg, iEnd, jBeg, jEnd, mm
1039 real(kind=realtype) :: deviation
1045 bocoloop:
do mm = 1,
nbocos
1067 do i = ibeg + 1, iend
1078 if (j - 1 >= jbeg + 1)
then
1079 bcdata(mm)%delta(i, j - 1) = max(
bcdata(mm)%delta(i, j - 1), deviation)
1083 if (j + 1 <= jend)
then
1084 bcdata(mm)%delta(i, j + 1) = max(
bcdata(mm)%delta(i, j + 1), deviation)
1092 do j = jbeg + 1, jend
1104 if (i - 1 >= ibeg + 1)
then
1105 bcdata(mm)%delta(i - 1, j) = max(
bcdata(mm)%delta(i - 1, j), deviation)
1109 if (i + 1 <= iend)
then
1110 bcdata(mm)%delta(i + 1, j) = max(
bcdata(mm)%delta(i + 1, j), deviation)
1133 bocoloop2:
do mm = 1,
nbocos
1146 bcdata(mm)%deltaNode(i, j) = max( &
1147 bcdata(mm)%delta(i, j), &
1148 bcdata(mm)%delta(i + 1, j), &
1149 bcdata(mm)%delta(i, j + 1), &
1150 bcdata(mm)%delta(i + 1, j + 1))
1173 real(kind=realtype),
intent(in),
dimension(3) :: p0, p1, p2, p3
1179 real(kind=realtype) :: t0, t1, t2, t3
1180 real(kind=realtype),
dimension(3) :: a1, a2, a3, b1, b2
1181 real(kind=realtype),
parameter :: alpha =
half
1182 integer(kind=intType),
parameter :: n = 20
1183 integer(kind=intType) :: i
1184 real(kind=realtype) :: t, p(3), q(3), s
1187 t1 = t0 +
mynorm2(p1 - p0)**alpha
1188 t2 = t1 +
mynorm2(p2 - p1)**alpha
1189 t3 = t2 +
mynorm2(p3 - p2)**alpha
1202 s = (i -
one) / (n -
one)
1203 t = (
one - s) * t1 + s * t2
1206 a3 = (t3 - t) / (t3 - t2) * p2 + (t - t2) / (t3 - t2) * p3
1207 a2 = (t2 - t) / (t2 - t1) * p1 + (t - t1) / (t2 - t1) * p2
1208 a1 = (t1 - t) / (t1 - t0) * p0 + (t - t0) / (t1 - t0) * p1
1210 b2 = (t3 - t) / (t3 - t1) * a2 + (t - t1) / (t3 - t1) * a3
1211 b1 = (t2 - t) / (t2 - t0) * a1 + (t - t0) / (t2 - t0) * a2
1213 p = (t2 - t) / (t2 - t1) * b1 + (t - t1) / (t2 - t1) * b2
1217 q = p1 + dot_product(p - p1, p2 - p1) / dot_product(p2 - p1, p2 - p1) * (p2 - p1)
1238 integer(kind=intType),
intent(in),
dimension(:) :: famList
1239 character(80) :: fileName, zoneName
1240 integer(kind=intType) :: i, j, nn, iDom, iBeg, iEnd, jBeg, jEnd, mm, iDim
1241 integer(kind=intType) :: nNode, nCell, tag, ierr, ii, iProc, nLocalBoco, tmp(5)
1242 real(kind=realtype),
dimension(:),
allocatable :: xbuffer
1243 integer(kind=intType),
dimension(:),
allocatable :: iblankBuffer, bocosPerProc
1244 integer(kind=intType),
dimension(:, :, :),
allocatable :: faceInfo
1245 integer,
dimension(mpi_status_size) :: mpiStatus
1249 write (filename,
"(a)")
"zipper_wall.dat"
1251 open (unit=101, file=trim(filename), form=
'formatted')
1252 write (101, *)
'TITLE = "zipper walls"'
1253 write (101, *)
'Variables = "X", "Y", "Z", "CellIBlank"'
1261 call setpointers(nn, 1, 1)
1264 nlocalboco = nlocalboco + 1
1270 allocate (bocosperproc(0:
nproc - 1))
1273 call mpi_gather(nlocalboco, 1, adflow_integer, bocosperproc, 1, &
1275 call echk(ierr, __file__, __line__)
1278 allocate (faceinfo(5, maxval(bocosperproc), 0:
nproc - 1))
1284 call setpointers(nn, 1, 1)
1290 tmp = (/ibeg, iend, jbeg, jend,
nbkglobal/)
1291 call mpi_send(tmp, 5, &
1293 call echk(ierr, __file__, __line__)
1299 do iproc = 1,
nproc - 1
1300 do tag = 1, bocosperproc(iproc)
1301 call mpi_recv(tmp, 5, adflow_integer, iproc, tag, &
1303 call echk(ierr, __file__, __line__)
1304 faceinfo(:, tag, iproc) = tmp
1311 call echk(ierr, __file__, __line__)
1315 call setpointers(nn, 1, 1)
1320 call setbcpointers(mm, .true.)
1322 nnode = (iend - ibeg + 1) * (jend - jbeg + 1)
1323 ncell = (iend - ibeg + 1) * (jend - jbeg + 1)
1324 allocate (iblankbuffer(ncell), xbuffer(3 * nnode))
1326 do j = jbeg + 1, jend
1327 do i = ibeg + 1, iend
1329 iblankbuffer(ii) =
bcdata(mm)%iBlank(i, j)
1338 xbuffer(ii) =
xx(i + 1, j + 1, idim)
1349 call mpi_send(iblankbuffer, ncell, adflow_integer, 0, tag, &
1351 call echk(ierr, __file__, __line__)
1354 call mpi_send(xbuffer, nnode * 3, adflow_real, 0, tag, &
1356 call echk(ierr, __file__, __line__)
1359 deallocate (iblankbuffer, xbuffer)
1367 do iproc = 1,
nproc - 1
1368 do tag = 1, bocosperproc(iproc)
1370 ibeg = faceinfo(1, tag, iproc)
1371 iend = faceinfo(2, tag, iproc)
1373 jbeg = faceinfo(3, tag, iproc)
1374 jend = faceinfo(4, tag, iproc)
1378 nnode = (iend - ibeg + 1) * (jend - jbeg + 1)
1379 ncell = (iend - ibeg + 1) * (jend - jbeg + 1)
1381 allocate (iblankbuffer(ncell), xbuffer(3 * nnode))
1383 call mpi_recv(iblankbuffer, ncell, adflow_integer, iproc, (2 * tag - 1), &
1385 call echk(ierr, __file__, __line__)
1387 call mpi_recv(xbuffer, nnode * 3, adflow_real, iproc, 2 * tag, &
1389 call echk(ierr, __file__, __line__)
1393 deallocate (iblankbuffer, xbuffer)
1397 deallocate (faceinfo, bocosperproc)
1403 subroutine writezone(iBeg, iEnd, jBeg, jEnd, nBkGlobal, xx, iblank)
1407 integer(kind=intType),
intent(in) :: iBeg, iEnd, jBeg, jEnd, nBkGlobal
1408 real(kind=realtype),
intent(in),
dimension(:) ::
xx
1409 integer(kind=intType),
intent(in),
dimension(:) :: iblank
1411 character(80) :: zoneName
1412 integer(kind=intType) :: iDim
1413 character(len=maxStringLen) :: zoneFormat
1415 write (zonename,
"(a,I5.5)")
"Zone_", nbkglobal
1416 zoneformat =
"(3(A), I5, A, I5)"
1417 write (101, zoneformat)
'ZONE T=', trim(zonename),
" I=", iend - ibeg + 1,
" J=", jend - jbeg + 1
1418 write (101, *)
"DATAPACKING=BLOCK, VARLOCATION=([1,2,3]=NODAL, [4]=CELLCENTERED)"
1421 nnode = (iend - ibeg + 1) * (jend - jbeg + 1)
1422 ncell = (iend - ibeg) * (jend - jbeg)
1429 write (101, *) iblank(i)
1445 integer(kind=intType),
intent(in),
dimension(:) :: famList
1446 integer(kind=intType),
intent(in) :: level, sps
1449 integer(kind=intType) :: mm, nn, i, j, k, e, iBeg, iEnd, jBeg, jEnd
1452 integer(kind=intType),
dimension(:, :),
pointer :: ibp, gcp
1453 integer(kind=intType),
dimension(:, :),
allocatable :: toFlip, nE, nC
1462 bowtieloop:
do e = 0, 2
1463 domainloop1:
do nn = 1, ndom
1466 bocoloop1:
do mm = 1,
nbocos
1504 allocate (ne(ibeg:iend, jbeg:jend), nc(ibeg:iend, jbeg:jend))
1510 if (
bcdata(mm)%iBlank(i, j) > 0 .and. nc(i, j) >= 1 .and. ne(i, j) <= e)
then
1511 bcdata(mm)%iBlank(i, j) = 0
1527 domainloop2:
do nn = 1, ndom
1530 bocoloop2:
do mm = 1,
nbocos
1558 allocate (ne(ibeg:iend, jbeg:jend), nc(ibeg:iend, jbeg:jend))
1566 if (
bcdata(mm)%iBlank(i, j) == 1 .and. ne(i, j) == 0 .and. nc(i, j) == 0)
then
1567 bcdata(mm)%iBlank(i, j) = 0
1588 integer(kind=intType) :: i, j, e(4)
1595 if (
bcdata(mm)%iBlank(i, j) >= 0)
then
1608 if (
bcdata(mm)%iBlank(i, j - 1) == 1) &
1611 if (
bcdata(mm)%iBlank(i + 1, j) == 1) &
1614 if (
bcdata(mm)%iBlank(i, j + 1) == 1) &
1617 if (
bcdata(mm)%iBlank(i - 1, j) == 1) &
1621 if (
bcdata(mm)%iBlank(i - 1, j - 1) == 1 .and. e(4) == 0 .and. e(1) == 0) &
1622 nc(i, j) = nc(i, j) + 1
1624 if (
bcdata(mm)%iBlank(i + 1, j - 1) == 1 .and. e(1) == 0 .and. e(2) == 0) &
1625 nc(i, j) = nc(i, j) + 1
1627 if (
bcdata(mm)%iBlank(i + 1, j + 1) == 1 .and. e(2) == 0 .and. e(3) == 0) &
1628 nc(i, j) = nc(i, j) + 1
1630 if (
bcdata(mm)%iBlank(i - 1, j + 1) == 1 .and. e(3) == 0 .and. e(4) == 0) &
1631 nc(i, j) = nc(i, j) + 1
1645 integer(kind=intType) :: i, j
1652 if (
bcdata(mm)%iBlank(i, j) == 1)
then
1664 if (
bcdata(mm)%iBlank(i, j - 1) == 1) &
1665 ne(i, j) = ne(i, j) + 1
1667 if (
bcdata(mm)%iBlank(i + 1, j) == 1) &
1668 ne(i, j) = ne(i, j) + 1
1670 if (
bcdata(mm)%iBlank(i, j + 1) == 1) &
1671 ne(i, j) = ne(i, j) + 1
1673 if (
bcdata(mm)%iBlank(i - 1, j) == 1) &
1674 ne(i, j) = ne(i, j) + 1
1677 if (
bcdata(mm)%iBlank(i - 1, j - 1) == 1) &
1678 nc(i, j) = nc(i, j) + 1
1680 if (
bcdata(mm)%iBlank(i + 1, j - 1) == 1) &
1681 nc(i, j) = nc(i, j) + 1
1683 if (
bcdata(mm)%iBlank(i + 1, j + 1) == 1) &
1684 nc(i, j) = nc(i, j) + 1
1686 if (
bcdata(mm)%iBlank(i - 1, j + 1) == 1) &
1687 nc(i, j) = nc(i, j) + 1
integer(kind=inttype), dimension(maxlevels) nnodeslocal
real(kind=realtype), dimension(:, :, :), pointer xx
integer(kind=inttype), dimension(:, :, :), pointer iblank
integer(kind=inttype), dimension(:, :, :), pointer globalcell
integer(kind=inttype) nbkglobal
integer(kind=inttype), dimension(:), pointer bcfaceid
integer(kind=inttype) nbocos
integer(kind=inttype), dimension(:), pointer bctype
integer(kind=inttype), dimension(:, :, :), pointer forcedrecv
real(kind=realtype), dimension(:, :, :, :), pointer x
integer, dimension(:), allocatable recvrequests
type(internalcommtype), dimension(:), allocatable internalcell_2nd
integer, dimension(:), allocatable sendrequests
type(commtype), dimension(:), allocatable commpatterncell_2nd
integer adflow_comm_world
real(kind=realtype), parameter zero
integer(kind=inttype), parameter imax
integer(kind=inttype), parameter kmin
integer(kind=inttype), parameter jmax
integer(kind=inttype), parameter nfamexchange
real(kind=realtype), parameter one
real(kind=realtype), parameter half
integer(kind=inttype), parameter imin
integer(kind=inttype), parameter kmax
integer(kind=inttype), parameter jmin
subroutine makegapboundarystrings(zipperFamList, level, sps, master)
type(kdtree2) function, pointer, public kdtree2_create(input_data, dim, sort, rearrange)
subroutine getosurfcommpattern(oMat, oMatT, sendList, nSend, recvList, nRecv, rBufSize)
subroutine recvosurf(oWall, iDom, iProc, tagOffset, iSize, rSize, recvCount, recvInfo)
subroutine sendosurf(oWall, iDom, iProc, tagOffset, sendCount)
subroutine exchangesurfaceiblanks(zipperFamList, level, sps, commPattern, internal)
real(kind=realtype), dimension(:), allocatable clusterareas
integer(kind=inttype) nclusters
type(zippermesh), dimension(nfamexchange), target zippermeshes
integer(kind=inttype) ndomtotal
integer(kind=inttype), dimension(:), allocatable cumdomproc
integer(kind=inttype), dimension(:), allocatable clusters
type(csrmatrix), dimension(:, :), allocatable, target overlapmatrix
subroutine initializeosurf(famList, oSurf, dualMesh, cluster)
subroutine unpackosurf(oSurf)
subroutine getosurfbuffersizes(famList, il, jl, kl, iSize, rSize, dualMesh)
subroutine packosurf(famList, oSurf, dualMesh)
subroutine flagforcedrecv
subroutine deallocateosurfs(oSurfs, n)
subroutine getworkarray(overlap, work)
subroutine transposeoverlap(A, B)
logical function faminlist(famID, famList)
subroutine loadzipperdebug(fileName, str)
subroutine writeoversettriangles(string, fileName, startTri, endTri)
subroutine stringmatch(strings, nStrings, debugZipper)
subroutine makepocketzip(p, strings, nStrings, pocketMaster, debugZipper)
subroutine writeoversetstring(str, strings, n, fileID)
subroutine writezipperdebug(str)
subroutine makecrosszip(p, strings, nStrings, debugZipper)
subroutine performselfzip(master, strings, nStrings, debugZipper)
subroutine writeoversetmaster(str, fileID)
subroutine deallocatestring(string)
subroutine setstringpointers(string)
subroutine createorderedstrings(master, strings, nString)
type(bcgrouptype), dimension(nfamexchange) bcfamgroups
character(len=maxcgnsnamelen), dimension(:), allocatable famnames
type(familyexchange), dimension(:, :), allocatable, target bcfamexchange
subroutine cross_prod(a, b, c)
subroutine setbcpointers(nn, spatialPointers)
real(kind=realtype) function mynorm2(x)
subroutine echk(errorcode, file, line)
subroutine setpointers(nn, mm, ll)
subroutine wallsearch(aSurf, bSurf)
real(kind=realtype) function checkdeviation(P0, P1, P2, P3)
subroutine checkzipper(fileName)
subroutine createzippermesh(zipperFamList, nZipFam)
subroutine writewalls(famList)
subroutine slitelimination(famList, level, sps)
subroutine surfacedeviation(famList, level, sps)
subroutine determineclusterareas(famList)
subroutine initbcdataiblank(level, sps)
subroutine zippercore(master, pocketMaster, debugZipper)
subroutine bowtieandisolationelimination(famList, level, sps)
subroutine setneighbourcounts
integer(kind=inttype) function selectnodefamily(nodeFam)
subroutine writezone(iBeg, iEnd, jBeg, jEnd, nBkGlobal, xx, iblank)
logical function validcell(i, j)