ADflow  v1.0
ADflow is a finite volume RANS solver tailored for gradient-based aerodynamic design optimization.
oversetInitialization.F90
Go to the documentation of this file.
2 
3 contains
4 
5  subroutine initializestatus(level, sps)
6 
7  ! This subroutine initializes the status variable for use in the
8  ! overset process
9 
10  use constants
11  use blockpointers, only: ndom, il, jl, kl, ib, jb, kb, status
13  use utils, only: setpointers
14  implicit none
15 
16  ! Input params
17  integer(kind=intType), intent(in) :: level, sps
18 
19  ! Working parameters
20  integer(kind=intType) :: nn, i, j, k
21 
22  do nn = 1, ndom
23  call setpointers(nn, level, sps)
24 
25  ! Now loop over the owned cells and set the isCompute flag to
26  ! true.
27 
28  do k = 2, kl
29  do j = 2, jl
30  do i = 2, il
31  status(i, j, k) = 0
32  call setiscompute(status(i, j, k), .true.)
33 
34  ! Additional initialization for full overset update mode
35  call setiswalldonor(status(i, j, k), .false.)
36  call setisdonor(status(i, j, k), .false.)
37  call setisreceiver(status(i, j, k), .false.)
38 
39  end do
40  end do
41  end do
42  end do
43 
44  end subroutine initializestatus
45 
46  subroutine reinitializestatus(level, sps)
47 
48  ! This subroutine reinitializes the status variable. However, if
49  ! cell is a wallDonor, that information is kept.
50 
51  use constants
52  use blockpointers, only: ndom, il, jl, kl, ib, jb, kb, status
54  use utils, only: setpointers
55  implicit none
56 
57  ! Input params
58  integer(kind=intType), intent(in) :: level, sps
59 
60  ! Working parameters
61  integer(kind=intType) :: nn, i, j, k
62  logical :: wDonor
63  do nn = 1, ndom
64  call setpointers(nn, level, sps)
65 
66  ! Now loop over the owned cells and set the isCompute flag to
67  ! true.
68 
69  do k = 2, kl
70  do j = 2, jl
71  do i = 2, il
72  wdonor = iswalldonor(status(i, j, k))
73  status(i, j, k) = 0
74  call setiscompute(status(i, j, k), .true.)
75  call setiswalldonor(status(i, j, k), wdonor)
76  end do
77  end do
78  end do
79  end do
80  end subroutine reinitializestatus
81 
82  subroutine initializeoblock(oBlock, nn, level, sps)
83 
84  ! This routine allocates the data for the supplied oBlock using the
85  ! data currently in blockPointers
86  use constants
89  use blockpointers, only: x, globalcell, il, jl, kl, ib, jb, kb, &
91  use cgnsgrid, only: cgnsdoms
92  use adtbuild, only: buildserialhex
93  use communication, only: myid
95  use utils, only: mynorm2
97  implicit none
98 
99  ! Input Params
100  type(oversetblock), intent(inout) :: oBlock
101  integer(kind=intType) :: nn, level, sps, kk
102 
103  ! Working paramters
104  integer(kind=intType) :: i, j, k, mm, nADT, nHexa, planeOffset
105  integer(kind=intType) :: iStart, iEnd, jStart, jEnd, kStart, kEnd
106  real(kind=realtype) :: factor, frac, dist, xp(3), aspect(3), fact
107  integer(kind=intType) :: i_stencil, ii, jj, iii
108  logical :: wallsPresent
109  logical, allocatable, dimension(:, :, :) :: nearWallTmp
110 
111  ! Set all the sizes for this block.
112  oblock%il = il
113  oblock%jl = jl
114  oblock%kl = kl
115 
116  oblock%proc = myid
117  oblock%block = nn
118  oblock%cluster = clusters(cumdomproc(myid) + nn)
119  call wallsonblock(wallspresent)
120 
121  ! Do the reset of the allocs
122  allocate ( &
123  oblock%qualDonor(1, ie * je * ke), &
124  oblock%globalCell(0:ib, 0:jb, 0:kb), &
125  oblock%invalidDonor(1:ie, 1:je, 1:ke))
126 
127  ! Invalid Donor array is simply if the cell is a forced receiver
128  ! or not.
129  do k = 1, ke
130  do j = 1, je
131  do i = 1, ie
132  oblock%invalidDonor(i, j, k) = forcedrecv(i, j, k)
133  end do
134  end do
135  end do
136 
137  ! Compute the qualDonor depending on if we have a wall block or not.
138  mm = 0
139  do k = 1, ke
140  do j = 1, je
141  do i = 1, ie
142  mm = mm + 1
143  if (wallspresent) then
144 
145  ! Modify based on aspect ratio of the cell in the
146  ! k-direcion. High aspect ratioin BL
147  aspect = one
148  if (useoversetwallscaling) then
149  if (cgnsdoms(nbkglobal)%viscousDir(1)) &
150  aspect(1) = (half * (mynorm2(si(i - 1, j, k, :)) + &
151  mynorm2(si(i, j, k, :)))) / vol(i, j, k)
152  if (cgnsdoms(nbkglobal)%viscousDir(2)) &
153  aspect(2) = (half * (mynorm2(sj(i, j - 1, k, :)) + &
154  mynorm2(sj(i, j, k, :)))) / vol(i, j, k)
155  if (cgnsdoms(nbkglobal)%viscousDir(3)) &
156  aspect(3) = (half * (mynorm2(sk(i, j, k - 1, :)) + &
157  mynorm2(sk(i, j, k, :)))) / vol(i, j, k)
158  end if
159  fact = min(aspect(1) * aspect(2) * aspect(3), 100.0_realtype)
160 
161  oblock%qualDonor(1, mm) = (vol(i, j, k)**third) / fact
162  else
163  oblock%qualDonor(1, mm) = (backgroundvolscale * vol(i, j, k))**third
164  end if
165 
166  ! Account for explicit scaling of quality
167  oblock%qualDonor(1, mm) = oblock%qualDonor(1, mm) * cgnsdoms(nbkglobal)%priority
168  end do
169  end do
170  end do
171 
172  !Copy over global cell
173  oblock%globalCell = globalcell
174 
175  ! Now setup the data for the ADT
176  nhexa = il * jl * kl
177  nadt = ie * je * ke
178 
179  allocate (oblock%xADT(3, nadt), oblock%hexaConn(8, nhexa))
180  ! Fill up the xADT using cell centers (dual mesh)
181  mm = 0
182 
183  ! Allocate the nearWall
184  allocate (oblock%nearWall(1:il, 1:jl, 1:kl))
185  oblock%nearWall = 0
186 
187  allocate (nearwalltmp(1:ie, 1:je, 1:ke))
188  nearwalltmp = .false.
189 
190  do k = 1, ke
191  do j = 1, je
192  do i = 1, ie
193  mm = mm + 1
194  xp = eighth * ( &
195  x(i - 1, j - 1, k - 1, :) + &
196  x(i, j - 1, k - 1, :) + &
197  x(i - 1, j, k - 1, :) + &
198  x(i, j, k - 1, :) + &
199  x(i - 1, j - 1, k, :) + &
200  x(i, j - 1, k, :) + &
201  x(i - 1, j, k, :) + &
202  x(i, j, k, :))
203  oblock%xADT(:, mm) = xp
204 
205  ! Determine if this point is near wall. Note that the
206  ! boundary halos sill have xSeed as "large" so these won't
207  ! be flagged as nearWall. We will account for this below.
208  dist = mynorm2(xp - xseed(i, j, k, :))
209  if (dist < nearwalldist) then
210  nearwalltmp(i, j, k) = .true.
211  end if
212  end do
213  end do
214  end do
215 
216  ! Now finally set the nearwall for the dual mesh cells. It is
217  ! considered a near wall if all "nodes" of the dual mesh cell are
218  ! also near wall. Have to be carful not to count boundary halos
219  ! since they do not have nearWallTmp Values.
220 
221  do k = 1, kl
222  do j = 1, jl
223  do i = 1, il
224  if ( &
225  (nearwalltmp(i, j, k) .or. globalcell(i, j, k) < 0) .and. &
226  (nearwalltmp(i + 1, j, k) .or. globalcell(i + 1, j, k) < 0) .and. &
227  (nearwalltmp(i, j + 1, k) .or. globalcell(i, j + 1, k) < 0) .and. &
228  (nearwalltmp(i + 1, j + 1, k) .or. globalcell(i + 1, j + 1, k) < 0) .and. &
229  (nearwalltmp(i, j, k + 1) .or. globalcell(i, j, k + 1) < 0) .and. &
230  (nearwalltmp(i + 1, j, k + 1) .or. globalcell(i + 1, j, k + 1) < 0) .and. &
231  (nearwalltmp(i, j + 1, k + 1) .or. globalcell(i, j + 1, k + 1) < 0) .and. &
232  (nearwalltmp(i + 1, j + 1, k + 1) .or. globalcell(i + 1, j + 1, k + 1) < 0)) then
233  oblock%nearWall(i, j, k) = 1
234  end if
235  end do
236  end do
237  end do
238 
239  deallocate (nearwalltmp)
240  mm = 0
241  ! These are the 'elements' of the dual mesh.
242  planeoffset = ie * je
243  do k = 2, ke
244  do j = 2, je
245  do i = 2, ie
246  mm = mm + 1
247  oblock%hexaConn(1, mm) = (k - 2) * planeoffset + (j - 2) * ie + (i - 2) + 1
248  oblock%hexaConn(2, mm) = oblock%hexaConn(1, mm) + 1
249  oblock%hexaConn(3, mm) = oblock%hexaConn(2, mm) + ie
250  oblock%hexaConn(4, mm) = oblock%hexaConn(3, mm) - 1
251 
252  oblock%hexaConn(5, mm) = oblock%hexaConn(1, mm) + planeoffset
253  oblock%hexaConn(6, mm) = oblock%hexaConn(2, mm) + planeoffset
254  oblock%hexaConn(7, mm) = oblock%hexaConn(3, mm) + planeoffset
255  oblock%hexaConn(8, mm) = oblock%hexaConn(4, mm) + planeoffset
256  end do
257  end do
258  end do
259 
260  ! Call the custom build routine -- Serial only, only Hexa volumes,
261  ! we supply our own ADT Type
262 
263  call buildserialhex(nhexa, nadt, oblock%xADT, oblock%hexaConn, oblock%ADT)
264 
265  ! Flag this block as being allocated
266  oblock%allocated = .true.
267 
268  end subroutine initializeoblock
269 
270  subroutine initializeofringes(oFringe, nn, famList)
271 
272  ! This subroutine initializes the fringe information for the given
273  ! block, level and spectral instance. It is assumed that
274  ! blockPointers are already set.
275  use constants
276  use communication, only: myid
277  use blockpointers
281  use sorting, only: faminlist
283  implicit none
284 
285  ! Input Params
286  type(oversetfringe), intent(inout) :: oFringe
287  integer(kind=intType), intent(in) :: nn
288  integer(kind=intType), intent(in), dimension(:) :: famList
289  ! Working Params
290  integer(kind=intTYpe) :: i, j, k, mm, iDim, ii, jj, kk, iii, jjj, myI, myJ, myK
291  integer(kind=intTYpe) :: iStart, iEnd, jStart, jEnd, kStart, kEnd
292  logical :: wallsPresent
293  integer(kind=intType) :: i_stencil
294  real(kind=realtype) :: dist, frac, xp(3)
295  ! Check if we have walls:
296  call wallsonblock(wallspresent)
297 
298  ! Set the sizes for the oFringe and allocate the required space.
299  ofringe%il = il
300  ofringe%jl = jl
301  ofringe%kl = kl
302  ofringe%nx = nx
303  ofringe%ny = ny
304  ofringe%nz = nz
305  ofringe%block = nn
306  ofringe%cluster = clusters(cumdomproc(myid) + nn)
307  ofringe%proc = myid
308 
309  mm = nx * ny * nz
310  allocate (ofringe%x(3, mm))
311  allocate (ofringe%xSeed(3, mm))
312  allocate (ofringe%wallInd(mm))
313  allocate (ofringe%isWall(mm))
314  ofringe%isWall = 0
315  ofringe%xSeed = large
316  ofringe%wallInd = 0
317 
318  ! Assume each cell will get just one donor. It's just a guess, it
319  ! will be expanded if necessary so the exact value doesn't matter.
320  allocate (ofringe%fringeIntBuffer(5, mm), ofringe%fringeRealBuffer(4, mm))
321 
322  ofringe%nDonor = 0
323  ! Now loop over the actual compute cells, setting the cell center
324  ! value 'x', the volume and flag these cells as compute
325  ii = 0
326  do k = 2, kl
327  do j = 2, jl
328  do i = 2, il
329  ii = ii + 1
330  do idim = 1, 3
331  ofringe%x(idim, ii) = eighth * ( &
332  x(i - 1, j - 1, k - 1, idim) + &
333  x(i, j - 1, k - 1, idim) + &
334  x(i - 1, j, k - 1, idim) + &
335  x(i, j, k - 1, idim) + &
336  x(i - 1, j - 1, k, idim) + &
337  x(i, j - 1, k, idim) + &
338  x(i - 1, j, k, idim) + &
339  x(i, j, k, idim))
340  end do
341  ofringe%xSeed(:, ii) = xseed(i, j, k, :)
342  ofringe%wallInd(ii) = wallind(i, j, k)
343  ofringe%fringeIntBuffer(4, ii) = nn
344  ofringe%fringeIntBuffer(5, ii) = windindex(i, j, k, il, jl, kl)
345 
346  end do
347  end do
348  end do
349 
350  ! We also need to flag a single layer of cells next a wall
351  ! boundary condition as being "isWall". This information is
352  ! necessary to be able to determine the "wall donors" which are
353  ! the flood seeds.
354 
355  do mm = 1, nbocos
356  select case (bcfaceid(mm))
357  case (imin)
358  istart = 2; iend = 2;
359  jstart = bcdata(mm)%inBeg + 1; jend = bcdata(mm)%inEnd
360  kstart = bcdata(mm)%jnBeg + 1; kend = bcdata(mm)%jnEnd
361  case (imax)
362  istart = il; iend = il;
363  jstart = bcdata(mm)%inBeg + 1; jend = bcdata(mm)%inEnd
364  kstart = bcdata(mm)%jnBeg + 1; kend = bcdata(mm)%jnEnd
365  case (jmin)
366  istart = bcdata(mm)%inBeg + 1; iend = bcdata(mm)%inEnd
367  jstart = 2; jend = 2;
368  kstart = bcdata(mm)%jnBeg + 1; kend = bcdata(mm)%jnEnd
369  case (jmax)
370  istart = bcdata(mm)%inBeg + 1; iend = bcdata(mm)%inEnd
371  jstart = jl; jend = jl;
372  kstart = bcdata(mm)%jnBeg + 1; kend = bcdata(mm)%jnEnd
373  case (kmin)
374  istart = bcdata(mm)%inBeg + 1; iend = bcdata(mm)%inEnd
375  jstart = bcdata(mm)%jnBeg + 1; jend = bcdata(mm)%jnEnd
376  kstart = 2; kend = 2;
377  case (kmax)
378  istart = bcdata(mm)%inBeg + 1; iend = bcdata(mm)%inEnd
379  jstart = bcdata(mm)%jnBeg + 1; jend = bcdata(mm)%jnEnd
380  kstart = kl; kend = kl;
381  end select
382 
383  faminclude: if (faminlist(bcdata(mm)%famID, famlist)) then
384  do k = kstart, kend
385  do j = jstart, jend
386  do i = istart, iend
387  ! Recompute the index
388  ii = (k - 2) * nx * ny + (j - 2) * nx + (i - 2) + 1
389  ofringe%isWall(ii) = bcfaceid(mm)
390  end do
391  end do
392  end do
393  end if faminclude
394  end do ! BocoLoop
395 
396  ! Flag this set of fringes as being allocated
397  ofringe%allocated = .true.
398  end subroutine initializeofringes
399 
400  subroutine initializeosurf(famList, oSurf, dualMesh, cluster)
401 
402  ! This routine builds the ADT tree for any wall surfaces for the
403  ! block currently being pointed to by block Pointers.
404  use constants
405  use oversetdata, only: oversetwall
406  use blockpointers, only: nbocos, bcdata, bcfaceid, il, jl, kl, &
408  use adtbuild, only: buildserialquad
409  use kdtree2_module, onlY: kdtree2_create
411  use sorting, only: faminlist
412  implicit none
413 
414  ! Input Params
415  integer(kind=intType), intent(in), dimension(:) :: famList
416  type(oversetwall), intent(inout) :: oSurf
417  logical, intent(in) :: dualMesh
418  integer(kind=intType), intent(in) :: cluster
419 
420  ! Working paramters
421  integer(kind=intType) :: i, j, k, n, ii, jj, jjj, mm, ni, nj, nodeCount
422  integer(kind=intType) :: iBeg, iEnd, jBeg, jEnd, nNodes, maxCells, nCells, iNode
423  logical :: regularOrdering
424 
425  ! Set all the sizes for this block.
426  osurf%il = il
427  osurf%jl = jl
428  osurf%kl = kl
429 
430  call getwallsize(famlist, nnodes, maxcells, dualmesh)
431 
432  osurf%nNodes = nnodes
433  osurf%maxCells = maxcells
434  osurf%cluster = cluster
435  ! Allocate space for the x array and connectivity array. cellPtr is
436  ! larger than necessary.
437  allocate (osurf%x(3, nnodes), osurf%conn(4, maxcells), &
438  osurf%cellPtr(maxcells), osurf%iBlank(maxcells), &
439  osurf%delta(nnodes), osurf%nte(4, nnodes))
440 
441  ii = 0 ! Cumulative node counter
442  jj = 0 ! Cumulative cell counter (with iblanks)
443  jjj = 0 !Cumulative cell counter (without iblanks)
444  nodecount = 0
445 
446  do mm = 1, nbocos
447  faminclude: if (faminlist(bcdata(mm)%famID, famlist)) then
448 
449  select case (bcfaceid(mm))
450  case (imin, jmax, kmin)
451  regularordering = .true.
452  case default
453  regularordering = .false.
454  end select
455 
456  ! Now this can be reversed *again* if we have a block that
457  ! is left handed.
458  if (.not. righthanded) then
459  regularordering = .not. (regularordering)
460  end if
461 
462  ! THIS IS SUPER IMPORTANT: It is absolutely critical that the
463  ! wall be built *FROM THE DUAL MESH!!* IT WILL NOT WORK IF YOU
464  ! USE THE PRIMAL MESH! The -1 for the node ranges below gives
465  ! the extra '1' node for the mesh formed from the dual cells.
466 
467  dualcheck: if (dualmesh) then
468  jbeg = bcdata(mm)%jnBeg - 1; jend = bcdata(mm)%jnEnd
469  ibeg = bcdata(mm)%inBeg - 1; iend = bcdata(mm)%inEnd
470  ! Now fill up the point array
471  do j = jbeg, jend
472  do i = ibeg, iend
473  ii = ii + 1
474  select case (bcfaceid(mm))
475  case (imin)
476  osurf%x(:, ii) = fourth * (x(1, i, j, :) + x(1, i + 1, j, :) + &
477  x(1, i, j + 1, :) + x(1, i + 1, j + 1, :))
478  case (imax)
479  osurf%x(:, ii) = fourth * (x(il, i, j, :) + x(il, i + 1, j, :) + &
480  x(il, i, j + 1, :) + x(il, i + 1, j + 1, :))
481  case (jmin)
482  osurf%x(:, ii) = fourth * (x(i, 1, j, :) + x(i + 1, 1, j, :) + &
483  x(i, 1, j + 1, :) + x(i + 1, 1, j + 1, :))
484  case (jmax)
485  osurf%x(:, ii) = fourth * (x(i, jl, j, :) + x(i + 1, jl, j, :) + &
486  x(i, jl, j + 1, :) + x(i + 1, jl, j + 1, :))
487  case (kmin)
488  osurf%x(:, ii) = fourth * (x(i, j, 1, :) + x(i + 1, j, 1, :) + &
489  x(i, j + 1, 1, :) + x(i + 1, j + 1, 1, :))
490  case (kmax)
491  osurf%x(:, ii) = fourth * (x(i, j, kl, :) + x(i + 1, j, kl, :) + &
492  x(i, j + 1, kl, :) + x(i + 1, j + 1, kl, :))
493  end select
494  end do
495  end do
496 
497  ! Fill up the conn array. Note that don't take the
498  ! surface`normal direction (in or out) or the cell
499  ! handed-ness into account...it is not necessary since we
500  ! are just getting distance to the wall, which is
501  ! independent of the orientation.
502 
503  ni = iend - ibeg + 1
504  nj = jend - jbeg + 1
505  do j = 0, nj - 2
506  do i = 0, ni - 2
507  jj = jj + 1
508  if (regularordering) then
509  osurf%conn(1, jj) = nodecount + (j) * ni + i + 1 ! n1
510  osurf%conn(2, jj) = nodecount + (j) * ni + i + 2 ! n2
511  osurf%conn(3, jj) = nodecount + (j + 1) * ni + i + 2 ! n3
512  osurf%conn(4, jj) = nodecount + (j + 1) * ni + i + 1 ! n4
513  else
514  osurf%conn(1, jj) = nodecount + (j) * ni + i + 1 ! n1
515  osurf%conn(2, jj) = nodecount + (j + 1) * ni + i + 1 ! n4
516  osurf%conn(3, jj) = nodecount + (j + 1) * ni + i + 2 ! n3
517  osurf%conn(4, jj) = nodecount + (j) * ni + i + 2 ! n2
518  end if
519  end do
520  end do
521  nodecount = nodecount + ni * nj
522 
523  ! We don't care about iBlank, cellPtr or delta for the dual
524  ! mesh
525  osurf%iBlank = 1
526  osurf%cellPtr = 0
527  osurf%delta = zero
528  else ! Using the primal mesh
529  jbeg = bcdata(mm)%jnBeg; jend = bcdata(mm)%jnEnd
530  ibeg = bcdata(mm)%inBeg; iend = bcdata(mm)%inEnd
531 
532  ! Now fill up the point array. Owned node loop.
533  do j = jbeg, jend
534  do i = ibeg, iend
535  ii = ii + 1
536  select case (bcfaceid(mm))
537  case (imin)
538  osurf%x(:, ii) = x(1, i, j, :)
539  case (imax)
540  osurf%x(:, ii) = x(il, i, j, :)
541  case (jmin)
542  osurf%x(:, ii) = x(i, 1, j, :)
543  case (jmax)
544  osurf%x(:, ii) = x(i, jl, j, :)
545  case (kmin)
546  osurf%x(:, ii) = x(i, j, 1, :)
547  case (kmax)
548  osurf%x(:, ii) = x(i, j, kl, :)
549  end select
550  osurf%delta(ii) = bcdata(mm)%deltaNode(i, j)
551  end do
552  end do
553 
554  ! Fill up the conn array being careful to *only* adding
555  ! cells that are not already blanked.
556  ni = iend - ibeg + 1
557  nj = jend - jbeg + 1
558  do j = 0, nj - 2
559  do i = 0, ni - 2
560  jjj = jjj + 1
561  osurf%iBlank(jjj) = bcdata(mm)%iblank(ibeg + i + 1, jbeg + j + 1)
562  if (osurf%iBlank(jjj) == 1) then
563  jj = jj + 1
564  if (regularordering) then
565  osurf%conn(1, jj) = nodecount + (j) * ni + i + 1 ! n1
566  osurf%conn(2, jj) = nodecount + (j) * ni + i + 2 ! n2
567  osurf%conn(3, jj) = nodecount + (j + 1) * ni + i + 2 ! n3
568  osurf%conn(4, jj) = nodecount + (j + 1) * ni + i + 1 ! n4
569  else
570  osurf%conn(1, jj) = nodecount + (j) * ni + i + 1 ! n1
571  osurf%conn(2, jj) = nodecount + (j + 1) * ni + i + 1 ! n4
572  osurf%conn(3, jj) = nodecount + (j + 1) * ni + i + 2 ! n3
573  osurf%conn(4, jj) = nodecount + (j) * ni + i + 2 ! n2
574  end if
575  osurf%cellPtr(jj) = jjj
576  end if
577  end do
578  end do
579  nodecount = nodecount + ni * nj
580  end if dualcheck
581  end if faminclude
582  end do
583 
584  ! Set the actual number of cells
585  osurf%nCells = jj
586 
587  ! Build the tree itself.
588  call buildserialquad(osurf%nCells, nnodes, osurf%x, osurf%conn, osurf%ADT)
589 
590  ! Build the KDTree
591  if (osurf%nNodes > 0) then
592  osurf%tree => kdtree2_create(osurf%x)
593  end if
594 
595  ! Build the inverse of the connectivity, the nodeToElem array.
596  osurf%nte = 0
597  do i = 1, osurf%nCells
598  do j = 1, 4
599  n = osurf%conn(j, i)
600  inner: do k = 1, 4
601  if (osurf%nte(k, n) == 0) then
602  osurf%nte(k, n) = i
603  exit inner
604  end if
605  end do inner
606  end do
607  end do
608 
609  ! Flag this wall as being allocated
610  osurf%allocated = .true.
611 
612  end subroutine initializeosurf
613 
614 end module oversetinitialization
subroutine buildserialhex(nHexa, nNodes, coor, hexaConn, ADT)
Definition: adtBuild.F90:1141
subroutine buildserialquad(nQuad, nNodes, coor, quadsConn, ADT)
Definition: adtBuild.F90:1278
Definition: BCData.F90:1
integer(kind=inttype) jl
logical righthanded
integer(kind=inttype) nx
integer(kind=inttype) ny
integer(kind=inttype) ie
integer(kind=inttype) nbklocal
integer(kind=inttype), dimension(:, :, :), pointer iblank
integer(kind=inttype), dimension(:, :, :), pointer globalcell
integer(kind=inttype) nbkglobal
integer(kind=inttype) jb
integer(kind=inttype) kb
integer(kind=inttype), dimension(:), pointer bcfaceid
real(kind=realtype), dimension(:, :, :, :), pointer si
integer(kind=inttype) nbocos
integer(kind=inttype), dimension(:, :, :), pointer status
real(kind=realtype), dimension(:, :, :, :), pointer sj
integer(kind=inttype), dimension(:), pointer bctype
real(kind=realtype), dimension(:, :, :, :), pointer sk
real(kind=realtype), dimension(:, :, :), pointer vol
integer(kind=inttype) ib
integer(kind=inttype) nz
integer(kind=inttype), dimension(:, :, :), pointer forcedrecv
integer(kind=inttype), dimension(:, :, :), pointer wallind
integer(kind=inttype) je
integer(kind=inttype) ke
real(kind=realtype), dimension(:, :, :, :), pointer x
real(kind=realtype), dimension(:, :, :, :), pointer xseed
integer(kind=inttype) kl
integer(kind=inttype) il
type(cgnsblockinfotype), dimension(:), allocatable cgnsdoms
Definition: cgnsGrid.F90:495
real(kind=realtype), parameter zero
Definition: constants.F90:71
integer(kind=inttype), parameter imax
Definition: constants.F90:293
integer(kind=inttype), parameter kmin
Definition: constants.F90:296
real(kind=realtype), parameter third
Definition: constants.F90:81
integer(kind=inttype), parameter jmax
Definition: constants.F90:295
real(kind=realtype), parameter eighth
Definition: constants.F90:84
real(kind=realtype), parameter one
Definition: constants.F90:72
real(kind=realtype), parameter half
Definition: constants.F90:80
integer(kind=inttype), parameter imin
Definition: constants.F90:292
real(kind=realtype), parameter fourth
Definition: constants.F90:82
real(kind=realtype), parameter large
Definition: constants.F90:24
integer(kind=inttype), parameter kmax
Definition: constants.F90:297
integer(kind=inttype), parameter jmin
Definition: constants.F90:294
real(kind=realtype) nearwalldist
Definition: inputParam.F90:883
real(kind=realtype) backgroundvolscale
Definition: inputParam.F90:885
logical useoversetwallscaling
Definition: inputParam.F90:893
type(kdtree2) function, pointer, public kdtree2_create(input_data, dim, sort, rearrange)
Definition: kd_tree.f90:588
integer(kind=inttype), dimension(:), allocatable cumdomproc
Definition: overset.F90:364
integer(kind=inttype), dimension(:), allocatable clusters
Definition: overset.F90:367
subroutine initializeosurf(famList, oSurf, dualMesh, cluster)
subroutine reinitializestatus(level, sps)
subroutine initializeofringes(oFringe, nn, famList)
subroutine initializeoblock(oBlock, nn, level, sps)
subroutine initializestatus(level, sps)
subroutine getwallsize(famList, nNodes, nCells, dualMesh)
subroutine wallsonblock(wallsPresent)
subroutine setisdonor(i, flag)
subroutine unwindindex(index, il, jl, kl, i, j, k)
logical function iswalldonor(i)
subroutine setiswalldonor(i, flag)
integer(kind=inttype) function windindex(i, j, k, il, jl, kl)
subroutine setiscompute(i, flag)
subroutine setisreceiver(i, flag)
logical function faminlist(famID, famList)
Definition: sorting.F90:7
integer(kind=inttype), parameter n_visc_drdw
Definition: stencils.f90:19
integer(kind=inttype), dimension(33, 3), target visc_drdw_stencil
Definition: stencils.f90:22
Definition: utils.F90:1
real(kind=realtype) function mynorm2(x)
Definition: utils.F90:1697
subroutine setpointers(nn, mm, ll)
Definition: utils.F90:3237