Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLO_ModGridControlMap.F90
Go to the documentation of this file.
1 ! *********************************************************************
2 ! * Rocstar Simulation Suite *
3 ! * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4 ! * *
5 ! * Illinois Rocstar LLC *
6 ! * Champaign, IL *
7 ! * www.illinoisrocstar.com *
8 ! * sales@illinoisrocstar.com *
9 ! * *
10 ! * License: See LICENSE file in top level of distribution package or *
11 ! * http://opensource.org/licenses/NCSA *
12 ! *********************************************************************
13 ! *********************************************************************
14 ! * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15 ! * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16 ! * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17 ! * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18 ! * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19 ! * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20 ! * Arising FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21 ! * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22 ! *********************************************************************
23 ! ******************************************************************************
24 !
25 ! Purpose: Suite for routines computing gradients of grid control map and
26 ! grid control functions.
27 !
28 ! Description: None.
29 !
30 ! ******************************************************************************
31 !
32 ! $Id: RFLO_ModGridControlMap.F90,v 1.9 2008/12/06 08:44:16 mtcampbe Exp $
33 !
34 ! Copyright: (c) 2004 by the University of Illinois
35 !
36 ! ******************************************************************************
37 
39 
40  USE modglobal, ONLY : t_global
41  USE moddatastruct, ONLY: t_region
42  USE modgrid, ONLY : t_grid
43  USE modbndpatch, ONLY : t_patch
44  USE modparameters
45  USE moddatatypes
46  USE moderror
47  USE modmpi
48 
49  IMPLICIT NONE
50 
51  PRIVATE
52  PUBLIC :: rflo_gridcontrolgrad3d, &
60 
61 ! private :
62 
63 ! ******************************************************************************
64 ! Declarations and definitions
65 ! ******************************************************************************
66 
67  CHARACTER(CHRLEN) :: RCSIdentString = &
68  '$RCSfile: RFLO_ModGridControlMap.F90,v $ $Revision: 1.9 $'
69 
70 ! ******************************************************************************
71 ! Routines
72 ! ******************************************************************************
73 
74  CONTAINS
75 
76 !******************************************************************************
77 !
78 ! Purpose: compute gradient of grid control map w.r.t computational space grid.
79 !
80 ! Description: the method used is second order finite difference.
81 !
82 ! Input: region = grid data of current region
83 !
84 ! Output: stui,stuj,stuk = 1st order derivatives
85 ! stuii,stujj,stukk = 2nd order derivatives
86 ! stuij,stuik,stujk = mixed derivatives
87 !
88 ! Notes: none.
89 !
90 !******************************************************************************
91 
92 SUBROUTINE rflo_gridcontrolgrad3d( region )
93 
95 
98 
99  IMPLICIT NONE
100 
101 ! ... parameters
102  TYPE(t_region) :: region
103 
104 ! ... local variables
105  INTEGER :: ilev,idnbeg,idnend,jdnbeg,jdnend,kdnbeg,kdnend,inoff,ijnoff,ndum
106  REAL(RFREAL), POINTER :: stu(:,:), stui(:,:), stuj(:,:), stuk(:,:)
107 
108  TYPE(t_global), POINTER :: global
109 
110 !******************************************************************************
111 
112  global => region%global
113 
114  CALL registerfunction( global,'RFLO_GridControlGrad3D',&
115  'RFLO_ModGridControlMap.F90' )
116 
117 ! get dimensions, allocate temporary storage ----------------------------------
118 
119  ilev = 1
120  CALL rflo_getdimensdummynodes( region,ilev,idnbeg,idnend, &
121  jdnbeg,jdnend,kdnbeg,kdnend )
122  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
123 
124  ndum = region%nDumCells
125 
126 ! get pointers ----------------------------------------------------------------
127 
128  stu => region%levels(1)%grid%stu
129  stui => region%levels(1)%grid%stui
130  stuj => region%levels(1)%grid%stuj
131  stuk => region%levels(1)%grid%stuk
132 
133 ! stui ------------------------------------------------------------------------
134 
135  CALL rflo_findiffcompi( idnbeg,idnend,jdnbeg,jdnend,kdnbeg,kdnend,ndum, &
136  inoff,ijnoff,xcoord,zcoord,stu,stui )
137 
138 ! stuj ------------------------------------------------------------------------
139 
140  CALL rflo_findiffcompj( idnbeg,idnend,jdnbeg,jdnend,kdnbeg,kdnend,ndum, &
141  inoff,ijnoff,xcoord,zcoord,stu,stuj )
142 
143 ! stuk ------------------------------------------------------------------------
144 
145  CALL rflo_findiffcompk( idnbeg,idnend,jdnbeg,jdnend,kdnbeg,kdnend,ndum, &
146  inoff,ijnoff,xcoord,zcoord,stu,stuk )
147 
148 ! finalize --------------------------------------------------------------------
149 
150  CALL deregisterfunction( region%global )
151 
152 END SUBROUTINE rflo_gridcontrolgrad3d
153 
154 
155 !******************************************************************************
156 !
157 ! Purpose: compute gradient of physical space grid w.r.t computational space
158 ! grid.
159 !
160 ! Description: the method used is second order finite difference.
161 !
162 ! Input: region = grid data of current region
163 !
164 ! Output: stui,stuj,stuk = 1st order derivatives
165 ! stuii,stujj,stukk = 2nd order derivatives
166 ! stuij,stuik,stujk = mixed derivatives
167 !
168 ! Notes: none.
169 !
170 !******************************************************************************
171 
172 SUBROUTINE rflo_gridphysgrad3d( region )
173 
175 
178 
179  IMPLICIT NONE
180 
181 #include "Indexing.h"
182 
183 ! ... parameters
184  TYPE(t_region) :: region
185 
186 ! ... local variables
187  INTEGER :: ilev,idnbeg,idnend,jdnbeg,jdnend,kdnbeg,kdnend,inoff,ijnoff,ndum
188  REAL(RFREAL), POINTER :: xyz(:,:), stui(:,:), stuj(:,:), stuk(:,:)
189 
190  TYPE(t_global), POINTER :: global
191 
192 !******************************************************************************
193 
194  global => region%global
195 
196  CALL registerfunction( global,'RFLO_GridPhysGrad3D',&
197  'RFLO_ModGridControlMap.F90' )
198 
199 ! get dimensions, allocate temporary storage ----------------------------------
200 
201  ilev = 1
202  CALL rflo_getdimensdummynodes( region,ilev,idnbeg,idnend, &
203  jdnbeg,jdnend,kdnbeg,kdnend )
204  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
205 
206  ndum = region%nDumCells
207 
208 ! get pointers ----------------------------------------------------------------
209 
210  xyz => region%levels(1)%gridOld%xyz
211  stui => region%levels(1)%grid%stui
212  stuj => region%levels(1)%grid%stuj
213  stuk => region%levels(1)%grid%stuk
214 
215  stui = 0._rfreal
216  stuj = 0._rfreal
217  stuk = 0._rfreal
218 
219 ! stui ------------------------------------------------------------------------
220 
221  CALL rflo_findiffcompi( idnbeg,idnend,jdnbeg,jdnend,kdnbeg,kdnend,ndum, &
222  inoff,ijnoff,xcoord,zcoord,xyz,stui )
223 
224 ! stuj ------------------------------------------------------------------------
225 
226  CALL rflo_findiffcompj( idnbeg,idnend,jdnbeg,jdnend,kdnbeg,kdnend,ndum, &
227  inoff,ijnoff,xcoord,zcoord,xyz,stuj )
228 
229 ! stuk ------------------------------------------------------------------------
230 
231  CALL rflo_findiffcompk( idnbeg,idnend,jdnbeg,jdnend,kdnbeg,kdnend,ndum, &
232  inoff,ijnoff,xcoord,zcoord,xyz,stuk )
233 
234 ! finalize --------------------------------------------------------------------
235 
236  CALL deregisterfunction( region%global )
237 
238 END SUBROUTINE rflo_gridphysgrad3d
239 
240 
241 !******************************************************************************
242 !
243 ! Purpose: compute grid control function.
244 !
245 ! Description: Equation 4.65 in Handbook of Grid Generation, by
246 ! Joe F. Thompson, Bharat K. Soni, and Nigel P. Weatherill,
247 ! CRC Press 1999, ISBN 0-8493-2687-7.
248 !
249 ! Input: region = grid data of current region
250 !
251 ! Output: region%levels(1)%grid%pmat = Pmatrix of grid control function
252 !
253 ! Notes: none.
254 !
255 !******************************************************************************
256 
257 SUBROUTINE rflo_gridcontrolfunc3d( region )
258 
260 
264 
265  IMPLICIT NONE
266 
267 #include "Indexing.h"
268 
269 ! ... parameters
270  TYPE(t_region) :: region
271 
272 ! ... loop variables
273  INTEGER :: i, j, k
274 
275 ! ... local variables
276  INTEGER :: ilev, ijkn, xco, yco, zco, ibn, ien, errfl
277  INTEGER :: idnbeg,idnend, jdnbeg,jdnend, kdnbeg,kdnend, inoff,ijnoff, ndum
278  REAL(RFREAL) :: determ, rndet, a11, a12, a13, a21, a22, a23, a31, a32, a33
279  REAL(RFREAL), POINTER :: stu(:,:), stui(:,:), stuj(:,:), stuk(:,:)
280  REAL(RFREAL), POINTER :: stuii(:,:), stujj(:,:), stukk(:,:)
281  REAL(RFREAL), POINTER :: stuij(:,:), stuik(:,:), stujk(:,:), pmat(:,:,:)
282 
283  TYPE(t_global), POINTER :: global
284  TYPE(t_grid) , POINTER :: grid
285 
286 !******************************************************************************
287 
288  global => region%global
289 
290  CALL registerfunction( global,'RFLO_GridControlFunc3D',&
291  'RFLO_ModGridControlMap.F90' )
292 
293 ! get dimensions, allocate temporary storage ----------------------------------
294 
295  xco = xcoord
296  yco = ycoord
297  zco = zcoord
298 
299  ilev = 1
300  CALL rflo_getdimensdummynodes( region,ilev,idnbeg,idnend, &
301  jdnbeg,jdnend,kdnbeg,kdnend )
302  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
303 
304  ibn = indijk(idnbeg,jdnbeg,kdnbeg,inoff,ijnoff)
305  ien = indijk(idnend,jdnend,kdnend,inoff,ijnoff)
306 
307  ndum = region%nDumCells
308 
309 ! allocate memory -------------------------------------------------------------
310 
311  grid => region%levels(ilev)%grid
312 
313  ALLOCATE( grid%stuii( 3,ibn:ien),stat=errfl ); IF (errfl>0) goto 88
314  ALLOCATE( grid%stujj( 3,ibn:ien),stat=errfl ); IF (errfl>0) goto 88
315  ALLOCATE( grid%stukk( 3,ibn:ien),stat=errfl ); IF (errfl>0) goto 88
316  ALLOCATE( grid%stuij( 3,ibn:ien),stat=errfl ); IF (errfl>0) goto 88
317  ALLOCATE( grid%stuik( 3,ibn:ien),stat=errfl ); IF (errfl>0) goto 88
318  ALLOCATE( grid%stujk( 3,ibn:ien),stat=errfl ); IF (errfl>0) goto 88
319 
320 ! get pointers ----------------------------------------------------------------
321 
322  stu => region%levels(ilev)%grid%stu
323  stui => region%levels(ilev)%grid%stui
324  stuj => region%levels(ilev)%grid%stuj
325  stuk => region%levels(ilev)%grid%stuk
326  stuii => region%levels(ilev)%grid%stuii
327  stujj => region%levels(ilev)%grid%stujj
328  stukk => region%levels(ilev)%grid%stukk
329  stuij => region%levels(ilev)%grid%stuij
330  stuik => region%levels(ilev)%grid%stuik
331  stujk => region%levels(ilev)%grid%stujk
332  pmat => region%levels(ilev)%grid%pmat
333 
334 ! stuii -----------------------------------------------------------------------
335 
336  CALL rflo_findiffcompii( idnbeg,idnend,jdnbeg,jdnend,kdnbeg,kdnend,ndum, &
337  inoff,ijnoff,xcoord,zcoord,stu,stuii )
338 
339 ! stujj -----------------------------------------------------------------------
340 
341  CALL rflo_findiffcompjj( idnbeg,idnend,jdnbeg,jdnend,kdnbeg,kdnend,ndum, &
342  inoff,ijnoff,xcoord,zcoord,stu,stujj )
343 
344 ! stukk -----------------------------------------------------------------------
345 
346  CALL rflo_findiffcompkk( idnbeg,idnend,jdnbeg,jdnend,kdnbeg,kdnend,ndum, &
347  inoff,ijnoff,xcoord,zcoord,stu,stukk )
348 
349 ! stuij -----------------------------------------------------------------------
350 
351  CALL rflo_findiffcompj( idnbeg,idnend,jdnbeg,jdnend,kdnbeg,kdnend,ndum, &
352  inoff,ijnoff,xcoord,zcoord,stui,stuij )
353 
354 ! stuik -----------------------------------------------------------------------
355 
356  CALL rflo_findiffcompk( idnbeg,idnend,jdnbeg,jdnend,kdnbeg,kdnend,ndum, &
357  inoff,ijnoff,xcoord,zcoord,stui,stuik )
358 
359 ! stujk -----------------------------------------------------------------------
360 
361  CALL rflo_findiffcompk( idnbeg,idnend,jdnbeg,jdnend,kdnbeg,kdnend,ndum, &
362  inoff,ijnoff,xcoord,zcoord,stuj,stujk )
363 
364 ! compute control functions ---------------------------------------------------
365 
366  DO k=kdnbeg,kdnend
367  DO j=jdnbeg,jdnend
368  DO i=idnbeg,idnend
369  ijkn = indijk(i ,j ,k ,inoff,ijnoff)
370  determ = stui(xco,ijkn)*(stuj(yco,ijkn)*stuk(zco,ijkn)- &
371  stuk(yco,ijkn)*stuj(zco,ijkn))+ &
372  stuj(xco,ijkn)*(stuk(yco,ijkn)*stui(zco,ijkn)- &
373  stui(yco,ijkn)*stuk(zco,ijkn))+ &
374  stuk(xco,ijkn)*(stui(yco,ijkn)*stuj(zco,ijkn)- &
375  stuj(yco,ijkn)*stui(zco,ijkn))
376  rndet = -1._rfreal/determ
377  a11 = stuj(yco,ijkn)*stuk(zco,ijkn)-stuk(yco,ijkn)*stuj(zco,ijkn)
378  a12 = stuk(xco,ijkn)*stuj(zco,ijkn)-stuj(xco,ijkn)*stuk(zco,ijkn)
379  a13 = stuj(xco,ijkn)*stuk(yco,ijkn)-stuk(xco,ijkn)*stuj(yco,ijkn)
380  a21 = stuk(yco,ijkn)*stui(zco,ijkn)-stui(yco,ijkn)*stuk(zco,ijkn)
381  a22 = stui(xco,ijkn)*stuk(zco,ijkn)-stuk(xco,ijkn)*stui(zco,ijkn)
382  a23 = stuk(xco,ijkn)*stui(yco,ijkn)-stui(xco,ijkn)*stuk(yco,ijkn)
383  a31 = stui(yco,ijkn)*stuj(zco,ijkn)-stuj(yco,ijkn)*stui(zco,ijkn)
384  a32 = stuj(xco,ijkn)*stui(zco,ijkn)-stui(xco,ijkn)*stuj(zco,ijkn)
385  a33 = stui(xco,ijkn)*stuj(yco,ijkn)-stuj(xco,ijkn)*stui(yco,ijkn)
386 
387  pmat(xco,1,ijkn) = (stuii(xco,ijkn)*a11+ &
388  stuii(yco,ijkn)*a12+ &
389  stuii(zco,ijkn)*a13)*rndet
390  pmat(yco,1,ijkn) = (stuii(xco,ijkn)*a21+ &
391  stuii(yco,ijkn)*a22+ &
392  stuii(zco,ijkn)*a23)*rndet
393  pmat(zco,1,ijkn) = (stuii(xco,ijkn)*a31+ &
394  stuii(yco,ijkn)*a32+ &
395  stuii(zco,ijkn)*a33)*rndet
396 
397  pmat(xco,2,ijkn) = (stuij(xco,ijkn)*a11+ &
398  stuij(yco,ijkn)*a12+ &
399  stuij(zco,ijkn)*a13)*rndet
400  pmat(yco,2,ijkn) = (stuij(xco,ijkn)*a21+ &
401  stuij(yco,ijkn)*a22+ &
402  stuij(zco,ijkn)*a23)*rndet
403  pmat(zco,2,ijkn) = (stuij(xco,ijkn)*a31+ &
404  stuij(yco,ijkn)*a32+ &
405  stuij(zco,ijkn)*a33)*rndet
406 
407  pmat(xco,3,ijkn) = (stuik(xco,ijkn)*a11+ &
408  stuik(yco,ijkn)*a12+ &
409  stuik(zco,ijkn)*a13)*rndet
410  pmat(yco,3,ijkn) = (stuik(xco,ijkn)*a21+ &
411  stuik(yco,ijkn)*a22+ &
412  stuik(zco,ijkn)*a23)*rndet
413  pmat(zco,3,ijkn) = (stuik(xco,ijkn)*a31+ &
414  stuik(yco,ijkn)*a32+ &
415  stuik(zco,ijkn)*a33)*rndet
416 
417  pmat(xco,4,ijkn) = (stujj(xco,ijkn)*a11+ &
418  stujj(yco,ijkn)*a12+ &
419  stujj(zco,ijkn)*a13)*rndet
420  pmat(yco,4,ijkn) = (stujj(xco,ijkn)*a21+ &
421  stujj(yco,ijkn)*a22+ &
422  stujj(zco,ijkn)*a23)*rndet
423  pmat(zco,4,ijkn) = (stujj(xco,ijkn)*a31+ &
424  stujj(yco,ijkn)*a32+ &
425  stujj(zco,ijkn)*a33)*rndet
426 
427  pmat(xco,5,ijkn) = (stujk(xco,ijkn)*a11+ &
428  stujk(yco,ijkn)*a12+ &
429  stujk(zco,ijkn)*a13)*rndet
430  pmat(yco,5,ijkn) = (stujk(xco,ijkn)*a21+ &
431  stujk(yco,ijkn)*a22+ &
432  stujk(zco,ijkn)*a23)*rndet
433  pmat(zco,5,ijkn) = (stujk(xco,ijkn)*a31+ &
434  stujk(yco,ijkn)*a32+ &
435  stujk(zco,ijkn)*a33)*rndet
436 
437  pmat(xco,6,ijkn) = (stukk(xco,ijkn)*a11+ &
438  stukk(yco,ijkn)*a12+ &
439  stukk(zco,ijkn)*a13)*rndet
440  pmat(yco,6,ijkn) = (stukk(xco,ijkn)*a21+ &
441  stukk(yco,ijkn)*a22+ &
442  stukk(zco,ijkn)*a23)*rndet
443  pmat(zco,6,ijkn) = (stukk(xco,ijkn)*a31+ &
444  stukk(yco,ijkn)*a32+ &
445  stukk(zco,ijkn)*a33)*rndet
446  ENDDO ! i
447  ENDDO ! j
448  ENDDO ! k
449 
450 ! deallocate memory -----------------------------------------------------------
451 
452  DEALLOCATE( grid%stuii, stat=errfl ); IF (errfl>0) goto 99
453  DEALLOCATE( grid%stujj, stat=errfl ); IF (errfl>0) goto 99
454  DEALLOCATE( grid%stukk, stat=errfl ); IF (errfl>0) goto 99
455  DEALLOCATE( grid%stuij, stat=errfl ); IF (errfl>0) goto 99
456  DEALLOCATE( grid%stuik, stat=errfl ); IF (errfl>0) goto 99
457  DEALLOCATE( grid%stujk, stat=errfl ); IF (errfl>0) goto 99
458 
459  goto 999
460 
461 ! finalize --------------------------------------------------------------------
462 
463 88 CONTINUE
464 
465  global%error = errfl
466  CALL errorstop( global,err_allocate,&
467  __line__ )
468 
469 99 CONTINUE
470 
471  global%error = errfl
472  CALL errorstop( global,err_deallocate,&
473  __line__ )
474 
475 999 CONTINUE
476 
477  CALL deregisterfunction( region%global )
478 
479 END SUBROUTINE rflo_gridcontrolfunc3d
480 
481 
482 !******************************************************************************
483 !
484 ! Purpose: compute gradient of grid control map w.r.t computational space grid
485 ! for patches
486 !
487 ! Description: the method used is second order finite difference.
488 !
489 ! Input: region = grid data of current region
490 !
491 ! Output: sti,stj = 1st order derivatives
492 ! stii,stjj = 2nd order derivatives
493 ! stij = mixed derivative
494 !
495 ! Notes: none.
496 !
497 !******************************************************************************
498 
499 SUBROUTINE rflo_gridcontrolgrad2d( region,patch,iPatch )
500 
502 
503  IMPLICIT NONE
504 
505 #include "Indexing.h"
506 
507 ! ... parameters
508  TYPE(t_region) :: region
509  TYPE(t_patch) :: patch
510  INTEGER :: ipatch
511 
512 ! ... local variables
513  INTEGER :: h1, h2
514  REAL(RFREAL), POINTER :: st(:,:,:), sti(:,:,:), stj(:,:,:)
515 
516  TYPE(t_global), POINTER :: global
517 
518 !******************************************************************************
519 
520  global => region%global
521 
522  CALL registerfunction( global,'RFLO_GridControlGrad2D',&
523  'RFLO_ModGridControlMap.F90' )
524 
525 ! get dimensions --------------------------------------------------------------
526 
527  h1 = patch%l1end-patch%l1beg+2
528  h2 = patch%l2end-patch%l2beg+2
529 
530 ! get pointers ----------------------------------------------------------------
531 
532  st => patch%st
533  sti => patch%sti
534  stj => patch%stj
535 
536 ! sti -------------------------------------------------------------------------
537 
538  CALL rflo_findiffcompis( h1,h2,1,2,st,sti )
539 
540 ! stj -------------------------------------------------------------------------
541 
542  CALL rflo_findiffcompjs( h1,h2,1,2,st,stj )
543 
544 ! finalize --------------------------------------------------------------------
545 
546  CALL deregisterfunction( region%global )
547 
548 END SUBROUTINE rflo_gridcontrolgrad2d
549 
550 
551 !******************************************************************************
552 !
553 ! Purpose: compute gradient of physical space grid w.r.t computational space
554 ! grid for patches.
555 !
556 ! Description: the method used is second order finite difference.
557 !
558 ! Input: region = grid data of current region
559 !
560 ! Output: sti,stj = 1st order derivatives
561 ! stii,stjj = 2nd order derivatives
562 ! stij = mixed derivative
563 !
564 ! Notes: none.
565 !
566 !******************************************************************************
567 
568 SUBROUTINE rflo_gridphysgrad2d( region,patch )
569 
572 
573  IMPLICIT NONE
574 
575 #include "Indexing.h"
576 
577 ! ... parameters
578  TYPE(t_region) :: region
579  TYPE(t_patch) :: patch
580 
581 ! ... loop variables
582  INTEGER :: i, j, k
583 
584 ! ... local variables
585  INTEGER :: ilev, h1, h2, lbound, inoff, ijnoff
586  INTEGER :: ibeg, iend, jbeg, jend, kbeg, kend, ijkn, ng1, ng2
587  REAL(RFREAL), POINTER :: st(:,:,:), sti(:,:,:), stj(:,:,:), xyz(:,:)
588 
589  TYPE(t_global), POINTER :: global
590 
591 !******************************************************************************
592 
593  global => region%global
594 
595  CALL registerfunction( global,'RFLO_GridPhysGrad2D',&
596  'RFLO_ModGridControlMap.F90' )
597 
598 ! get dimensions --------------------------------------------------------------
599 
600  ilev = 1
601  lbound = patch%lbound
602 
603  CALL rflo_getpatchindicesnodes( region,patch,ilev, &
604  ibeg,iend,jbeg,jend,kbeg,kend )
605  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
606 
607  h1 = patch%l1end-patch%l1beg+2
608  h2 = patch%l2end-patch%l2beg+2
609 
610 ! get pointers ----------------------------------------------------------------
611 
612  xyz => region%levels(ilev)%grid%xyz
613  st => patch%st
614  sti => patch%sti
615  stj => patch%stj
616 
617 ! copy xyz to st --------------------------------------------------------------
618 
619  DO k=kbeg,kend
620  DO j=jbeg,jend
621  DO i=ibeg,iend
622  ijkn = indijk(i,j,k,inoff,ijnoff)
623  IF (lbound==1 .OR. lbound==2) THEN
624  ng1 = j - jbeg + 1
625  ng2 = k - kbeg + 1
626  ELSE IF (lbound==3 .OR. lbound==4) THEN
627  ng1 = k - kbeg + 1
628  ng2 = i - ibeg + 1
629  ELSE IF (lbound==5 .OR. lbound==6) THEN
630  ng1 = i - ibeg + 1
631  ng2 = j - jbeg + 1
632  ENDIF
633  st(1,ng1,ng2) = xyz(xcoord,ijkn)
634  st(2,ng1,ng2) = xyz(ycoord,ijkn)
635  st(3,ng1,ng2) = xyz(zcoord,ijkn)
636  ENDDO
637  ENDDO
638  ENDDO
639 
640 ! sti -------------------------------------------------------------------------
641 
642  CALL rflo_findiffcompis( h1,h2,1,3,st,sti )
643 
644 ! stj -------------------------------------------------------------------------
645 
646  CALL rflo_findiffcompjs( h1,h2,1,3,st,stj )
647 
648 ! finalize --------------------------------------------------------------------
649 
650  CALL deregisterfunction( region%global )
651 
652 END SUBROUTINE rflo_gridphysgrad2d
653 
654 
655 !******************************************************************************
656 !
657 ! Purpose: compute grid control function.
658 !
659 ! Description: Equation 4.13 in Handbook of Grid Generation, by
660 ! Joe F. Thompson, Bharat K. Soni, and Nigel P. Weatherill,
661 ! CRC Press 1999, ISBN 0-8493-2687-7.
662 !
663 ! Input: region = grid data of current region
664 !
665 ! Output: patch%pfun = Pmatrix of grid control function
666 !
667 ! Notes: none.
668 !
669 !******************************************************************************
670 
671 SUBROUTINE rflo_gridcontrolfunc2d( region,patch,iPatch )
672 
677 
678  IMPLICIT NONE
679 
680 #include "Indexing.h"
681 
682 ! ... parameters
683  TYPE(t_region) :: region
684  TYPE(t_patch) :: patch
685  INTEGER :: ipatch
686 
687 ! ... loop variables
688  INTEGER :: i, j
689 
690 ! ... local variables
691  INTEGER :: ilev, lbound, h1, h2
692  REAL(RFREAL) :: determ, rndet, a11, a12, a21, a22
693  REAL(RFREAL), POINTER :: st(:,:,:), sti(:,:,:), stj(:,:,:)
694  REAL(RFREAL), POINTER :: stii(:,:,:), stjj(:,:,:), stij(:,:,:), pfun(:,:,:,:)
695 
696  TYPE(t_global), POINTER :: global
697 
698 !******************************************************************************
699 
700  global => region%global
701 
702  CALL registerfunction( global,'RFLO_GridControlFunc2D',&
703  'RFLO_ModGridControlMap.F90' )
704 
705 ! get dimensions --------------------------------------------------------------
706 
707  ilev = 1
708  lbound = patch%lbound
709 
710  h1 = patch%l1end-patch%l1beg+2
711  h2 = patch%l2end-patch%l2beg+2
712 
713 ! get pointers ----------------------------------------------------------------
714 
715  st => patch%st
716  sti => patch%sti
717  stj => patch%stj
718  stii => patch%stii
719  stjj => patch%stjj
720  stij => patch%stij
721  pfun => patch%pfun
722 
723 ! stii ------------------------------------------------------------------------
724 
725  CALL rflo_findiffcompiis( h1,h2,1,3,st,stii )
726 
727 ! stjj ------------------------------------------------------------------------
728 
729  CALL rflo_findiffcompjjs( h1,h2,1,3,st,stjj )
730 
731 ! stij ------------------------------------------------------------------------
732 
733  CALL rflo_findiffcompjs( h1,h2,1,3,sti,stij )
734 
735 ! compute control functions ---------------------------------------------------
736 
737  DO j=1,h2
738  DO i=1,h1
739  determ = sti(1,i,j)*stj(2,i,j)-stj(1,i,j)*sti(2,i,j)
740  rndet = -1._rfreal/determ
741  a11 = stj(2,i,j)
742  a12 = -stj(1,i,j)
743  a21 = -sti(2,i,j)
744  a22 = sti(1,i,j)
745 
746  pfun(1,1,i,j) = (stii(1,i,j)*a11 + stii(2,i,j)*a12)*rndet
747  pfun(2,1,i,j) = (stii(1,i,j)*a12 + stii(2,i,j)*a22)*rndet
748 
749  pfun(1,2,i,j) = (stij(1,i,j)*a11 + stij(2,i,j)*a12)*rndet
750  pfun(2,2,i,j) = (stij(1,i,j)*a12 + stij(2,i,j)*a22)*rndet
751 
752  pfun(1,3,i,j) = (stjj(1,i,j)*a11 + stjj(2,i,j)*a12)*rndet
753  pfun(2,3,i,j) = (stjj(1,i,j)*a12 + stjj(2,i,j)*a22)*rndet
754  ENDDO ! i
755  ENDDO ! j
756 
757 ! finalize --------------------------------------------------------------------
758 
759  CALL deregisterfunction( region%global )
760 
761 END SUBROUTINE rflo_gridcontrolfunc2d
762 
763 
764 !******************************************************************************
765 !
766 ! Purpose: redistribute the control parameter grid based on the normalized arc-
767 ! length of block edges.
768 !
769 ! Description: the method used is bi-linear interpolation.
770 !
771 ! Input: region = grid data of current region
772 !
773 ! Output: stu = new parameter grid.
774 !
775 ! Notes: none.
776 !
777 !******************************************************************************
778 
779 SUBROUTINE rflo_gridcontrolmap3d( region )
780 
783 
785 
786  IMPLICIT NONE
787 
788 #include "Indexing.h"
789 
790 ! ... parameters
791  TYPE(t_region) :: region
792 
793 ! ... loop variables
794  INTEGER :: i, j, k, iter
795 
796 ! ... local variables
797  INTEGER :: ilev, ibeg, iend, jbeg, jend, kbeg, kend, ndum
798  INTEGER :: idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend
799  INTEGER :: ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend
800  INTEGER :: ijkn, imjkn, ijmkn, ijkmn, inoff, ijnoff, errorflag
801  INTEGER :: xco, yco, zco
802 
803  REAL(RFREAL) :: phii, phii1, phij, phij1, phik, phik1, dsi, dx,dy,dz, resid
804  REAL(RFREAL), POINTER :: xyzini(:,:), stu(:,:), stuold(:,:)
805  REAL(RFREAL), ALLOCATABLE :: dsj(:), dsk(:,:)
806  REAL(RFREAL), ALLOCATABLE :: arclen12(:,:), arclen34(:,:), arclen56(:,:)
807 
808  TYPE(t_global), POINTER :: global
809 
810 !******************************************************************************
811 
812  global => region%global
813 
814  CALL registerfunction( global,'RFLO_GridControlMap3D',&
815  'RFLO_ModGridControlMap.F90' )
816 
817 ! get dimensions, allocate temporary storage ----------------------------------
818 
819  xco = xcoord
820  yco = ycoord
821  zco = zcoord
822 
823  ndum = region%nDumCells
824 
825  ilev = 1
826  CALL rflo_getdimensdummynodes( region,ilev,idnbeg,idnend, &
827  jdnbeg,jdnend,kdnbeg,kdnend )
828  CALL rflo_getdimensphysnodes( region,ilev,ipnbeg,ipnend, &
829  jpnbeg,jpnend,kpnbeg,kpnend )
830  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
831 
832  ALLOCATE( dsj(ipnbeg:ipnend) ,stat=errorflag )
833  global%error = errorflag
834  IF (global%error/=0) CALL errorstop( global,err_allocate,&
835  __line__ )
836 
837  ALLOCATE( dsk(ipnbeg:ipnend,jpnbeg:jpnend),stat=errorflag )
838  global%error = errorflag
839  IF (global%error/=0) CALL errorstop( global,err_allocate,&
840  __line__ )
841 
842  ALLOCATE( arclen12(jpnbeg:jpnend,kpnbeg:kpnend),stat=errorflag )
843  global%error = errorflag
844  IF (global%error/=0) CALL errorstop( global,err_allocate,&
845  __line__ )
846 
847  ALLOCATE( arclen34(kpnbeg:kpnend,ipnbeg:ipnend),stat=errorflag )
848  global%error = errorflag
849  IF (global%error/=0) CALL errorstop( global,err_allocate,&
850  __line__ )
851 
852  ALLOCATE( arclen56(ipnbeg:ipnend,jpnbeg:jpnend),stat=errorflag )
853  global%error = errorflag
854  IF (global%error/=0) CALL errorstop( global,err_allocate,&
855  __line__ )
856 
857 ! get pointers ----------------------------------------------------------------
858 
859  xyzini => region%levels(1)%gridOld%xyzOld
860  stu => region%levels(1)%grid%stu
861  stuold => region%levels(1)%grid%stuOld
862 
863 ! initialize stuOld -----------------------------------------------------------
864 
865  stuold = 0._rfreal
866  arclen12 = 0._rfreal
867  arclen34 = 0._rfreal
868  arclen56 = 0._rfreal
869 
870  DO k=kpnbeg,kpnend
871  DO j=jpnbeg,jpnend
872  DO i=ipnbeg+1,ipnend
873  ijkn = indijk(i ,j ,k ,inoff,ijnoff)
874  imjkn = indijk(i-1,j ,k ,inoff,ijnoff)
875 
876  arclen12(j,k) = arclen12(j,k) + &
877  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,imjkn))**2 + &
878  (xyzini(ycoord,ijkn)-xyzini(ycoord,imjkn))**2 + &
879  (xyzini(zcoord,ijkn)-xyzini(zcoord,imjkn))**2)
880  ENDDO ! i
881  ENDDO ! j
882  ENDDO ! k
883 
884  DO i=ipnbeg,ipnend
885  DO k=kpnbeg,kpnend
886  DO j=jpnbeg+1,jpnend
887  ijkn = indijk(i ,j ,k ,inoff,ijnoff)
888  ijmkn = indijk(i ,j-1,k ,inoff,ijnoff)
889 
890  arclen34(k,i) = arclen34(k,i) + &
891  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijmkn))**2 + &
892  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijmkn))**2 + &
893  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijmkn))**2)
894  ENDDO ! i
895  ENDDO ! j
896  ENDDO ! k
897 
898  DO j=jpnbeg,jpnend
899  DO i=ipnbeg,ipnend
900  DO k=kpnbeg+1,kpnend
901  ijkn = indijk(i ,j ,k ,inoff,ijnoff)
902  ijkmn = indijk(i ,j ,k-1,inoff,ijnoff)
903 
904  arclen56(i,j) = arclen56(i,j) + &
905  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijkmn))**2 + &
906  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijkmn))**2 + &
907  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijkmn))**2)
908  ENDDO ! i
909  ENDDO ! j
910  ENDDO ! k
911 
912  DO k=kpnbeg,kpnend
913  DO j=jpnbeg,jpnend
914  dsi = 0._rfreal
915  DO i=ipnbeg+1,ipnend
916  ijkn = indijk(i ,j ,k ,inoff,ijnoff)
917  imjkn = indijk(i-1,j ,k ,inoff,ijnoff)
918 
919  dsi = dsi + &
920  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,imjkn))**2 + &
921  (xyzini(ycoord,ijkn)-xyzini(ycoord,imjkn))**2 + &
922  (xyzini(zcoord,ijkn)-xyzini(zcoord,imjkn))**2)
923 
924  stuold(xco,ijkn) = dsi/arclen12(j,k)
925  ENDDO ! i
926  ENDDO ! j
927  ENDDO ! k
928 
929  DO k=kpnbeg,kpnend
930  dsj(:) = 0._rfreal
931  DO j=jpnbeg+1,jpnend
932  DO i=ipnbeg,ipnend
933  ijkn = indijk(i ,j ,k ,inoff,ijnoff)
934  ijmkn = indijk(i ,j-1,k ,inoff,ijnoff)
935 
936  dsj(i) = dsj(i) + &
937  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijmkn))**2 + &
938  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijmkn))**2 + &
939  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijmkn))**2)
940 
941  stuold(yco,ijkn) = dsj(i)/arclen34(k,i)
942  ENDDO ! i
943  ENDDO ! j
944  ENDDO ! k
945 
946  dsk(:,:) = 0._rfreal
947  DO k=kpnbeg+1,kpnend
948  DO j=jpnbeg,jpnend
949  DO i=ipnbeg,ipnend
950  ijkn = indijk(i ,j ,k ,inoff,ijnoff)
951  ijkmn = indijk(i ,j ,k-1,inoff,ijnoff)
952 
953  dsk(i,j) = dsk(i,j) + &
954  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijkmn))**2 + &
955  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijkmn))**2 + &
956  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijkmn))**2)
957 
958  stuold(zco,ijkn) = dsk(i,j)/arclen56(i,j)
959  ENDDO ! i
960  ENDDO ! j
961  ENDDO ! k
962 
963 ! iterations on control-parameter coordinates --------------------------------
964 
965  stu = stuold
966 
967  DO iter=1,5
968 
969 ! - interpolate parameter coordinates inside region --------------------------
970 
971  dsk(:,:) = 0._rfreal
972  DO k=kpnbeg+1,kpnend-1
973  dsj(:) = 0._rfreal
974  DO j=jpnbeg+1,jpnend-1
975  dsi = 0._rfreal
976  DO i=ipnbeg+1,ipnend-1
977  ijkn = indijk(i ,j ,k ,inoff,ijnoff)
978  imjkn = indijk(i-1,j ,k ,inoff,ijnoff)
979  ijmkn = indijk(i ,j-1,k ,inoff,ijnoff)
980  ijkmn = indijk(i ,j ,k-1,inoff,ijnoff)
981 
982  dsi = dsi + stuold(xcoord,ijkn)-stuold(xcoord,imjkn)
983  dsj(i) = dsj(i) + stuold(ycoord,ijkn)-stuold(ycoord,ijmkn)
984  dsk(i,j) = dsk(i,j) + stuold(zcoord,ijkn)-stuold(zcoord,ijkmn)
985 
986 
987  phii = dsi
988  phii1 = 1._rfreal - phii
989  phij = dsj(i)
990  phij1 = 1._rfreal - phij
991  phik = dsk(i,j)
992  phik1 = 1._rfreal - phik
993 
994  stu(xco,ijkn) = phij1*phik1* &
995  stuold(xco,indijk(i,jpnbeg,kpnbeg,inoff,ijnoff)) + &
996  phij*phik* &
997  stuold(xco,indijk(i,jpnend,kpnend,inoff,ijnoff)) + &
998  phij*phik1* &
999  stuold(xco,indijk(i,jpnend,kpnbeg,inoff,ijnoff)) + &
1000  phij1*phik* &
1001  stuold(xco,indijk(i,jpnbeg,kpnend,inoff,ijnoff))
1002 
1003  stu(yco,ijkn) = phii1*phik1* &
1004  stuold(yco,indijk(ipnbeg,j,kpnbeg,inoff,ijnoff)) + &
1005  phii*phik* &
1006  stuold(yco,indijk(ipnend,j,kpnend,inoff,ijnoff)) + &
1007  phii*phik1* &
1008  stuold(yco,indijk(ipnend,j,kpnbeg,inoff,ijnoff)) + &
1009  phii1*phik* &
1010  stuold(yco,indijk(ipnbeg,j,kpnend,inoff,ijnoff))
1011 
1012  stu(zco,ijkn) = phii1*phij1* &
1013  stuold(zco,indijk(ipnbeg,jpnbeg,k,inoff,ijnoff)) + &
1014  phii*phij* &
1015  stuold(zco,indijk(ipnend,jpnend,k,inoff,ijnoff)) + &
1016  phii*phij1* &
1017  stuold(zco,indijk(ipnend,jpnbeg,k,inoff,ijnoff)) + &
1018  phii1*phij* &
1019  stuold(zco,indijk(ipnbeg,jpnend,k,inoff,ijnoff))
1020  ENDDO ! i
1021  ENDDO ! j
1022  ENDDO ! k
1023 
1024 ! - residual ------------------------------------------------------------------
1025 
1026  resid = 0._rfreal
1027  DO k=kpnbeg,kpnend
1028  DO j=jpnbeg,jpnend
1029  DO i=ipnbeg,ipnend
1030  ijkn = indijk(i,j,k,inoff,ijnoff)
1031  dx = stu(xcoord,ijkn) - stuold(xcoord,ijkn)
1032  dy = stu(ycoord,ijkn) - stuold(ycoord,ijkn)
1033  dz = stu(zcoord,ijkn) - stuold(zcoord,ijkn)
1034  resid = resid + dx*dx + dy*dy +dz*dz
1035  ENDDO
1036  ENDDO
1037  ENDDO
1038 
1039  IF (global%myProcid == (global%nProcAlloc-1)/2 .AND. &
1040  global%verbLevel >= verbose_high) THEN
1041  WRITE(stdout,*) solver_name//' CtrParam_Vol:region,iter,residual', &
1042  region%iRegionGlobal,iter,resid
1043  ENDIF
1044 
1045 ! - assign stuOld -------------------------------------------------------------
1046 
1047  stuold = stu
1048 
1049  ENDDO ! iter
1050 
1051 ! extrapolate stu to dummy ----------------------------------------------------
1052 
1053  ibeg = idnbeg
1054  iend = idnend
1055  jbeg = jdnbeg
1056  jend = jdnend
1057  kbeg = kdnbeg
1058  kend = kdnend
1059 
1060  CALL rflo_extrapregdummynode( ibeg,iend,jbeg,jend,kbeg,kend,ndum, &
1061  inoff,ijnoff,xcoord,zcoord,stu )
1062 
1063 ! finalize --------------------------------------------------------------------
1064 
1065  DEALLOCATE( dsj,stat=errorflag )
1066  global%error = errorflag
1067  IF (global%error /= 0) CALL errorstop( global,err_deallocate,&
1068  __line__ )
1069 
1070  DEALLOCATE( dsk,stat=errorflag )
1071  global%error = errorflag
1072  IF (global%error /= 0) CALL errorstop( global,err_deallocate,&
1073  __line__ )
1074 
1075  DEALLOCATE( arclen12,stat=errorflag )
1076  global%error = errorflag
1077  IF (global%error /= 0) CALL errorstop( global,err_deallocate,&
1078  __line__ )
1079 
1080  DEALLOCATE( arclen34,stat=errorflag )
1081  global%error = errorflag
1082  IF (global%error /= 0) CALL errorstop( global,err_deallocate,&
1083  __line__ )
1084 
1085  DEALLOCATE( arclen56,stat=errorflag )
1086  global%error = errorflag
1087  IF (global%error /= 0) CALL errorstop( global,err_deallocate,&
1088  __line__ )
1089 
1090  CALL deregisterfunction( region%global )
1091 
1092 END SUBROUTINE rflo_gridcontrolmap3d
1093 
1094 
1095 !******************************************************************************
1096 !
1097 ! Purpose: redistribute the control parameter grid based on the normalized arc-
1098 ! length of patch edges.
1099 !
1100 ! Description: the method used is Hermite cubic interpolation.
1101 !
1102 ! Input: region = grid data of current region
1103 ! patch = grid data of current patch
1104 !
1105 ! Output: st = new parameter grid.
1106 !
1107 ! Notes: none.
1108 !
1109 !******************************************************************************
1110 
1111 SUBROUTINE rflo_gridcontrolmap2d( region,patch,iPatch )
1112 
1114 
1115  IMPLICIT NONE
1116 
1117 #include "Indexing.h"
1118 
1119 ! ... parameters
1120  TYPE(t_region) :: region
1121  TYPE(t_patch) :: patch
1122  INTEGER :: ipatch
1123 
1124 ! ... loop variables
1125  INTEGER :: i, j, k, iter
1126 
1127 ! ... local variables
1128  INTEGER :: ilev, lbound, h1, h2, ir, jr, kr, ijkn, ijknm, m1, m2, errorflag
1129  INTEGER :: ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend, inoff, ijnoff
1130 
1131  REAL(RFREAL) :: arclen(4), ri, rj, dsi, phii, phii1, phij, phij1
1132  REAL(RFREAL) :: dx, dy, resid
1133  REAL(RFREAL), ALLOCATABLE :: dsj(:)
1134  REAL(RFREAL), POINTER :: xyzini(:,:), st(:,:,:), stold(:,:,:)
1135 
1136  TYPE(t_global), POINTER :: global
1137 
1138 !******************************************************************************
1139 
1140  global => region%global
1141  CALL registerfunction( global,'RFLO_GridControlMap2D',&
1142  'RFLO_ModGridControlMap.F90' )
1143 
1144 ! get dimensions and pointers -------------------------------------------------
1145 
1146  ilev = 1
1147  lbound = patch%lbound
1148 
1149  CALL rflo_getdimensphysnodes( region,ilev,ipnbeg,ipnend, &
1150  jpnbeg,jpnend,kpnbeg,kpnend )
1151  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
1152 
1153  xyzini => region%levels(ilev)%gridOld%xyzOld
1154  st => patch%st
1155  stold => patch%stOld
1156 
1157  h1 = patch%l1end-patch%l1beg+2
1158  h2 = patch%l2end-patch%l2beg+2
1159 
1160  ALLOCATE( dsj(h1), stat=errorflag )
1161  global%error = errorflag
1162  IF (global%error/=0) CALL errorstop( global,err_allocate,&
1163  __line__ )
1164 
1165 ! initialize stOld ------------------------------------------------------------
1166 
1167  stold = 0._rfreal
1168  arclen(:) = 0._rfreal
1169 
1170  IF (lbound==1 .OR. lbound==2) THEN
1171  IF (lbound==1) THEN
1172  ir = ipnbeg
1173  ELSE
1174  ir = ipnend
1175  ENDIF
1176  DO k=kpnbeg+1,kpnend
1177  ijkn = indijk(ir ,jpnbeg,k ,inoff,ijnoff)
1178  ijknm = indijk(ir ,jpnbeg,k-1,inoff,ijnoff)
1179  m1 = 1
1180  m2 = k-kpnbeg+1
1181  arclen(1) = arclen(1) + &
1182  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1183  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1184  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1185  stold(2,m1,m2) = arclen(1)
1186  ENDDO ! k
1187  stold(1,m1,:) = 0._rfreal
1188  stold(2,m1,:) = stold(2,m1,:)/arclen(1)
1189 
1190  DO k=kpnbeg+1,kpnend
1191  ijkn = indijk(ir ,jpnend,k ,inoff,ijnoff)
1192  ijknm = indijk(ir ,jpnend,k-1,inoff,ijnoff)
1193  m1 = jpnend-jpnbeg+1
1194  m2 = k-kpnbeg+1
1195  arclen(2) = arclen(2) + &
1196  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1197  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1198  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1199  stold(2,m1,m2) = arclen(2)
1200  ENDDO ! k
1201  stold(1,m1,:) = 1._rfreal
1202  stold(2,m1,:) = stold(2,m1,:)/arclen(2)
1203 
1204  DO j=jpnbeg+1,jpnend
1205  ijkn = indijk(ir ,j ,kpnbeg,inoff,ijnoff)
1206  ijknm = indijk(ir ,j-1,kpnbeg,inoff,ijnoff)
1207  m1 = j-jpnbeg+1
1208  m2 = 1
1209  arclen(3) = arclen(3) + &
1210  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1211  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1212  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1213  stold(1,m1,m2) = arclen(3)
1214  ENDDO ! j
1215  stold(1,:,m2) = stold(1,:,m2)/arclen(3)
1216  stold(2,:,m2) = 0._rfreal
1217 
1218  DO j=jpnbeg+1,jpnend
1219  ijkn = indijk(ir ,j ,kpnbeg,inoff,ijnoff)
1220  ijknm = indijk(ir ,j-1,kpnbeg,inoff,ijnoff)
1221  m1 = j-jpnbeg+1
1222  m2 = kpnend-kpnbeg+1
1223  arclen(4) = arclen(4) + &
1224  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1225  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1226  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1227  stold(1,m1,m2) = arclen(4)
1228  ENDDO ! j
1229  stold(1,:,m2) = stold(1,:,m2)/arclen(4)
1230  stold(2,:,m2) = 1._rfreal
1231 
1232  ELSEIF (lbound==3 .OR. lbound==4) THEN
1233  IF (lbound==3) THEN
1234  jr = jpnbeg
1235  ELSE
1236  jr = jpnend
1237  ENDIF
1238  DO i=ipnbeg+1,ipnend
1239  ijkn = indijk(i ,jr ,kpnbeg,inoff,ijnoff)
1240  ijknm = indijk(i-1,jr ,kpnbeg,inoff,ijnoff)
1241  m1 = 1
1242  m2 = i-ipnbeg+1
1243  arclen(1) = arclen(1) + &
1244  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1245  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1246  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1247  stold(2,m1,m2) = arclen(1)
1248  ENDDO ! i
1249  stold(1,m1,:) = 0._rfreal
1250  stold(2,m1,:) = stold(2,m1,:)/arclen(1)
1251 
1252  DO i=ipnbeg+1,ipnend
1253  ijkn = indijk(i ,jr ,kpnend,inoff,ijnoff)
1254  ijknm = indijk(i-1,jr ,kpnend,inoff,ijnoff)
1255  m1 = kpnend-kpnbeg+1
1256  m2 = i-ipnbeg+1
1257  arclen(2) = arclen(2) + &
1258  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1259  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1260  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1261  stold(2,m1,m2) = arclen(2)
1262  ENDDO ! i
1263  stold(1,m1,:) = 1._rfreal
1264  stold(2,m1,:) = stold(2,m1,:)/arclen(2)
1265 
1266  DO k=kpnbeg+1,kpnend
1267  ijkn = indijk(ipnbeg,jr ,k ,inoff,ijnoff)
1268  ijknm = indijk(ipnbeg,jr ,k-1,inoff,ijnoff)
1269  m1 = k-kpnbeg+1
1270  m2 = 1
1271  arclen(3) = arclen(3) + &
1272  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1273  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1274  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1275  stold(1,m1,m2) = arclen(3)
1276  ENDDO ! k
1277  stold(1,:,m2) = stold(1,:,m2)/arclen(3)
1278  stold(2,:,m2) = 0._rfreal
1279 
1280  DO k=kpnbeg+1,kpnend
1281  ijkn = indijk(ipnend,jr ,k ,inoff,ijnoff)
1282  ijknm = indijk(ipnend,jr ,k-1,inoff,ijnoff)
1283  m1 = k-kpnbeg+1
1284  m2 = ipnend-ipnbeg+1
1285  arclen(4) = arclen(4) + &
1286  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1287  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1288  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1289  stold(1,m1,m2) = arclen(4)
1290  ENDDO ! k
1291  stold(1,:,m2) = stold(1,:,m2)/arclen(4)
1292  stold(2,:,m2) = 1._rfreal
1293 
1294  ELSEIF (lbound==5 .OR. lbound==6) THEN
1295  IF (lbound==5) THEN
1296  kr = kpnbeg
1297  ELSE
1298  kr = kpnend
1299  ENDIF
1300  DO j=jpnbeg+1,jpnend
1301  ijkn = indijk(ipnbeg,j ,kr ,inoff,ijnoff)
1302  ijknm = indijk(ipnbeg,j-1,kr ,inoff,ijnoff)
1303  m1 = 1
1304  m2 = j-jpnbeg+1
1305  arclen(1) = arclen(1) + &
1306  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1307  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1308  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1309  stold(2,m1,m2) = arclen(1)
1310  ENDDO ! j
1311  stold(1,m1,:) = 0._rfreal
1312  stold(2,m1,:) = stold(2,m1,:)/arclen(1)
1313 
1314  DO j=jpnbeg+1,jpnend
1315  ijkn = indijk(ipnend,j ,kr ,inoff,ijnoff)
1316  ijknm = indijk(ipnend,j-1,kr ,inoff,ijnoff)
1317  m1 = ipnend-ipnbeg+1
1318  m2 = j-jpnbeg+1
1319  arclen(2) = arclen(2) + &
1320  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1321  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1322  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1323  stold(2,m1,m2) = arclen(2)
1324  ENDDO ! j
1325  stold(1,m1,:) = 1._rfreal
1326  stold(2,m1,:) = stold(2,m1,:)/arclen(2)
1327 
1328  DO i=ipnbeg+1,ipnend
1329  ijkn = indijk(i ,jpnbeg,kr ,inoff,ijnoff)
1330  ijknm = indijk(i-1,jpnbeg,kr ,inoff,ijnoff)
1331  m1 = i-ipnbeg+1
1332  m2 = 1
1333  arclen(3) = arclen(3) + &
1334  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1335  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1336  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1337  stold(1,m1,m2) = arclen(3)
1338  ENDDO ! i
1339  stold(1,:,m2) = stold(1,:,m2)/arclen(3)
1340  stold(2,:,m2) = 0._rfreal
1341 
1342  DO i=ipnbeg+1,ipnend
1343  ijkn = indijk(i ,jpnend,kr ,inoff,ijnoff)
1344  ijknm = indijk(i-1,jpnend,kr ,inoff,ijnoff)
1345  m1 = i-ipnbeg+1
1346  m2 = jpnend-jpnbeg+1
1347  arclen(4) = arclen(4) + &
1348  sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1349  (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1350  (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1351  stold(1,m1,m2) = arclen(4)
1352  ENDDO ! i
1353  stold(1,:,m2) = stold(1,:,m2)/arclen(4)
1354  stold(2,:,m2) = 1._rfreal
1355 
1356  ENDIF ! lbound
1357 
1358  DO j=1,h2
1359  DO i=2,h1-1
1360  ri = REAL(i-1)/REAL(h1-1)
1361  stold(2,i,j) = ri*stold(2,h1,j) + (1._rfreal-ri)*stold(2,1,j)
1362  ENDDO ! i
1363  ENDDO ! j
1364 
1365  DO j=2,h2-1
1366  DO i=1,h1
1367  rj = REAL(j-1)/REAL(h2-1)
1368  stold(1,i,j) = rj*stold(1,i,h2) + (1._rfreal-rj)*stold(1,i,1)
1369  ENDDO ! i
1370  ENDDO ! j
1371 
1372 ! iterations on control-parameter coordinates --------------------------------
1373 
1374  DO iter=1,5
1375 
1376 ! - interpolate parameter coordinates inside region --------------------------
1377 
1378  st = stold
1379 
1380  DO j=1,h2
1381  dsi = 0._rfreal
1382  DO i=2,h1
1383  dsi = dsi + stold(1,i,j)-stold(1,i-1,j)
1384 
1385  phii = (3._rfreal-2._rfreal*dsi)*dsi*dsi
1386  phii1 = 1._rfreal - phii
1387  st(2,i,j) = phii*stold(2,h1,j) + phii1*stold(2,1,j)
1388  ENDDO ! i
1389  ENDDO ! j
1390 
1391  dsj(:) = 0._rfreal
1392  DO j=2,h2
1393  DO i=1,h1
1394  dsj(i) = dsj(i) + stold(2,i,j)-stold(2,i,j-1)
1395 
1396  phij = (3._rfreal-2._rfreal*dsj(i))*dsj(i)*dsj(i)
1397  phij1 = 1._rfreal - phij
1398 
1399  st(1,i,j) = phij*stold(1,i,h2) + phij1*stold(1,i,1)
1400  ENDDO ! i
1401  ENDDO ! j
1402 
1403 ! - residual ------------------------------------------------------------------
1404 
1405  resid = 0._rfreal
1406  DO j=1,h2
1407  DO i=1,h1
1408  dx = st(1,i,j) - stold(1,i,j)
1409  dy = st(2,i,j) - stold(2,i,j)
1410  resid = resid + dx*dx + dy*dy
1411  ENDDO
1412  ENDDO
1413 
1414  IF (global%myProcid == (global%nProcAlloc-1)/2 .AND. &
1415  global%verbLevel >= verbose_high) THEN
1416  WRITE(stdout,*) solver_name//' CtrParam_Surf:patch,iter,residual', &
1417  region%iRegionGlobal,ipatch,iter,resid
1418  ENDIF
1419 
1420 ! - assign stOld --------------------------------------------------------------
1421 
1422  stold = st
1423 
1424  ENDDO ! iter
1425 
1426 ! finalize --------------------------------------------------------------------
1427 
1428  DEALLOCATE( dsj,stat=errorflag )
1429  global%error = errorflag
1430  IF (global%error /= 0) CALL errorstop( global,err_deallocate,&
1431  __line__ )
1432 
1433  CALL deregisterfunction( global )
1434 
1435 END SUBROUTINE rflo_gridcontrolmap2d
1436 
1437 
1438 ! ******************************************************************************
1439 ! End
1440 ! ******************************************************************************
1441 
1442 END MODULE rflo_modgridcontrolmap
1443 
1444 
1445 ! ******************************************************************************
1446 !
1447 ! RCS Revision history:
1448 !
1449 ! $Log: RFLO_ModGridControlMap.F90,v $
1450 ! Revision 1.9 2008/12/06 08:44:16 mtcampbe
1451 ! Updated license.
1452 !
1453 ! Revision 1.8 2008/11/19 22:17:27 mtcampbe
1454 ! Added Illinois Open Source License/Copyright
1455 !
1456 ! Revision 1.7 2006/03/02 00:23:59 wasistho
1457 ! prepared elliptic pde grid motion
1458 !
1459 ! Revision 1.6 2006/02/24 21:45:26 wasistho
1460 ! bug fixed in computing stuOld in controlMap3
1461 !
1462 ! Revision 1.5 2006/02/09 07:41:49 wasistho
1463 ! bug fixed: computation of stuj
1464 !
1465 ! Revision 1.4 2006/02/09 00:24:13 wasistho
1466 ! bug fixed allocation of dsj in Map2
1467 !
1468 ! Revision 1.3 2006/02/08 07:51:26 wasistho
1469 ! added iPatch in controlMap2
1470 !
1471 ! Revision 1.2 2005/12/07 08:46:04 wasistho
1472 ! added stuff for surface mesh motion EPDE
1473 !
1474 ! Revision 1.1 2005/12/03 09:39:47 wasistho
1475 ! initial import
1476 !
1477 !
1478 !
1479 ! ******************************************************************************
1480 
1481 
1482 
1483 
1484 
1485 
1486 
1487 
1488 
1489 
1490 
1491 
1492 
1493 
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ibeg
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jpnbeg
subroutine, public rflo_gridcontrolfunc3d(region)
subroutine, public rflo_findiffcompis(ni, nj, idb, ide, var, dvar)
j indices k indices k
Definition: Indexing.h:6
NT dx
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE kpnbeg
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine, public rflo_findiffcompi(ibeg, iend, jbeg, jend, kbeg, kend, ndum, iNOff, ijNOff, idb, ide, var, dvar)
double sqrt(double d)
Definition: double.h:73
subroutine, public rflo_findiffcompjj(ibeg, iend, jbeg, jend, kbeg, kend, ndum, iNOff, ijNOff, idb, ide, var, dvar)
subroutine, public rflo_gridphysgrad2d(region, patch)
subroutine, public rflo_findiffcompjs(ni, nj, idb, ide, var, dvar)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jdnbeg
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jpnend
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE idnend
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jdnend
subroutine, public rflo_findiffcompiis(ni, nj, idb, ide, var, dvar)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE idnbeg
subroutine, public rflo_gridphysgrad3d(region)
Definition: patch.h:74
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode iend
subroutine, public rflo_findiffcompj(ibeg, iend, jbeg, jend, kbeg, kend, ndum, iNOff, ijNOff, idb, ide, var, dvar)
subroutine rflo_getpatchindicesnodes(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
blockLoc i
Definition: read.cpp:79
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ipnbeg
subroutine, public rflo_gridcontrolmap2d(region, patch, iPatch)
subroutine, public rflo_extrapregdummynode(ibeg, iend, jbeg, jend, kbeg, kend, ndum, iNOff, ijNOff, idb, ide, var)
subroutine, public rflo_findiffcompkk(ibeg, iend, jbeg, jend, kbeg, kend, ndum, iNOff, ijNOff, idb, ide, var, dvar)
subroutine, public rflo_gridcontrolmap3d(region)
subroutine, public rflo_gridcontrolgrad3d(region)
subroutine, public rflo_findiffcompjjs(ni, nj, idb, ide, var, dvar)
RT dz() const
Definition: Direction_3.h:133
subroutine, public rflo_findiffcompk(ibeg, iend, jbeg, jend, kbeg, kend, ndum, iNOff, ijNOff, idb, ide, var, dvar)
subroutine, public rflo_gridcontrolfunc2d(region, patch, iPatch)
subroutine rflo_getdimensphysnodes(region, iLev, ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend)
j indices j
Definition: Indexing.h:6
NT dy
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode jend
subroutine rflo_getdimensdummynodes(region, iLev, idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode jbeg
subroutine, public rflo_gridcontrolgrad2d(region, patch, iPatch)
subroutine, public rflo_findiffcompii(ibeg, iend, jbeg, jend, kbeg, kend, ndum, iNOff, ijNOff, idb, ide, var, dvar)
subroutine grid(bp)
Definition: setup_py.f90:257
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode kbeg
subroutine deregisterfunction(global)
Definition: ModError.F90:469
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ipnend
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE kdnbeg