17 integer(kind=intType),
intent(in) :: ndof
18 integer(kind=intType),
intent(out) :: indices(ndof)
21 integer(kind=intType) :: nn, i, j, k, ii, indx, indy, indz, il_cg, jl_cg, kl_cg
22 integer(kind=intType),
allocatable,
dimension(:) :: dof_offset
27 dof_offset(nn) = dof_offset(nn - 1) + &
48 indices(ii * 3 - 2) = dof_offset(
nbkglobal) + &
49 (indz - 1) * jl_cg * il_cg * 3 + &
50 (indy - 1) * il_cg * 3 + &
53 indices(ii * 3 - 1) = dof_offset(
nbkglobal) + &
54 (indz - 1) * jl_cg * il_cg * 3 + &
55 (indy - 1) * il_cg * 3 + &
58 indices(ii * 3) = dof_offset(
nbkglobal) + &
59 (indz - 1) * jl_cg * il_cg * 3 + &
60 (indy - 1) * il_cg * 3 + &
67 deallocate (dof_offset)
87 integer(kind=intType),
intent(in) :: ndof
88 real(kind=realtype),
intent(in) :: grid(ndof)
92 integer(kind=intType) :: nn, i, j, k, counter, sps
94 real(kind=realtype) :: displ(3)
95 real(kind=realtype) :: told, tnew
97 real(kind=realtype),
dimension(3) :: rotationpoint, r
98 real(kind=realtype),
dimension(3, 3) :: rotationmatrix
111 t(nn) = (sps - 1) * dt(nn)
129 r = grid(3 * counter + 1:3 * counter + 3) - rotationpoint
131 x(i, j, k, :) = rotationpoint + matmul(rotationmatrix, r) + displ
132 counter = counter + 1
138 call xhalo(1_inttype)
148 x(i, j, k, :) = grid(3 * counter + 1:3 * counter + 3)
149 counter = counter + 1
154 call xhalo(1_inttype)
172 real(kind=realtype),
dimension(:),
intent(in) :: grid
173 integer,
intent(in) :: sps
177 integer(kind=intType) :: nn, i, j, k, counter
185 x(i, j, k, :) = grid(3 * counter + 1:3 * counter + 3)
186 counter = counter + 1
191 call xhalo(1_inttype)
206 integer(kind=intType),
intent(in) :: ndof
207 real(kind=realtype),
intent(out) :: grid(ndof)
210 integer(kind=intType) :: nn, i, j, k, l, counter, sps
221 grid(counter) =
x(i, j, k, l)
222 counter = counter + 1
236 use blockpointers,
only: ndom,
il,
jl,
kl,
nx,
ny,
nz,
x,
nbkglobal,
ibegor,
jbegor,
kbegor
245 integer(kind=intType),
intent(in) :: nRand, nRandState
246 real(kind=realtype),
intent(in),
dimension(nRand) :: randvec
249 real(kind=realtype),
intent(out),
dimension(nRandState) :: randstate
252 integer(kind=intType) :: i, j, k, ierr, l, nx_cg, ny_cg, nz_cg
253 integer(kind=intType) :: sps, ii, indx, indy, indz, nn, cgnsInd
254 integer(kind=intType) :: dofCGNSPerInstance
255 integer(kind=intType),
allocatable,
dimension(:) :: dof_offset
260 dof_offset(nn) = dof_offset(nn - 1) + &
283 cgnsind = (sps - 1) * dofcgnsperinstance + &
285 (indz - 1) * ny_cg * nx_cg *
nw + &
286 (indy - 1) * nx_cg *
nw + &
288 randstate(
nw * ii + l) = randvec(cgnsind)
310 #include <petsc/finclude/petsc.h>
315 integer(kind=intType),
intent(in) :: nRand, nRandSurface
316 real(kind=realtype),
intent(in),
dimension(nRand) :: xrand
317 integer(kind=intType),
intent(in) :: nFamList, famList(nFamList), sps
319 real(kind=realtype),
intent(inout),
dimension(3*nRandSurface) :: randsurface
322 integer(kind=intType) :: i, j, k, ierr, iDim, iBeg, iEnd, jBeg, jEnd, nn, mm
323 integer(kind=intType) :: ii, jj, indI, indJ, indK, jjInd, iBCGroup
326 logical :: BCGroupNeeded
327 real(kind=realtype),
dimension(:),
pointer :: localptr
331 domains:
do nn = 1, ndom
373 jjind = jj + (indk - 1) *
il *
jl + (indj - 1) *
il + (indi - 1) + idim
374 randsurface(3 * ii + idim) = xrand(jjind)
384 jj = jj +
il *
jl *
kl * 3
398 if (.not. zipper%allocated)
then
403 bcgroupneeded = .false.
404 bcgroupfamloop:
do i = 1,
size(
bcfamgroups(ibcgroup)%famList)
406 bcgroupneeded = .true.
409 end do bcgroupfamloop
411 if (.not. bcgroupneeded)
then
419 dimloop:
do idim = 1, 3
421 call vecgetarrayf90(exch%nodeValLocal, localptr, ierr)
422 call echk(ierr, __file__, __line__)
426 do j = 1,
size(localptr)
427 localptr(i) = randsurface(3 * (j - 1) + idim)
431 call vecrestorearrayf90(exch%nodeValLocal, localptr, ierr)
432 call echk(ierr, __file__, __line__)
435 call vecscatterbegin(zipper%scatter, exch%nodeValLocal, &
436 zipper%localVal, insert_values, scatter_forward, ierr)
437 call echk(ierr, __file__, __line__)
439 call vecscatterend(zipper%scatter, exch%nodeValLocal, &
440 zipper%localVal, insert_values, scatter_forward, ierr)
441 call echk(ierr, __file__, __line__)
444 call vecgetarrayf90(zipper%localVal, localptr, ierr)
445 call echk(ierr, __file__, __line__)
448 do j = 1,
size(localptr)
450 randsurface(3 * ii + 3 * (j - 1) + idim) = localptr(j)
456 ii = ii +
size(localptr)
integer(kind=inttype), dimension(maxlevels) ncellslocal
integer(kind=inttype) kbegor
integer(kind=inttype) nbkglobal
integer(kind=inttype), dimension(:), pointer bcfaceid
integer(kind=inttype) ibegor
integer(kind=inttype) nbocos
integer(kind=inttype) jbegor
real(kind=realtype), dimension(:, :, :, :), pointer x
type(cgnsblockinfotype), dimension(:), allocatable cgnsdoms
integer(kind=inttype) cgnsndom
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
integer(kind=inttype), parameter timespectral
integer(kind=inttype), parameter imin
integer(kind=inttype), parameter steady
integer(kind=inttype), parameter kmax
integer(kind=inttype), parameter jmin
real(kind=realtype) timeunsteady
real(kind=realtype) timeunsteadyrestart
type(zippermesh), dimension(nfamexchange), target zippermeshes
integer(kind=inttype) nsections
type(sectiontype), dimension(:), allocatable sections
logical function faminlist(famID, famList)
type(bcgrouptype), dimension(nfamexchange) bcfamgroups
type(familyexchange), dimension(:, :), allocatable, target bcfamexchange
subroutine rotmatrixrigidbody(tNew, tOld, rotationMatrix, rotationPoint)
subroutine echk(errorcode, file, line)
subroutine setpointers(nn, mm, ll)
subroutine getstateperturbation(randVec, nRand, randState, nRandState)
subroutine setgrid(grid, ndof)
subroutine getgrid(grid, ndof)
subroutine setgridforoneinstance(grid, sps)
subroutine getsurfaceperturbation(xRand, nRand, randSurface, nRandSurface, famList, nFamList, sps)
subroutine getcgnsmeshindices(ndof, indices)