17 integer(kind=intType),
intent(out) :: sizeNode, sizeCell
18 logical,
intent(in) :: includeZipper
19 integer(kind=intType) :: nn, mm, i, j, iimax, shp(1)
20 integer(kind=intType) :: iBeg, iEnd, jBeg, jEnd, iBCGroup
21 integer(kind=intType),
intent(in) :: n, famList(n)
23 logical :: BCGroupNeeded
27 domains:
do nn = 1, ndom
35 sizenode = sizenode + (iend - ibeg + 1) * (jend - jbeg + 1)
38 blanking:
if (.not. includezipper)
then
39 sizecell = sizecell + (iend - ibeg) * (jend - jbeg)
44 if (
bcdata(mm)%iBlank(i, j) == 1)
then
45 sizecell = sizecell + 1
65 bcgroupneeded = .false.
66 bcgroupfamloop:
do j = 1,
size(
bcfamgroups(ibcgroup)%famList)
68 bcgroupneeded = .true.
73 if (.not. bcgroupneeded)
then
81 if (.not. zipper%allocated)
then
87 sizenode = sizenode +
size(zipper%indices)
92 do i = 1,
size(zipper%fam)
93 if (
faminlist(zipper%fam(i), famlist))
then
94 sizecell = sizecell + 1
115 integer(kind=intType),
intent(in) :: ncell
116 integer(kind=intType),
intent(inout) :: conn(4 * ncell), cgnsBlockID(ncell)
117 integer(kind=intType),
intent(in) :: nFamList, famList(nFamList)
118 logical,
intent(in) :: includeZipper
121 integer(kind=intType) :: nn, mm, cellCount, nodeCount, ni, nj, i, j
122 integer(kind=intType) :: iBeg, iEnd, jBeg, jEnd, iBCGroup
123 logical regularOrdering, BCGroupNeeded
132 domains:
do nn = 1, ndom
160 regularordering = .true.
162 regularordering = .false.
168 regularordering = .not. (regularordering)
171 if (regularordering)
then
188 if (.not. includezipper .or.
bcdata(mm)%iBlank(i + ibeg + 1, j + jbeg + 1) == 1)
then
189 conn(4 * cellcount + 1) = nodecount + (j) * ni + i + 1
190 conn(4 * cellcount + 2) = nodecount + (j) * ni + i + 1 + 1
191 conn(4 * cellcount + 3) = nodecount + (j + 1) * ni + i + 1 + 1
192 conn(4 * cellcount + 4) = nodecount + (j + 1) * ni + i + 1
199 cellcount = cellcount + 1
207 if (.not. includezipper .or.
bcdata(mm)%iBlank(i + ibeg + 1, j + jbeg + 1) == 1)
then
208 conn(4 * cellcount + 1) = nodecount + (j) * ni + i + 1
209 conn(4 * cellcount + 2) = nodecount + (j + 1) * ni + i + 1
210 conn(4 * cellcount + 3) = nodecount + (j + 1) * ni + i + 1 + 1
211 conn(4 * cellcount + 4) = nodecount + (j) * ni + i + 1 + 1
218 cellcount = cellcount + 1
223 nodecount = nodecount + ni * nj
240 bcgroupneeded = .false.
241 bcgroupfamloop:
do i = 1,
size(
bcfamgroups(ibcgroup)%famList)
243 bcgroupneeded = .true.
246 end do bcgroupfamloop
248 if (.not. bcgroupneeded)
then
256 if (.not. zipper%allocated)
then
263 do i = 1,
size(zipper%fam)
264 if (
faminlist(zipper%fam(i), famlist))
then
267 conn(4 * cellcount + 1) = nodecount + zipper%conn(1, i)
268 conn(4 * cellcount + 2) = nodecount + zipper%conn(2, i)
269 conn(4 * cellcount + 3) = nodecount + zipper%conn(3, i)
270 conn(4 * cellcount + 4) = nodecount + zipper%conn(3, i)
271 cellcount = cellcount + 1
289 integer(kind=intType),
intent(in) :: ncell
290 integer(kind=intType),
intent(inout) :: elemFam(nCell)
291 integer(kind=intType),
intent(in) :: nFamList, famList(nFamList)
292 logical,
intent(in) :: includeZipper
295 integer(kind=intType) :: nn, mm, cellCount, nodeCount, ni, nj, i, j
296 integer(kind=intType) :: iBeg, iEnd, jBeg, jEnd, iBCGroup
297 logical BCGroupNeeded
303 domains:
do nn = 1, ndom
315 if (.not. includezipper .or.
bcdata(mm)%iBlank(i + ibeg + 1, j + jbeg + 1) == 1)
then
316 cellcount = cellcount + 1
317 elemfam(cellcount) =
bcdata(mm)%famID
321 nodecount = nodecount + ni * nj
338 bcgroupneeded = .false.
339 bcgroupfamloop:
do i = 1,
size(
bcfamgroups(ibcgroup)%famList)
341 bcgroupneeded = .true.
344 end do bcgroupfamloop
346 if (.not. bcgroupneeded)
then
354 if (.not. zipper%allocated)
then
361 do i = 1,
size(zipper%fam)
362 if (
faminlist(zipper%fam(i), famlist))
then
365 cellcount = cellcount + 1
366 elemfam(cellcount) = zipper%fam(i)
381 #include <petsc/finclude/petsc.h>
388 integer(kind=intType),
intent(in) :: npts, sps_in
389 real(kind=realtype),
intent(inout) :: points(3, npts)
390 integer(kind=intType),
intent(in) :: nFamList, famList(nFamList)
391 logical,
intent(in) :: includeZipper
393 integer(kind=intType) :: mm, nn, i, j, ii, sps, iDim, jj, ierr
394 integer(kind=intType) :: iBeg, iEnd, jBeg, jEnd, iBCGroup
397 logical :: BCGroupNeeded
398 real(kind=realtype),
dimension(:),
pointer :: localptr
402 domains:
do nn = 1, ndom
420 points(:, ii) =
x(1, i, j, :)
422 points(:, ii) =
x(
il, i, j, :)
424 points(:, ii) =
x(i, 1, j, :)
426 points(:, ii) =
x(i,
jl, j, :)
428 points(:, ii) =
x(i, j, 1, :)
430 points(:, ii) =
x(i, j,
kl, :)
449 if (.not. zipper%allocated)
then
454 bcgroupneeded = .false.
455 bcgroupfamloop:
do i = 1,
size(
bcfamgroups(ibcgroup)%famList)
457 bcgroupneeded = .true.
460 end do bcgroupfamloop
462 if (.not. bcgroupneeded)
then
470 dimloop:
do idim = 1, 3
472 call vecgetarrayf90(exch%nodeValLocal, localptr, ierr)
473 call echk(ierr, __file__, __line__)
488 localptr(jj) =
xx(i + 1, j + 1, idim)
496 call vecrestorearrayf90(exch%nodeValLocal, localptr, ierr)
497 call echk(ierr, __file__, __line__)
500 call vecscatterbegin(zipper%scatter, exch%nodeValLocal, &
501 zipper%localVal, insert_values, scatter_forward, ierr)
502 call echk(ierr, __file__, __line__)
504 call vecscatterend(zipper%scatter, exch%nodeValLocal, &
505 zipper%localVal, insert_values, scatter_forward, ierr)
506 call echk(ierr, __file__, __line__)
509 call vecgetarrayf90(zipper%localVal, localptr, ierr)
510 call echk(ierr, __file__, __line__)
514 points(idim, ii + 1:ii +
size(localptr)) = localptr
517 call vecrestorearrayf90(zipper%localVal, localptr, ierr)
518 call echk(ierr, __file__, __line__)
523 ii = ii +
size(localptr)
528 subroutine mapvector(vec1, n1, famList1, nf1, vec2, n2, famList2, nf2, includeZipper, nDim)
544 integer(kind=intType) :: n1, n2, nf1, nf2, nDim
545 integer(kind=intType),
intent(in) :: famList1(nf1), famList2(nf2)
546 real(kind=realtype),
intent(in) :: vec1(ndim, n1)
547 real(kind=realtype),
intent(inout) :: vec2(ndim, n2)
548 logical,
intent(in) :: includeZipper
551 integer(kind=intType) :: i, k, ii, jj, nn, mm, iSize
552 integer(kind=intType) :: iBeg, iEnd, jBeg, jEnd, famID, iBCGroup
553 logical :: fam1Included, fam2Included
555 logical :: BCGroupNeeed
558 domains:
do nn = 1, ndom
562 bocos:
do mm = 1, flowdoms(nn, 1, 1)%nBocos
563 famid = flowdoms(nn, 1, 1)%BCdata(mm)%famID
565 fam1included =
faminlist(famid, famlist1)
566 fam2included =
faminlist(famid, famlist2)
568 jbeg = flowdoms(nn, 1, 1)%bcData(mm)%jnBeg
569 jend = flowdoms(nn, 1, 1)%bcData(mm)%jnEnd
571 ibeg = flowdoms(nn, 1, 1)%bcData(mm)%inBeg
572 iend = flowdoms(nn, 1, 1)%bcData(mm)%inEnd
573 isize = (iend - ibeg + 1) * (jend - jbeg + 1)
575 if (fam1included .and. fam2included)
then
578 vec2(:, k + jj) = vec1(:, k + ii)
583 if (fam1included)
then
587 if (fam2included)
then
611 fam1included = .false.
612 fam2included = .false.
613 bcgroupfamloop:
do i = 1,
size(
bcfamgroups(ibcgroup)%famList)
615 fam1included = .true.
618 fam2included = .true.
620 end do bcgroupfamloop
624 isize =
size(zipper%indices)
626 if (fam1included .and. fam2included)
then
629 if (k + ii <= n1)
then
630 vec2(:, k + jj) = vec1(:, k + ii)
636 if (fam1included)
then
640 if (fam2included)
then
657 integer(kind=intType),
intent(in) :: nFamtotal
658 integer(kind=intType),
dimension(nFamTotal),
intent(out) :: wallList
659 integer(kind=intType),
intent(out) :: nWallList
real(kind=realtype), dimension(:, :, :), pointer xx
integer(kind=inttype) nbkglobal
integer(kind=inttype), dimension(:), pointer bcfaceid
integer(kind=inttype) nbocos
real(kind=realtype), dimension(:, :, :, :), pointer x
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
integer(kind=inttype), parameter imin
integer(kind=inttype), parameter ibcgroupwalls
integer(kind=inttype), parameter kmax
integer(kind=inttype), parameter jmin
type(zippermesh), dimension(nfamexchange), target zippermeshes
logical function faminlist(famID, famList)
type(bcgrouptype), dimension(nfamexchange) bcfamgroups
type(familyexchange), dimension(:, :), allocatable, target bcfamexchange
subroutine mapvector(vec1, n1, famList1, nf1, vec2, n2, famList2, nf2, includeZipper, nDim)
subroutine getsurfacesize(sizeNode, sizeCell, famList, n, includeZipper)
subroutine getsurfacefamily(elemFam, ncell, famList, nFamList, includeZipper)
subroutine getsurfacepoints(points, npts, sps_in, famList, nFamList, includeZipper)
subroutine getwalllist(wallList, nWallList, nFamTotal)
subroutine getsurfaceconnectivity(conn, cgnsBlockID, ncell, famList, nFamList, includeZipper)
subroutine setbcpointers(nn, spatialPointers)
subroutine echk(errorcode, file, line)
subroutine setpointers(nn, mm, ll)