22 real(kind=realtype),
dimension(nLocalValues),
intent(inout) :: localvalues
23 integer(kind=intType),
dimension(:),
intent(in) :: famList
24 integer(kind=intType),
intent(in) :: sps
27 integer(kind=intType) :: iSurf, i, j, k, jj, ierr, nn, iDim, nPts
28 real(kind=realtype),
dimension(:),
allocatable :: recvbuffer1, recvbuffer2
29 real(kind=realtype),
dimension(:, :),
allocatable :: vars
30 integer(kind=intType),
dimension(:),
allocatable :: fams
31 logical,
dimension(:),
allocatable :: ptValid
39 domainloop:
do nn = 1,
ndom
40 if (
flowdoms(nn, 1, sps)%addGridVelocities)
then
41 call terminate(
"userSurfaceIntegrations",
"Cannot use user-supplied surface integrations"&
42 &
"on with moving grids")
67 faminclude:
if (
faminlist(surf%famID, famlist))
then
68 npts =
size(surf%pts, 2)
72 allocate (recvbuffer1(6 * npts), recvbuffer2(3 * npts))
74 allocate (recvbuffer1(0), recvbuffer2(0))
85 allocate (ptvalid(npts), vars(npts,
nzippflowcomm), fams(
size(surf%conn, 2)))
98 j = surf%flowComm%inv(i)
101 if (.not. surf%flowComm%valid(i))
then
111 j = surf%nodeComm%inv(i)
115 if (.not. surf%nodeComm%valid(i))
then
124 deallocate (ptvalid, vars, fams)
126 deallocate (recvbuffer1, recvbuffer2)
145 real(kind=realtype),
dimension(nLocalValues),
intent(inout) :: localvalues, localvaluesd
146 integer(kind=intType),
dimension(:),
intent(in) :: famList
147 integer(kind=intType),
intent(in) :: sps
150 integer(kind=intType) :: iSurf, i, j, k, jj, ierr, nn, iDim, nPts
151 real(kind=realtype),
dimension(:),
allocatable :: recvbuffer1, recvbuffer2
152 real(kind=realtype),
dimension(:),
allocatable :: recvbuffer1d, recvbuffer2d
153 real(kind=realtype),
dimension(:, :),
allocatable :: vars, varsd
154 integer(kind=intType),
dimension(:),
allocatable :: fams
155 logical,
dimension(:),
allocatable :: ptValid
163 domainloop:
do nn = 1,
ndom
164 if (
flowdoms(nn, 1, sps)%addGridVelocities)
then
165 call terminate(
"userSurfaceIntegrations",
"Cannot use user-supplied surface integrations"&
166 &
"on with moving grids")
205 faminclude:
if (
faminlist(surf%famID, famlist))
then
206 npts =
size(surf%pts, 2)
210 allocate (recvbuffer1(6 * npts), recvbuffer2(3 * npts))
211 allocate (recvbuffer1d(6 * npts), recvbuffer2d(3 * npts))
213 allocate (recvbuffer1(0), recvbuffer2(0))
214 allocate (recvbuffer1d(0), recvbuffer2d(0))
240 j = surf%flowComm%inv(i)
245 if (.not. surf%flowComm%valid(i))
then
256 j = surf%nodeComm%inv(i)
261 if (.not. surf%nodeComm%valid(i))
then
271 varsd, localvalues, localvaluesd, &
272 famlist, sps, ptvalid)
273 deallocate (ptvalid, vars, varsd, fams)
275 deallocate (recvbuffer1, recvbuffer2, recvbuffer1d, recvbuffer2d)
294 real(kind=realtype),
dimension(nLocalValues),
intent(inout) :: localvalues, localvaluesd
295 integer(kind=intType),
dimension(:),
intent(in) :: famList
296 integer(kind=intType),
intent(in) :: sps
299 integer(kind=intType) :: iSurf, i, j, k, jj, ierr, nn, iDim, nPts
300 real(kind=realtype),
dimension(:),
allocatable :: recvbuffer1, recvbuffer2
301 real(kind=realtype),
dimension(:),
allocatable :: recvbuffer1d, recvbuffer2d
302 real(kind=realtype),
dimension(:, :),
allocatable :: vars, varsd
303 integer(kind=intType),
dimension(:),
allocatable :: fams
304 logical,
dimension(:),
allocatable :: ptValid
315 domainloop:
do nn = 1,
ndom
316 if (
flowdoms(nn, 1, sps)%addGridVelocities)
then
317 call terminate(
"userSurfaceIntegrations",
"Cannot use user-supplied surface integrations"&
318 &
"on with moving grids")
357 faminclude:
if (
faminlist(surf%famID, famlist))
then
358 npts =
size(surf%pts, 2)
362 allocate (recvbuffer1(6 * npts), recvbuffer2(3 * npts))
363 allocate (recvbuffer1d(6 * npts), recvbuffer2d(3 * npts))
365 allocate (recvbuffer1(0), recvbuffer2(0))
366 allocate (recvbuffer1d(0), recvbuffer2d(0))
393 j = surf%flowComm%inv(i)
396 if (.not. surf%flowComm%valid(i))
then
406 j = surf%nodeComm%inv(i)
410 if (.not. surf%nodeComm%valid(i))
then
420 varsd, localvalues, localvaluesd, &
421 famlist, sps, ptvalid)
429 j = surf%flowComm%inv(i)
438 j = surf%nodeComm%inv(i)
442 deallocate (ptvalid, vars, varsd, fams)
449 deallocate (recvbuffer1, recvbuffer2, recvbuffer1d, recvbuffer2d)
465 integer(kind=intType),
intent(in) :: nPts, nConn, famID
466 real(kind=realtype),
dimension(3, nPts),
intent(in) :: pts
467 integer(kind=intType),
dimension(3, nConn),
intent(in) :: conn
468 logical,
intent(in) :: isInflow
469 character(len=*) :: famName
477 print *,
"Error: Exceeded the maximum number of user-supplied "&
478 &
"integration slices. Increase nUserIntSurfsMax"
484 allocate (surf%pts(3, npts), surf%conn(3, nconn))
488 surf%famName = famname
490 surf%isInflow = isinflow
501 use blockpointers,
only: ndom,
x,
ie,
je,
ke,
il,
jl,
kl,
vol,
ib,
jb,
kb, &
512 integer(kind=intType) :: nInterpol, nn, i, j, k, iii, jjj, kkk
513 integer(kind=intType) :: iStart, jStart, kStart, iEnd, jEnd, kEnd
514 integer(kind=intType) :: ii, jj, kk, mm, nADT, nHexa, planeOffset
519 domainloop:
do nn = 1, ndom
522 oblock => oblocks(nn)
524 primalordual:
if (usedual)
then
533 allocate (oblock%xADT(3, nadt), oblock%hexaConn(8, nhexa), &
534 oblock%qualDonor(1, nadt))
541 oblock%xADT(:, mm) =
eighth * ( &
542 x(i - 1, j - 1, k - 1, :) + &
543 x(i, j - 1, k - 1, :) + &
544 x(i - 1, j, k - 1, :) + &
545 x(i, j, k - 1, :) + &
546 x(i - 1, j - 1, k, :) + &
547 x(i, j - 1, k, :) + &
548 x(i - 1, j, k, :) + &
550 oblock%qualDonor(1, mm) =
vol(i, j, k)
564 istart = 1; iend = 1;
568 istart =
ie; iend =
ie;
577 jstart =
je; jend =
je;
582 kstart = 1; kend = 1;
586 kstart =
ke; kend =
ke;
594 kk = (k - 1) *
ie *
je + (j - 1) *
ie + i
595 oblock%qualDonor(1, kk) =
large
604 planeoffset =
ie *
je
609 oblock%hexaConn(1, mm) = (k - 2) * planeoffset + (j - 2) *
ie + (i - 2) + 1
610 oblock%hexaConn(2, mm) = oblock%hexaConn(1, mm) + 1
611 oblock%hexaConn(3, mm) = oblock%hexaConn(2, mm) +
ie
612 oblock%hexaConn(4, mm) = oblock%hexaConn(3, mm) - 1
614 oblock%hexaConn(5, mm) = oblock%hexaConn(1, mm) + planeoffset
615 oblock%hexaConn(6, mm) = oblock%hexaConn(2, mm) + planeoffset
616 oblock%hexaConn(7, mm) = oblock%hexaConn(3, mm) + planeoffset
617 oblock%hexaConn(8, mm) = oblock%hexaConn(4, mm) + planeoffset
634 allocate (oblock%xADT(3, nadt), oblock%hexaConn(8, nhexa), &
635 oblock%qualDonor(1, nadt))
637 oblock%qualDonor =
zero
644 oblock%xADT(:, mm) =
x(i, j, k, :)
651 ii = min(max(0, iii + i),
ib)
652 jj = min(max(0, jjj + j),
jb)
653 kk = min(max(0, kkk + k),
kb)
655 oblock%qualDonor(1, mm) = oblock%qualDonor(1, mm) + &
663 oblock%qualDonor(1, mm) = oblock%qualDonor(1, mm) *
eighth
670 planeoffset =
ib *
jb
675 oblock%hexaConn(1, mm) = (k - 1) * planeoffset + (j - 1) *
ib + (i - 1) + 1
676 oblock%hexaConn(2, mm) = oblock%hexaConn(1, mm) + 1
677 oblock%hexaConn(3, mm) = oblock%hexaConn(2, mm) +
ib
678 oblock%hexaConn(4, mm) = oblock%hexaConn(3, mm) - 1
680 oblock%hexaConn(5, mm) = oblock%hexaConn(1, mm) + planeoffset
681 oblock%hexaConn(6, mm) = oblock%hexaConn(2, mm) + planeoffset
682 oblock%hexaConn(7, mm) = oblock%hexaConn(3, mm) + planeoffset
683 oblock%hexaConn(8, mm) = oblock%hexaConn(4, mm) + planeoffset
692 call buildserialhex(nhexa, nadt, oblock%xADT, oblock%hexaConn, oblock%ADT)
708 use blockpointers,
only: ndom,
x,
ie,
je,
ke,
il,
jl,
kl,
x,
iblank,
vol
720 real(kind=realtype),
dimension(:, :),
intent(in) :: pts
722 type(
oversetblock),
dimension(:),
target,
intent(in) :: oBlocks
723 logical,
intent(in) :: useDual
729 type(
interppttype),
dimension(:),
allocatable :: surfFringes
731 integer(Kind=intType) :: i, j, k, ii, jj, kk, iii, jjj, kkk, nn, mm
732 integer(kind=intType) :: iSurf, ierr, nInterpol, iProc
733 integer(kind=intType) :: nHexa, nAdt, planeOffset, elemID, nPts
734 real(kind=realtype) :: xc(4), weight(8)
735 integer mpiStatus(MPI_STATUS_SIZE)
737 real(kind=realtype) :: uvw(5), uvw2(5), donorqual, xcheck(3)
738 integer(kind=intType) :: intInfo(3), intInfo2(3)
739 logical :: failed, invalid
741 integer(kind=intType),
dimension(:, :),
allocatable :: donorInfo, intSend
742 integer(kind=intType),
dimension(:),
allocatable :: procSizes
743 real(kind=realtype),
dimension(:, :),
allocatable :: donorfrac, realsend
746 integer(kind=intType),
dimension(:),
pointer :: BB
748 integer(kind=intType),
dimension(:),
pointer :: frontLeaves
749 integer(kind=intType),
dimension(:),
pointer :: frontLeavesNew
752 allocate (bb(20), frontleaves(25), frontleavesnew(25),
stack(100), bb2(20))
757 allocate (donorfrac(4, npts), donorinfo(5, npts))
759 donorfrac(4, :) =
large
761 domainsearch:
do nn = 1, ndom
762 oblock => oblocks(nn)
766 elemloop:
do i = 1, npts
772 oblock%qualDonor, ninterpol, bb, &
773 frontleaves, frontleavesnew, failed)
776 if (intinfo(1) >= 0)
then
780 xcheck = xcheck + weight(j) * oblock%xADT(:, oblock%hexaConn(j, intinfo(3)))
788 if (intinfo(1) >= 0 .and. failed)
then
792 oblock%qualDonor, ninterpol, bb2, frontleaves, frontleavesnew)
798 xcheck = xcheck + weight(j) * oblock%xADT(:, oblock%hexaConn(j, intinfo(3)))
814 elemfound:
if (intinfo(1) >= 0)
then
818 elemid = intinfo(3) - 1
823 ii = mod(elemid, oblock%il) + 1
824 jj = mod(elemid / oblock%il, oblock%jl) + 1
825 kk = elemid / (oblock%il * oblock%jl) + 1
827 ii = mod(elemid, oblock%il)
828 jj = mod(elemid / oblock%il, oblock%jl)
829 kk = elemid / (oblock%il * oblock%jl)
832 if (donorqual < donorfrac(4, i))
then
849 if (.not. (
iblank(ii + iii, jj + jjj, kk + kkk) == 1 .or. &
850 iblank(ii + iii, jj + jjj, kk + kkk) == -1))
then
858 if (.not. invalid)
then
863 donorinfo(1, i) =
myid
868 donorfrac(1:3, i) = uvw(1:3)
869 donorfrac(4, i) = donorqual
881 if (donorinfo(1, i) /= -1)
then
885 allocate (intsend(6, j), realsend(4, i))
889 if (donorinfo(1, i) /= -1)
then
891 intsend(1:5, j) = donorinfo(:, i)
893 realsend(:, j) = donorfrac(:, i)
900 allocate (intsend(6, npts), realsend(4, npts))
905 allocate (procsizes(0:
nproc - 1))
907 call mpi_gather(j, 1, adflow_integer, procsizes, 1, &
909 call echk(ierr, __file__, __line__)
918 call mpi_send(intsend, j * 6, adflow_integer, 0,
myid, &
920 call echk(ierr, __file__, __line__)
922 call mpi_send(realsend, j * 4, adflow_real, 0,
myid, &
924 call echk(ierr, __file__, __line__)
930 do iproc = 1,
nproc - 1
932 if (procsizes(iproc) /= 0)
then
934 call mpi_recv(intsend, 6 * npts, adflow_integer, iproc, iproc, &
936 call echk(ierr, __file__, __line__)
938 call mpi_recv(realsend, 4 * npts, adflow_real, iproc, iproc, &
940 call echk(ierr, __file__, __line__)
947 do i = 1, procsizes(iproc)
950 if (realsend(4, i) < donorfrac(4, ii))
then
952 donorinfo(1:5, ii) = intsend(1:5, i)
953 donorfrac(:, ii) = realsend(:, i)
962 allocate (surffringes(npts))
964 surffringes(i)%donorProc = donorinfo(1, i)
965 surffringes(i)%donorBlock = donorinfo(2, i)
966 surffringes(i)%dI = donorinfo(3, i)
967 surffringes(i)%dJ = donorinfo(4, i)
968 surffringes(i)%dK = donorinfo(5, i)
969 surffringes(i)%donorFrac = donorfrac(1:3, i)
973 surffringes(i)%myBlock = i
985 allocate (comm%valid(npts))
988 if (surffringes(i)%donorProc < 0)
then
990 comm%valid(i) = .false.
996 j = max(surffringes(i)%donorProc, 0)
997 procsizes(j) = procsizes(j) + 1
1004 call echk(ierr, __file__, __line__)
1008 allocate (comm%procSizes(0:
nproc - 1), comm%procDisps(0:
nproc))
1012 comm%procSizes = procsizes
1018 allocate (comm%Inv(npts))
1020 comm%Inv(i) = surffringes(i)%myBlock
1026 comm%nDonor = procsizes(
myid)
1027 allocate (comm%frac(3, comm%nDonor), comm%donorInfo(4, comm%nDonor))
1030 if (comm%nDonor > 0)
then
1038 call mpi_recv(intsend, 6 * comm%nDonor, adflow_integer, 0,
myid, &
1040 call echk(ierr, __file__, __line__)
1042 call mpi_recv(realsend, 4 * comm%nDonor, adflow_real, 0,
myid, &
1044 call echk(ierr, __file__, __line__)
1047 do i = 1, comm%nDonor
1048 comm%donorInfo(:, i) = intsend(1:4, i)
1049 comm%frac(:, i) = realsend(1:3, i)
1054 if (comm%nDonor > 0)
then
1056 do i = comm%procDisps(
myid) + 1, comm%procDisps(
myid + 1)
1057 comm%donorInfo(1, i) = surffringes(i)%donorBlock
1058 comm%donorInfo(2, i) = surffringes(i)%dI
1059 comm%donorInfo(3, i) = surffringes(i)%dJ
1060 comm%donorInfo(4, i) = surffringes(i)%dK
1061 comm%frac(1:3, i) = surffringes(i)%donorFrac
1068 do iproc = 1,
nproc - 1
1070 if (comm%procSizes(iproc) > 0)
then
1073 do i = comm%procDisps(iproc) + 1, comm%procDisps(iproc + 1)
1076 intsend(1, j) = surffringes(i)%donorBlock
1077 intsend(2, j) = surffringes(i)%dI
1078 intsend(3, j) = surffringes(i)%dJ
1079 intsend(4, j) = surffringes(i)%dK
1080 realsend(1:3, j) = surffringes(i)%donorFrac
1083 call mpi_send(intsend, j * 6, adflow_integer, iproc, iproc, &
1085 call echk(ierr, __file__, __line__)
1087 call mpi_send(realsend, j * 4, adflow_real, iproc, iproc, &
1089 call echk(ierr, __file__, __line__)
1094 deallocate (surffringes)
1098 deallocate (intsend, realsend, procsizes, donorinfo, donorfrac)
1099 deallocate (bb, frontleaves, frontleavesnew,
stack, bb2)
1120 integer(Kind=intType) :: iSurf, ii, i, nn, nPts, ierr
1121 real(kind=realtype),
dimension(:, :),
allocatable :: pts
1126 primaldualloop:
do ii = 1, 2
1143 npts =
size(surf%pts, 2)
1144 allocate (pts(3, npts))
1145 nodeloop:
do i = 1, npts
1146 pts(:, i) = surf%pts(:, i)
1152 call echk(ierr, __file__, __line__)
1157 allocate (pts(3, npts))
1161 call echk(ierr, __file__, __line__)
1176 deallocate (oblocks(nn)%xADT, oblocks(nn)%hexaConn, oblocks(nn)%qualDonor)
1178 end do primaldualloop
1192 real(kind=realtype),
dimension(:) :: recvbuffer
1193 integer(kind=intType),
intent(in) :: varStart, varEnd
1197 real(kind=realtype),
dimension(:),
allocatable :: sendbuffer
1198 integer(Kind=intType) :: d1, i1, j1, k1, jj, k, nvar, i, ierr
1199 real(kind=realtype),
dimension(8) :: weight
1202 nvar = varend - varstart + 1
1206 allocate (sendbuffer(nvar * comm%nDonor))
1213 donorloop:
do i = 1, comm%nDonor
1220 d1 = comm%donorInfo(1, i)
1221 i1 = comm%donorInfo(2, i) + 1
1222 j1 = comm%donorInfo(3, i) + 1
1223 k1 = comm%donorInfo(4, i) + 1
1226 do k = varstart, varend
1230 weight(1) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1, j1, k1) + &
1231 weight(2) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1 + 1, j1, k1) + &
1232 weight(3) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1, j1 + 1, k1) + &
1233 weight(4) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1 + 1, j1 + 1, k1) + &
1234 weight(5) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1, j1, k1 + 1) + &
1235 weight(6) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1 + 1, j1, k1 + 1) + &
1236 weight(7) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1, j1 + 1, k1 + 1) + &
1237 weight(8) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1 + 1, j1 + 1, k1 + 1)
1243 call mpi_gatherv(sendbuffer, nvar * comm%nDonor, adflow_real, recvbuffer, &
1244 nvar * comm%procSizes, nvar * comm%procDisps, adflow_real, 0,
adflow_comm_world, ierr)
1245 call echk(ierr, __file__, __line__)
1246 deallocate (sendbuffer)
1261 real(kind=realtype),
dimension(:) :: recvbuffer, recvbufferd
1262 integer(kind=intType),
intent(in) :: varStart, varEnd
1266 real(kind=realtype),
dimension(:),
allocatable :: sendbuffer, sendbufferd
1267 integer(Kind=intType) :: d1, i1, j1, k1, jj, k, nvar, i, ierr
1268 real(kind=realtype),
dimension(8) :: weight
1271 nvar = varend - varstart + 1
1275 allocate (sendbuffer(nvar * comm%nDonor), &
1276 sendbufferd(nvar * comm%nDonor))
1280 donorloop:
do i = 1, comm%nDonor
1287 d1 = comm%donorInfo(1, i)
1288 i1 = comm%donorInfo(2, i) + 1
1289 j1 = comm%donorInfo(3, i) + 1
1290 k1 = comm%donorInfo(4, i) + 1
1293 do k = varstart, varend
1297 weight(1) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1, j1, k1) + &
1298 weight(2) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1 + 1, j1, k1) + &
1299 weight(3) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1, j1 + 1, k1) + &
1300 weight(4) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1 + 1, j1 + 1, k1) + &
1301 weight(5) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1, j1, k1 + 1) + &
1302 weight(6) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1 + 1, j1, k1 + 1) + &
1303 weight(7) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1, j1 + 1, k1 + 1) + &
1304 weight(8) *
flowdoms(d1, 1, 1)%realCommVars(k)%var(i1 + 1, j1 + 1, k1 + 1)
1319 call mpi_gatherv(sendbuffer, nvar * comm%nDonor, adflow_real, recvbuffer, &
1320 nvar * comm%procSizes, nvar * comm%procDisps, adflow_real, 0,
adflow_comm_world, ierr)
1321 call echk(ierr, __file__, __line__)
1323 call mpi_gatherv(sendbufferd, nvar * comm%nDonor, adflow_real, recvbufferd, &
1324 nvar * comm%procSizes, nvar * comm%procDisps, adflow_real, 0,
adflow_comm_world, ierr)
1325 call echk(ierr, __file__, __line__)
1327 deallocate (sendbuffer, sendbufferd)
1342 real(kind=realtype),
dimension(:) :: recvbuffer, recvbufferd
1343 integer(kind=intType),
intent(in) :: varStart, varEnd
1347 real(kind=realtype),
dimension(:),
allocatable :: sendbuffer, sendbufferd
1348 integer(Kind=intType) :: d1, i1, j1, k1, jj, k, nvar, i, ierr
1349 real(kind=realtype),
dimension(8) :: weight
1352 nvar = varend - varstart + 1
1354 allocate (sendbufferd(nvar * comm%nDonor))
1358 call mpi_scatterv(recvbufferd, nvar * comm%procSizes, nvar * comm%procDisps, adflow_real, &
1360 call echk(ierr, __file__, __line__)
1364 donorloop:
do i = 1, comm%nDonor
1371 d1 = comm%donorInfo(1, i)
1372 i1 = comm%donorInfo(2, i) + 1
1373 j1 = comm%donorInfo(3, i) + 1
1374 k1 = comm%donorInfo(4, i) + 1
1377 do k = varstart, varend
1384 weight(1) * sendbufferd(jj)
1388 weight(2) * sendbufferd(jj)
1392 weight(3) * sendbufferd(jj)
1396 weight(4) * sendbufferd(jj)
1400 weight(5) * sendbufferd(jj)
1404 weight(6) * sendbufferd(jj)
1408 weight(7) * sendbufferd(jj)
1412 weight(8) * sendbufferd(jj)
1417 deallocate (sendbufferd)
1430 integer(kind=intType),
intent(in) :: nn
1436 integer(kind=intType),
parameter :: m = 7
1438 integer(kind=intType) :: nStack
1439 integer(kind=intType) :: i, j, k, r, l, jStack, ii
1445 integer(kind=intType),
allocatable,
dimension(:) :: stack
1446 integer(kind=intType),
allocatable,
dimension(:) :: tmpStack
1451 allocate (stack(nstack), stat=ierr)
1454 "Memory allocation failure for stack")
1468 if ((r - l) < m)
then
1474 do i = (j - 1), l, -1
1475 if (arr(i) <= a)
exit
1484 if (jstack == 0)
exit
1489 l = stack(jstack - 1)
1504 if (arr(r) < arr(l))
then
1510 if (arr(r) < arr(l + 1))
then
1516 if (arr(l + 1) < arr(l))
then
1535 if (a <= arr(i))
exit
1541 if (arr(j) <= a)
exit
1565 if (jstack > nstack)
then
1569 allocate (tmpstack(nstack), stat=ierr)
1572 "Memory allocation error for tmpStack")
1578 deallocate (stack, stat=ierr)
1581 "Deallocation error for stack")
1583 nstack = nstack + 100
1588 allocate (stack(nstack), stat=ierr)
1591 "Memory reallocation error for stack")
1592 stack(1:ii) = tmpstack(1:ii)
1596 deallocate (tmpstack, stat=ierr)
1599 "Deallocation error for tmpStack")
1602 if ((r - i + 1) >= (j - l))
then
1605 stack(jstack - 1) = j
1607 stack(jstack) = j - 1
1608 stack(jstack - 1) = l
1617 deallocate (stack, stat=ierr)
1620 "Deallocation error for stack")
1626 if (arr(i + 1) < arr(i)) &
1628 "Array is not sorted correctly")
subroutine destroyserialhex(ADT)
subroutine buildserialhex(nHexa, nNodes, coor, hexaConn, ADT)
subroutine containmenttreesearchsinglepoint(ADT, coor, intInfo, uvw, arrDonor, nInterpol, BB, frontLeaves, frontLeavesNew, failed)
subroutine mindistancetreesearchsinglepoint(ADT, coor, intInfo, uvw, arrDonor, nInterpol, BB, frontLeaves, frontLeavesNew)
integer(kind=inttype), dimension(:), pointer stack
integer(kind=inttype) ndom
type(blocktype), dimension(:, :, :), allocatable, target flowdomsd
type(blocktype), dimension(:, :, :), allocatable, target flowdoms
integer(kind=inttype), dimension(:, :, :), pointer iblank
integer(kind=inttype), dimension(:), pointer bcfaceid
integer(kind=inttype) nbocos
integer(kind=inttype), dimension(:), pointer bctype
real(kind=realtype), dimension(:, :, :), pointer vol
real(kind=realtype), dimension(:, :, :, :), pointer x
integer adflow_comm_world
integer(kind=inttype), parameter oversetouterbound
real(kind=realtype), parameter zero
integer(kind=inttype), parameter imax
integer(kind=inttype), parameter izippflowy
integer(kind=inttype), parameter kmin
integer(kind=inttype), parameter jmax
real(kind=realtype), parameter eighth
integer(kind=inttype), parameter izippflowx
integer(kind=inttype), parameter izippflowsface
integer(kind=inttype), parameter imin
integer(kind=inttype), parameter izippflowgamma
integer(kind=inttype), parameter nzippflowcomm
real(kind=realtype), parameter large
integer(kind=inttype), parameter kmax
integer(kind=inttype), parameter izippflowp
integer(kind=inttype), parameter jmin
integer(kind=inttype), parameter izippflowz
subroutine computettot(rho, u, v, w, p, Ttot)
subroutine computeptot(rho, u, v, w, p, ptot)
real(kind=realtype) rhoref
real(kind=realtype) timeref
subroutine fractoweights(frac, weights)
subroutine getcumulativeform(sizeArray, n, cumArray)
subroutine fractoweights2(frac, weights)
logical function faminlist(famID, famList)
integer(kind=inttype), parameter nuserintsurfsmax
type(userintsurf), dimension(nuserintsurfsmax), target userintsurfs
integer(kind=inttype) nuserintsurfs
subroutine integrateusersurfaces_d(localValues, localValuesd, famList, sps)
subroutine commuserintegrationsurfacevars_d(recvBuffer, recvBufferd, varStart, varEnd, comm)
subroutine integrateusersurfaces(localValues, famList, sps)
subroutine addintegrationsurface(pts, conn, famName, famID, isInflow, nPts, nConn)
subroutine commuserintegrationsurfacevars(recvBuffer, varStart, varEnd, comm)
subroutine integrateusersurfaces_b(localValues, localValuesd, famList, sps)
subroutine qsortinterppttype(arr, nn)
subroutine commuserintegrationsurfacevars_b(recvBuffer, recvBufferd, varStart, varEnd, comm)
subroutine interpolateintegrationsurfaces
subroutine performinterpolation(pts, oBlocks, useDual, comm)
subroutine buildvolumeadts(oBlocks, useDual)
real(kind=realtype) function mynorm2(x)
subroutine echk(errorcode, file, line)
subroutine setpointers(nn, mm, ll)
subroutine terminate(routineName, errorMessage)
subroutine flowintegrationzipper_b(isinflow, conn, fams, vars, varsd, localvalues, localvaluesd, famlist, sps, ptvalid)
subroutine flowintegrationzipper_d(isinflow, conn, fams, vars, varsd, localvalues, localvaluesd, famlist, sps, ptvalid)
subroutine flowintegrationzipper(isInflow, conn, fams, vars, localValues, famList, sps, ptValid)