72 CHARACTER(CHRLEN) :: rcsidentstring = &
73 '$RCSfile: RFLO_ModMoveGridNconform4.F90,v $ $Revision: 1.13 $'
110 include
'roccomf90.h'
114 TYPE(t_region
),
POINTER :: regions(:)
117 INTEGER :: ireg, iter, ipatch, ijk
120 LOGICAL :: somemoved, someremesh
122 INTEGER :: bctype, iremesh, jremesh, nremesh, itype
124 REAL(RFREAL) :: resid, globalresid
125 REAL(RFREAL),
POINTER :: xyz(:,:), xyzold(:,:)
131 DOUBLE PRECISION :: dalpha
136 global => regions(1)%global
139 'RFLO_ModMoveGridNconform4.F90' )
146 dalpha = global%dtMin/global%dTimeSystem
147 CALL com_call_function( global%genxHandleGm,1,dalpha )
162 DO ireg=1,global%nRegions
163 IF (regions(ireg)%procid==global%myProcid .AND. &
164 regions(ireg)%active==active .AND. &
165 regions(ireg)%mixtInput%moveGrid)
THEN
169 grid => regions(ireg)%levels(1)%grid
170 gridold => regions(ireg)%levels(1)%gridOld
174 gridold%xyzOld,
grid%xyz )
187 IF (global%moveGridNiter < 1)
THEN
188 IF (global%verbLevel >= verbose_high)
THEN
189 IF (global%myProcid == masterproc)
THEN
190 WRITE(stdout,3000) solver_name,global%skewness,global%minVol
191 WRITE(stdout,1000) solver_name, &
192 global%moveGridNiter,global%moveGridNsmatch, &
193 global%moveGridAmplifX,global%moveGridAmplifY, &
194 global%moveGridAmplifZ,global%moveGridPower, &
195 global%moveGridOrthDir,global%moveGridOrthWghtX, &
196 global%moveGridOrthWghtY,global%moveGridOrthWghtZ
203 DO iter=1,global%moveGridNiter
207 IF (global%verbLevel >= verbose_high)
THEN
209 CALL mpi_reduce( resid,globalresid,1,mpi_rfreal,mpi_sum, &
210 masterproc,global%mpiComm,global%mpierr )
211 IF (global%mpierr /= 0) CALL
errorstop( global,err_mpi_trouble,__line__ )
215 IF (global%myProcid == masterproc)
THEN
216 WRITE(stdout,3000) solver_name,global%skewness,global%minVol
217 WRITE(stdout,2000) solver_name, &
218 global%moveGridNiter,global%moveGridNsmatch, &
219 global%moveGridAmplifX,global%moveGridAmplifY, &
220 global%moveGridAmplifZ,global%moveGridPower, &
221 global%moveGridOrthDir,global%moveGridOrthWghtX, &
222 global%moveGridOrthWghtY,global%moveGridOrthWghtZ, &
230 DO ireg=1,global%nRegions
231 IF (regions(ireg)%procid==global%myProcid .AND. &
232 regions(ireg)%active==active .AND. &
233 regions(ireg)%mixtInput%moveGrid)
THEN
237 xyz => regions(ireg)%levels(1)%grid%xyz
238 xyzold => regions(ireg)%levels(1)%gridOld%xyz
240 DO ijk=lbound(xyz,2),ubound(xyz,2)
241 xyz(xcoord,ijk) = xyz(xcoord,ijk) - xyzold(xcoord,ijk)
242 xyz(ycoord,ijk) = xyz(ycoord,ijk) - xyzold(ycoord,ijk)
243 xyz(zcoord,ijk) = xyz(zcoord,ijk) - xyzold(zcoord,ijk)
248 grid => regions(ireg)%levels(1)%grid
249 gridold => regions(ireg)%levels(1)%gridOld
250 grid%boundMoved(:) = .true.
251 grid%edgeMoved(:) = .true.
252 DO ipatch=1,regions(ireg)%nPatches
253 patch => regions(ireg)%levels(1)%patches(ipatch)
254 bctype =
patch%bcType
258 IF ((bctype==bc_symmetry))
THEN
272 gridold%xyzOld,
grid%xyz )
290 DO ireg=1,global%nRegions
291 IF (regions(ireg)%procid==global%myProcid .AND. &
292 regions(ireg)%active==active .AND. &
293 regions(ireg)%mixtInput%moveGrid)
THEN
297 IF (regions(ireg)%mixtInput%faceEdgeAvg==fe_avg_linear) &
310 CALL mpi_allreduce( iremesh, nremesh, 1, mpi_integer, mpi_sum, &
311 global%mpiComm, global%mpierr )
312 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,__line__ )
313 IF (nremesh > 0) someremesh = .true.
318 DO ireg=1,global%nRegions
319 IF (regions(ireg)%procid==global%myProcid .AND. &
320 regions(ireg)%active==active .AND. &
325 IF (regions(ireg)%mixtInput%faceEdgeAvg==fe_avg_linear) &
340 1000
FORMAT(
a,1
x,
'Global-Weighted-Laplacian grid motion:', &
341 2i5,4(1pe9.2),i4,3(1pe9.2))
342 2000
FORMAT(
a,1
x,
'Global-Weighted-Laplacian grid motion:', &
343 2i5,4(1pe9.2),i4,3(1pe9.2),1pe13.4)
344 3000
FORMAT(
a,1
x,
'global skewness, minvol:',2(1pe14.5))
369 #include "Indexing.h"
372 TYPE(t_region
),
POINTER :: regions(:)
375 INTEGER :: l, ipatch, ireg, ipcorn, intcorn, nreg
378 INTEGER,
PARAMETER :: ncmax=100
381 INTEGER :: iptc, jptc, kptc, iblk, jblk, kblk, ijkcurr
382 INTEGER :: inoff, ijnoff, lbound, regnc, errfl
383 INTEGER,
ALLOCATABLE :: ivar(:), ijkcorn(:,:)
392 global => regions(1)%global
395 'RFLO_ModMoveGridNconform4.F90' )
399 ALLOCATE( ivar(global%nRegions),stat=errfl )
401 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
403 ALLOCATE( ijkcorn(ncmax,global%nRegions),stat=errfl )
405 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
409 DO ireg = 1,global%nRegions
410 IF (regions(ireg)%procid==global%myProcid .AND. &
411 regions(ireg)%active==active)
THEN
413 grid => regions(ireg)%levels(ilev)%grid
421 grid%nCorns(ireg) = 8
423 ijkcorn(2,ireg) = indijk(
ipnbeg,
jpnbeg,kpnend,inoff,ijnoff)
424 ijkcorn(3,ireg) = indijk(
ipnbeg,
jpnend,kpnend,inoff,ijnoff)
427 ijkcorn(6,ireg) = indijk(
ipnend,
jpnbeg,kpnend,inoff,ijnoff)
428 ijkcorn(7,ireg) = indijk(
ipnend,
jpnend,kpnend,inoff,ijnoff)
431 DO ipatch=1,regions(ireg)%nPatches
432 patch => regions(ireg)%levels(ilev)%patches(ipatch)
433 lbound =
patch%lbound
439 IF (lbound==1 .OR. lbound==2)
THEN
441 IF (lbound==1) iblk =
ipnbeg
442 IF (lbound==2) iblk =
ipnend
448 ELSEIF (ipcorn==2)
THEN
453 ELSEIF (ipcorn==3)
THEN
458 ELSEIF (ipcorn==4)
THEN
464 ELSEIF (lbound==3 .OR. lbound==4)
THEN
466 IF (lbound==3) jblk =
jpnbeg
467 IF (lbound==4) jblk =
jpnend
473 ELSEIF (ipcorn==2)
THEN
478 ELSEIF (ipcorn==3)
THEN
483 ELSEIF (ipcorn==4)
THEN
489 ELSEIF (lbound==5 .OR. lbound==6)
THEN
491 IF (lbound==5) kblk =
kpnbeg
492 IF (lbound==6) kblk = kpnend
498 ELSEIF (ipcorn==2)
THEN
503 ELSEIF (ipcorn==3)
THEN
508 ELSEIF (ipcorn==4)
THEN
516 patch%corns(ipcorn) = indijk(iptc,jptc,kptc,inoff,ijnoff)
518 IF (iptc/=iblk .OR. jptc/=jblk .OR. kptc/=kblk)
THEN
520 ijkcurr = indijk(iptc,jptc,kptc,inoff,ijnoff)
521 DO intcorn=1,
grid%nCorns(ireg)
522 IF (ijkcorn(intcorn,ireg)==ijkcurr)
THEN
526 IF (.NOT. wasfound)
THEN
527 grid%nCorns(ireg) =
grid%nCorns(ireg) +1
528 ijkcorn(
grid%nCorns(ireg),ireg) = ijkcurr
531 IF (
grid%nCorns(ireg) >= ncmax)
THEN
532 CALL
errorstop( global,err_illegal_value,__line__, &
533 'too low ncMax in RFLO_ModMoveGridFrame/RFLO_MgFrameCornPoints')
538 ivar(ireg) =
grid%nCorns(ireg)
543 DO ireg = 1,global%nRegions
544 CALL mpi_bcast( ivar(ireg),1,mpi_integer, &
545 regions(ireg)%procId,global%mpiComm,global%mpierr )
546 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,__line__ )
548 CALL mpi_bcast( ijkcorn(1:ncmax,ireg),ncmax,mpi_integer, &
549 regions(ireg)%procId,global%mpiComm,global%mpierr )
550 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,__line__ )
555 DO ireg = 1,global%nRegions
556 regnc =
max( regnc,ivar(ireg) )
558 global%moveGridRegNc = regnc
560 DO ireg = 1,global%nRegions
561 IF (regions(ireg)%procid==global%myProcid .AND. &
562 regions(ireg)%active==active)
THEN
564 grid => regions(ireg)%levels(ilev)%grid
565 DO nreg = 1,global%nRegions
566 grid%nCorns(nreg) = ivar(nreg)
569 ALLOCATE(
grid%ijkCorn( regnc,global%nRegions),stat=errfl )
571 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
573 ALLOCATE(
grid%regCorn( 3,regnc,global%nRegions),stat=errfl )
575 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
577 ALLOCATE(
grid%regCornOld( 3,regnc,global%nRegions),stat=errfl )
579 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
581 ALLOCATE(
grid%regCornOrig(3,regnc,global%nRegions),stat=errfl )
583 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
585 ALLOCATE(
grid%nghbor( 3,global%moveGridNbour,regnc),stat=errfl )
587 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
589 DO l = 1,
grid%nCorns(ireg)
590 grid%ijkCorn(l,ireg) = ijkcorn(l,ireg)
595 ALLOCATE(
grid%nShared( regnc),stat=errfl )
597 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
599 ALLOCATE(
grid%regCornBuff(3,regnc,global%nRegions),stat=errfl )
601 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
603 ALLOCATE(
grid%regCornOrth(3,regnc,global%nRegions),stat=errfl )
605 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
612 DEALLOCATE( ivar,stat=errfl )
614 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
642 #include "Indexing.h"
645 TYPE(t_region
),
POINTER :: regions(:)
646 INTEGER :: iselect, iter
649 INTEGER ::
i, l, ireg
652 INTEGER :: ilev, ncorns, errfl
653 INTEGER,
ALLOCATABLE :: corner(:)
655 REAL(RFREAL),
ALLOCATABLE :: rvar(:,:,:)
656 REAL(RFREAL),
POINTER :: dxyz(:,:), xyzold(:,:)
663 global => regions(1)%global
666 'RFLO_ModMoveGridNconform4.F90' )
670 ALLOCATE( rvar(xcoord:zcoord,global%moveGridRegNc,global%nRegions), &
673 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
678 DO ireg = 1,global%nRegions
679 IF (regions(ireg)%procid==global%myProcid .AND. &
680 regions(ireg)%active==active)
THEN
682 grid => regions(ireg)%levels(ilev)%grid
683 gridold => regions(ireg)%levels(ilev)%gridOld
686 xyzold => gridold%xyz
687 ncorns =
grid%nCorns(ireg)
689 ALLOCATE( corner(ncorns), stat=errfl )
691 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
694 corner(l) =
grid%ijkCorn(l,ireg)
704 grid%regCornOrig(xcoord,
i,ireg) = dxyz(xcoord,corner(
i))
705 grid%regCornOrig(ycoord,
i,ireg) = dxyz(ycoord,corner(
i))
706 grid%regCornOrig(zcoord,
i,ireg) = dxyz(zcoord,corner(
i))
707 rvar(:,
i,ireg) =
grid%regCornOrig(:,
i,ireg)
709 ELSEIF (iselect==1)
THEN
711 grid%regCornOld(xcoord,
i,ireg) = dxyz(xcoord,corner(
i))
712 grid%regCornOld(ycoord,
i,ireg) = dxyz(ycoord,corner(
i))
713 grid%regCornOld(zcoord,
i,ireg) = dxyz(zcoord,corner(
i))
714 rvar(:,
i,ireg) =
grid%regCornOld(:,
i,ireg)
720 rvar(:,:,ireg) =
grid%regCornOld(:,:,ireg)
727 grid%regCornBuff(:,
i,ireg) = xyzold(:,corner(
i))
728 rvar(:,
i,ireg) =
grid%regCornBuff(:,
i,ireg)
733 rvar(:,
i,ireg) =
grid%regCornOrth(:,
i,ireg)
737 DEALLOCATE( corner, stat=errfl )
739 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
745 DO ireg = 1,global%nRegions
746 ncorns = global%moveGridRegNc
748 CALL mpi_bcast( rvar(xcoord:zcoord,1:ncorns,ireg),3*ncorns, &
749 mpi_rfreal,regions(ireg)%procId,global%mpiComm,global%mpierr )
750 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,__line__ )
752 CALL mpi_barrier( global%mpiComm,global%mpierr )
754 DO ireg = 1,global%nRegions
755 IF (regions(ireg)%procid==global%myProcid .AND. &
756 regions(ireg)%active==active)
THEN
758 grid => regions(ireg)%levels(ilev)%grid
761 DO l=1,global%nRegions
762 grid%regCornOrig(:,:,l) = rvar(:,:,l)
764 ELSEIF (iselect==1)
THEN
765 DO l=1,global%nRegions
766 grid%regCornOld(:,:,l) = rvar(:,:,l)
771 DO l=1,global%nRegions
772 grid%regCornOld(:,:,l) = rvar(:,:,l)
777 DO l=1,global%nRegions
778 grid%regCornBuff(:,:,l) = rvar(:,:,l)
782 DO l=1,global%nRegions
783 grid%regCornOrth(:,:,l) = rvar(:,:,l)
804 DEALLOCATE( rvar,stat=errfl )
806 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
834 #include "Indexing.h"
837 TYPE(t_region
),
POINTER :: regions(:)
840 INTEGER ::
i,
j,
k, ipatch,
ic, ireg, nc, nreg
843 INTEGER,
PARAMETER :: nsharedmax=16
847 INTEGER :: regnc, ncorns, nbour, nshared, nsmax
848 INTEGER :: ijknode(4), inoff, ijnoff, lbound, errfl
849 INTEGER,
ALLOCATABLE :: ncmin(:), nregmin(:), cshared(:,:,:)
850 REAL(RFREAL) :: edgelen, ds, tol
851 REAL(RFREAL),
POINTER :: xyz(:,:)
852 REAL(RFREAL),
ALLOCATABLE ::
dist(:,:), distmin(:)
860 global => regions(1)%global
863 'RFLO_ModMoveGridNconform4.F90' )
867 global%MoveGridNsharedMax = nsharedmax
868 nbour = global%moveGridNbour
869 regnc = global%moveGridRegNc
872 ALLOCATE( ncmin(nbour), stat=errfl );
IF (errfl>0) goto 88
873 ALLOCATE( nregmin(nbour), stat=errfl );
IF (errfl>0) goto 88
874 ALLOCATE( distmin(nbour), stat=errfl );
IF (errfl>0) goto 88
875 ALLOCATE(
dist(regnc,global%nRegions), stat=errfl );
IF (errfl>0) goto 88
876 ALLOCATE( cshared(2,nsharedmax,regnc), stat=errfl );
IF (errfl>0) goto 88
878 DO ireg = 1,global%nRegions
879 IF (regions(ireg)%procid==global%myProcid .AND. &
880 regions(ireg)%active==active)
THEN
882 grid => regions(ireg)%levels(ilev)%grid
884 ncorns =
grid%nCorns(ireg)
892 xyz => regions(ireg)%levels(ilev)%grid%xyz
896 edgelen = 1.e+30_rfreal
901 ijknode(1) = indijk(
i ,
j ,
k ,inoff,ijnoff)
902 ijknode(2) = indijk(
i+1,
j ,
k ,inoff,ijnoff)
903 ijknode(3) = indijk(
i ,
j+1,
k ,inoff,ijnoff)
904 ijknode(4) = indijk(
i ,
j ,
k+1,inoff,ijnoff)
905 ds =
sqrt((xyz(xcoord,ijknode(2))-xyz(xcoord,ijknode(1)))**2+ &
906 (xyz(ycoord,ijknode(2))-xyz(ycoord,ijknode(1)))**2+ &
907 (xyz(zcoord,ijknode(2))-xyz(zcoord,ijknode(1)))**2)
908 edgelen =
min(edgelen,ds)
909 ds =
sqrt((xyz(xcoord,ijknode(3))-xyz(xcoord,ijknode(1)))**2+ &
910 (xyz(ycoord,ijknode(3))-xyz(ycoord,ijknode(1)))**2+ &
911 (xyz(zcoord,ijknode(3))-xyz(zcoord,ijknode(1)))**2)
912 edgelen =
min(edgelen,ds)
913 ds =
sqrt((xyz(xcoord,ijknode(4))-xyz(xcoord,ijknode(1)))**2+ &
914 (xyz(ycoord,ijknode(4))-xyz(ycoord,ijknode(1)))**2+ &
915 (xyz(zcoord,ijknode(4))-xyz(zcoord,ijknode(1)))**2)
916 edgelen =
min(edgelen,ds)
920 tol = 1.e-5_rfreal*edgelen
925 distmin(1:nbour) = 1.e+30_rfreal
929 DO nreg = 1,global%nRegions
930 DO nc = 1,
grid%nCorns(nreg)
931 dist(nc,nreg) =
sqrt((
grid%regCornOrig(xcoord,nc,nreg)- &
932 grid%regCornOrig(xcoord,
ic,ireg))**2 + &
933 (
grid%regCornOrig(ycoord,nc,nreg)- &
934 grid%regCornOrig(ycoord,
ic,ireg))**2 + &
935 (
grid%regCornOrig(zcoord,nc,nreg)- &
936 grid%regCornOrig(zcoord,
ic,ireg))**2)
950 IF (
dist(nc,nreg)<distmin(1) .AND.
dist(nc,nreg)>edgelen)
THEN
952 distmin(
k) = distmin(
k-1)
953 ncmin(
k) = ncmin(
k-1)
954 nregmin(
k) = nregmin(
k-1)
956 distmin(1) =
dist(nc,nreg)
962 IF (
dist(nc,nreg) > (distmin(
k-1) + tol) .AND. &
963 dist(nc,nreg) < (distmin(
k) - tol))
THEN
968 distmin(
j) = distmin(
j-1)
969 ncmin(
j) = ncmin(
j-1)
970 nregmin(
j) = nregmin(
j-1)
972 distmin(
k) =
dist(nc,nreg)
979 IF (
dist(nc,nreg)<edgelen)
THEN
981 IF (nshared > nsharedmax)
THEN
982 CALL
errorstop( global,err_illegal_value,__line__, &
983 'too low nSharedMax in RFLO_MgFrameSrchNeighbors')
985 cshared(1,nshared,
ic) = nc
986 cshared(2,nshared,
ic) = nreg
992 grid%nShared(
ic) = nshared
993 nsmax =
max( nsmax,nshared )
1005 grid%nghbor(3,:,:) = 1
1009 ALLOCATE(
grid%cshared(2,nsmax,regnc),stat=errfl )
1010 global%error = errfl
1011 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
1012 grid%cshared(1:2,1:nsmax,1:ncorns) = cshared(1:2,1:nsmax,1:ncorns)
1019 DEALLOCATE( ncmin, stat=errfl );
IF (errfl>0) goto 99
1020 DEALLOCATE( nregmin, stat=errfl );
IF (errfl>0) goto 99
1021 DEALLOCATE( distmin, stat=errfl );
IF (errfl>0) goto 99
1022 DEALLOCATE(
dist, stat=errfl );
IF (errfl>0) goto 99
1023 DEALLOCATE( cshared, stat=errfl );
IF (errfl>0) goto 99
1027 DO ireg = 1,global%nRegions
1028 IF (regions(ireg)%procid==global%myProcid .AND. &
1029 regions(ireg)%active==active)
THEN
1031 grid => regions(ireg)%levels(ilev)%grid
1034 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(1)%interact).OR. &
1035 (.NOT. regions(ireg)%levels(ilev)%edgeCells(1)%interact).OR. &
1036 (.NOT. regions(ireg)%levels(ilev)%edgeCells(4)%interact).OR. &
1037 (.NOT. regions(ireg)%levels(ilev)%edgeCells(9)%interact)) &
1038 grid%nghbor(3,1:nbour,1) = 0
1041 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(2)%interact).OR. &
1042 (.NOT. regions(ireg)%levels(ilev)%edgeCells(1)%interact).OR. &
1043 (.NOT. regions(ireg)%levels(ilev)%edgeCells(2)%interact).OR. &
1044 (.NOT. regions(ireg)%levels(ilev)%edgeCells(10)%interact)) &
1045 grid%nghbor(3,1:nbour,2) = 0
1048 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(3)%interact).OR. &
1049 (.NOT. regions(ireg)%levels(ilev)%edgeCells(2)%interact).OR. &
1050 (.NOT. regions(ireg)%levels(ilev)%edgeCells(3)%interact).OR. &
1051 (.NOT. regions(ireg)%levels(ilev)%edgeCells(11)%interact)) &
1052 grid%nghbor(3,1:nbour,3) = 0
1055 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(4)%interact).OR. &
1056 (.NOT. regions(ireg)%levels(ilev)%edgeCells(3)%interact).OR. &
1057 (.NOT. regions(ireg)%levels(ilev)%edgeCells(4)%interact).OR. &
1058 (.NOT. regions(ireg)%levels(ilev)%edgeCells(12)%interact)) &
1059 grid%nghbor(3,1:nbour,4) = 0
1062 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(5)%interact).OR. &
1063 (.NOT. regions(ireg)%levels(ilev)%edgeCells(5)%interact).OR. &
1064 (.NOT. regions(ireg)%levels(ilev)%edgeCells(8)%interact).OR. &
1065 (.NOT. regions(ireg)%levels(ilev)%edgeCells(9)%interact)) &
1066 grid%nghbor(3,1:nbour,5) = 0
1069 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(6)%interact).OR. &
1070 (.NOT. regions(ireg)%levels(ilev)%edgeCells(5)%interact).OR. &
1071 (.NOT. regions(ireg)%levels(ilev)%edgeCells(6)%interact).OR. &
1072 (.NOT. regions(ireg)%levels(ilev)%edgeCells(10)%interact)) &
1073 grid%nghbor(3,1:nbour,6) = 0
1076 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(7)%interact).OR. &
1077 (.NOT. regions(ireg)%levels(ilev)%edgeCells(6)%interact).OR. &
1078 (.NOT. regions(ireg)%levels(ilev)%edgeCells(7)%interact).OR. &
1079 (.NOT. regions(ireg)%levels(ilev)%edgeCells(11)%interact)) &
1080 grid%nghbor(3,1:nbour,7) = 0
1083 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(8)%interact).OR. &
1084 (.NOT. regions(ireg)%levels(ilev)%edgeCells(7)%interact).OR. &
1085 (.NOT. regions(ireg)%levels(ilev)%edgeCells(8)%interact).OR. &
1086 (.NOT. regions(ireg)%levels(ilev)%edgeCells(12)%interact)) &
1087 grid%nghbor(3,1:nbour,8) = 0
1094 DO ireg = 1,global%nRegions
1095 IF (regions(ireg)%procid==global%myProcid .AND. &
1096 regions(ireg)%active==active)
THEN
1098 grid => regions(ireg)%levels(ilev)%grid
1102 DO ipatch=1,regions(ireg)%nPatches
1103 patch => regions(ireg)%levels(ilev)%patches(ipatch)
1104 lbound =
patch%lbound
1105 bctype =
patch%bcType
1110 IF ((bctype>=bc_inflow .AND. bctype<=bc_inflow +bc_range) .OR. &
1111 (bctype>=bc_outflow .AND. bctype<=bc_outflow +bc_range) .OR. &
1112 (bctype>=bc_slipwall .AND. bctype<=bc_slipwall +bc_range) .OR. &
1113 (bctype>=bc_noslipwall .AND. bctype<=bc_noslipwall+bc_range) .OR. &
1114 (bctype>=bc_farfield .AND. bctype<=bc_farfield +bc_range) .OR. &
1115 (bctype>=bc_injection .AND. bctype<=bc_injection +bc_range) .OR. &
1116 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR. &
1117 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range))
THEN
1118 IF (lbound==1 .OR. lbound==2)
THEN
1120 ijknode(2) = indijk(
ibeg,
jbeg,kend,inoff,ijnoff)
1121 ijknode(3) = indijk(
ibeg,
jend,kend,inoff,ijnoff)
1123 ELSEIF (lbound==3 .OR. lbound==4)
THEN
1125 ijknode(2) = indijk(
ibeg,
jbeg,kend,inoff,ijnoff)
1126 ijknode(3) = indijk(
iend,
jbeg,kend,inoff,ijnoff)
1128 ELSEIF (lbound==5 .OR. lbound==6)
THEN
1134 DO ic = 1,
grid%nCorns(ireg)
1135 IF (ijknode(1)==
grid%ijkCorn(
ic,ireg) .OR. &
1136 ijknode(2)==
grid%ijkCorn(
ic,ireg) .OR. &
1137 ijknode(3)==
grid%ijkCorn(
ic,ireg) .OR. &
1138 ijknode(4)==
grid%ijkCorn(
ic,ireg))
grid%nghbor(3,1:nbour,
ic)= 2
1148 DO ireg = 1,global%nRegions
1149 IF (regions(ireg)%procid==global%myProcid .AND. &
1150 regions(ireg)%active==active)
THEN
1152 grid => regions(ireg)%levels(ilev)%grid
1156 DO ipatch=1,regions(ireg)%nPatches
1157 patch => regions(ireg)%levels(ilev)%patches(ipatch)
1158 lbound =
patch%lbound
1159 bctype =
patch%bcType
1164 IF (
patch%bcMotion == bc_external)
THEN
1165 IF (lbound==1 .OR. lbound==2)
THEN
1167 ijknode(2) = indijk(
ibeg,
jbeg,kend,inoff,ijnoff)
1168 ijknode(3) = indijk(
ibeg,
jend,kend,inoff,ijnoff)
1170 ELSEIF (lbound==3 .OR. lbound==4)
THEN
1172 ijknode(2) = indijk(
ibeg,
jbeg,kend,inoff,ijnoff)
1173 ijknode(3) = indijk(
iend,
jbeg,kend,inoff,ijnoff)
1175 ELSEIF (lbound==5 .OR. lbound==6)
THEN
1181 DO ic = 1,
grid%nCorns(ireg)
1182 IF (ijknode(1)==
grid%ijkCorn(
ic,ireg) .OR. &
1183 ijknode(2)==
grid%ijkCorn(
ic,ireg) .OR. &
1184 ijknode(3)==
grid%ijkCorn(
ic,ireg) .OR. &
1185 ijknode(4)==
grid%ijkCorn(
ic,ireg))
grid%nghbor(3,1:nbour,
ic)= 0
1209 global%error = errfl
1210 CALL
errorstop( global,err_allocate,__line__ )
1214 global%error = errfl
1215 CALL
errorstop( global,err_deallocate,__line__ )
1243 #include "Indexing.h"
1246 TYPE(t_region
),
POINTER :: regions(:)
1249 INTEGER ::
i,
j,
k,
ic, ireg, nc, nreg, lc, lreg
1253 INTEGER :: ijknode(4), inoff, ijnoff, errfl
1254 REAL(RFREAL) :: edgelen, ds, du2, dumax
1255 REAL(RFREAL),
POINTER :: xyz(:,:)
1256 REAL(RFREAL),
ALLOCATABLE ::
dist(:,:)
1264 global => regions(1)%global
1267 'RFLO_ModMoveGridNconform4.F90' )
1271 ALLOCATE(
dist(global%moveGridRegNc,global%nRegions), stat=errfl )
1272 IF (errfl>0) goto 88
1276 DO ireg = 1,global%nRegions
1277 IF (regions(ireg)%procid==global%myProcid .AND. &
1278 regions(ireg)%active==active)
THEN
1280 grid => regions(ireg)%levels(ilev)%grid
1286 xyz => regions(ireg)%levels(ilev)%gridOld%xyz
1290 edgelen = 1.e+30_rfreal
1295 ijknode(1) = indijk(
i ,
j ,
k ,inoff,ijnoff)
1296 ijknode(2) = indijk(
i+1,
j ,
k ,inoff,ijnoff)
1297 ijknode(3) = indijk(
i ,
j+1,
k ,inoff,ijnoff)
1298 ijknode(4) = indijk(
i ,
j ,
k+1,inoff,ijnoff)
1299 ds =
sqrt((xyz(xcoord,ijknode(2))-xyz(xcoord,ijknode(1)))**2+ &
1300 (xyz(ycoord,ijknode(2))-xyz(ycoord,ijknode(1)))**2+ &
1301 (xyz(zcoord,ijknode(2))-xyz(zcoord,ijknode(1)))**2)
1302 edgelen =
min(edgelen,ds)
1303 ds =
sqrt((xyz(xcoord,ijknode(3))-xyz(xcoord,ijknode(1)))**2+ &
1304 (xyz(ycoord,ijknode(3))-xyz(ycoord,ijknode(1)))**2+ &
1305 (xyz(zcoord,ijknode(3))-xyz(zcoord,ijknode(1)))**2)
1306 edgelen =
min(edgelen,ds)
1307 ds =
sqrt((xyz(xcoord,ijknode(4))-xyz(xcoord,ijknode(1)))**2+ &
1308 (xyz(ycoord,ijknode(4))-xyz(ycoord,ijknode(1)))**2+ &
1309 (xyz(zcoord,ijknode(4))-xyz(zcoord,ijknode(1)))**2)
1310 edgelen =
min(edgelen,ds)
1315 DO ic = 1,
grid%nCorns(ireg)
1316 DO k = 1,global%moveGridNbour
1319 dumax = -1.e+20_rfreal
1321 DO lreg = 1,global%nRegions
1322 DO lc = 1,
grid%nCorns(lreg)
1323 dist(lc,lreg) =
sqrt((
grid%regCornOrig(xcoord,nc,nreg)- &
1324 grid%regCornOrig(xcoord,lc,lreg))**2 + &
1325 (
grid%regCornOrig(ycoord,nc,nreg)- &
1326 grid%regCornOrig(ycoord,lc,lreg))**2 + &
1327 (
grid%regCornOrig(zcoord,nc,nreg)- &
1328 grid%regCornOrig(zcoord,lc,lreg))**2)
1330 IF (
dist(lc,lreg) < 0.1_rfreal*edgelen)
THEN
1331 du2 =
grid%regCornOld(xcoord,lc,lreg)**2 + &
1332 grid%regCornOld(ycoord,lc,lreg)**2 + &
1333 grid%regCornOld(zcoord,lc,lreg)**2
1335 IF ( du2 > dumax )
THEN
1351 DEALLOCATE(
dist, stat=errfl );
IF (errfl>0) goto 99
1359 global%error = errfl
1360 CALL
errorstop( global,err_allocate,__line__ )
1364 global%error = errfl
1365 CALL
errorstop( global,err_deallocate,__line__ )
1392 #include "Indexing.h"
1395 TYPE(t_region
),
POINTER :: regions(:)
1398 INTEGER :: ireg, ico,
k, l
1401 INTEGER :: ilev, interior, ijkcorn, nbour, errfl
1403 INTEGER,
ALLOCATABLE :: nco(:), nreg(:)
1404 REAL(RFREAL) :: rdenom, amp(3), pow,
sum
1405 REAL(RFREAL),
ALLOCATABLE ::
dist(:), wght(:)
1412 global => regions(1)%global
1415 'RFLO_ModMoveGridNconform4.F90' )
1420 amp(1) = global%moveGridAmplifX
1421 amp(2) = global%moveGridAmplifY
1422 amp(3) = global%moveGridAmplifZ
1423 pow = global%moveGridPower
1424 nbour = global%moveGridNbour
1426 ALLOCATE( nco(nbour), stat=errfl );
IF (errfl>0) goto 88
1427 ALLOCATE( nreg(nbour), stat=errfl );
IF (errfl>0) goto 88
1429 ALLOCATE(
dist(nbour), stat=errfl );
IF (errfl>0) goto 88
1430 ALLOCATE( wght(nbour), stat=errfl );
IF (errfl>0) goto 88
1432 DO ireg = 1,global%nRegions
1433 IF (regions(ireg)%procid==global%myProcid .AND. &
1434 regions(ireg)%active==active)
THEN
1436 grid => regions(ireg)%levels(ilev)%grid
1438 DO ico = 1,
grid%nCorns(ireg)
1439 nco(1:nbour) =
grid%nghbor(1,1:nbour,ico)
1440 nreg(1:nbour) =
grid%nghbor(2,1:nbour,ico)
1441 interior =
grid%nghbor(3,1 ,ico)
1443 IF (interior==1)
THEN
1445 dist(
k) = (
grid%regCornOrig(xcoord,nco(
k),nreg(
k)) - &
1446 grid%regCornOrig(xcoord,ico,ireg))**2 + &
1447 (
grid%regCornOrig(ycoord,nco(
k),nreg(
k)) - &
1448 grid%regCornOrig(ycoord,ico,ireg))**2 + &
1449 (
grid%regCornOrig(zcoord,nco(
k),nreg(
k)) - &
1450 grid%regCornOrig(zcoord,ico,ireg))**2
1458 rdenom = 1._rfreal/
sum
1464 CALL
errorstop( global,err_illegal_value,__line__, &
1465 'invalid weights for global frame motion')
1470 sum =
sum + wght(l)*
grid%regCornOld(xcoord,nco(l),nreg(l))
1472 grid%regCorn(xcoord,ico,ireg) =
sum
1476 sum =
sum + wght(l)*
grid%regCornOld(ycoord,nco(l),nreg(l))
1478 grid%regCorn(ycoord,ico,ireg) =
sum
1482 sum =
sum + wght(l)*
grid%regCornOld(zcoord,nco(l),nreg(l))
1484 grid%regCorn(zcoord,ico,ireg) =
sum
1491 DO ireg = 1,global%nRegions
1492 IF (regions(ireg)%procid==global%myProcid .AND. &
1493 regions(ireg)%active==active)
THEN
1495 grid => regions(ireg)%levels(ilev)%grid
1497 DO ico = 1,
grid%nCorns(ireg)
1498 interior =
grid%nghbor(3, 1, ico)
1499 IF (interior==1)
THEN
1500 grid%regCornOld(xcoord,ico,ireg)=amp(1)*
grid%regCorn(xcoord,ico,ireg)
1501 grid%regCornOld(ycoord,ico,ireg)=amp(2)*
grid%regCorn(ycoord,ico,ireg)
1502 grid%regCornOld(zcoord,ico,ireg)=amp(3)*
grid%regCorn(zcoord,ico,ireg)
1504 ijkcorn =
grid%ijkCorn(ico,ireg)
1505 grid%xyz(xcoord,ijkcorn) =
grid%regCornOld(xcoord,ico,ireg)
1506 grid%xyz(ycoord,ijkcorn) =
grid%regCornOld(ycoord,ico,ireg)
1507 grid%xyz(zcoord,ijkcorn) =
grid%regCornOld(zcoord,ico,ireg)
1516 DEALLOCATE( nco, stat=errfl );
IF (errfl>0) goto 99
1517 DEALLOCATE( nreg, stat=errfl );
IF (errfl>0) goto 99
1519 DEALLOCATE(
dist, stat=errfl );
IF (errfl>0) goto 99
1520 DEALLOCATE( wght, stat=errfl );
IF (errfl>0) goto 99
1528 global%error = errfl
1529 CALL
errorstop( global,err_allocate,__line__ )
1533 global%error = errfl
1534 CALL
errorstop( global,err_deallocate,__line__ )
1564 #include "Indexing.h"
1567 TYPE(t_region
),
POINTER :: regions(:)
1570 INTEGER :: ireg, ico, lb, mc,
k
1573 INTEGER :: ilev, interior, ijkcorn, ind(6,4,4), kf, nc, nreg
1574 INTEGER :: lbb, lbe, orthdir
1575 REAL(RFREAL) :: rlen, eps, orthwg(xcoord:zcoord)
1576 REAL(RFREAL) :: dif(xcoord:zcoord), shift(xcoord:zcoord)
1577 REAL(RFREAL) :: s1(xcoord:zcoord), s2(xcoord:zcoord), s3(xcoord:zcoord)
1578 REAL(RFREAL),
POINTER :: cbuff(:,:,:), corth(:,:,:)
1586 global => regions(1)%global
1589 'RFLO_ModMoveGridNconform4.F90' )
1597 ind(1, 1,:) = (/5, 1, 4, 2/)
1598 ind(1, 2,:) = (/6, 2, 1, 3/)
1599 ind(1, 3,:) = (/7, 3, 2, 4/)
1600 ind(1, 4,:) = (/8, 4, 3, 1/)
1601 ind(2, 1,:) = (/1, 5, 6, 8/)
1602 ind(2, 2,:) = (/2, 6, 7, 5/)
1603 ind(2, 3,:) = (/3, 7, 8, 6/)
1604 ind(2, 4,:) = (/4, 8, 5, 7/)
1605 ind(3, 1,:) = (/4, 1, 2, 5/)
1606 ind(3, 2,:) = (/8, 5, 1, 6/)
1607 ind(3, 3,:) = (/7, 6, 5, 2/)
1608 ind(3, 4,:) = (/3, 2, 6, 1/)
1609 ind(4, 1,:) = (/1, 4, 8, 3/)
1610 ind(4, 2,:) = (/5, 8, 7, 4/)
1611 ind(4, 3,:) = (/6, 7, 3, 8/)
1612 ind(4, 4,:) = (/2, 3, 4, 7/)
1613 ind(5, 1,:) = (/2, 1, 5, 4/)
1614 ind(5, 2,:) = (/3, 4, 1, 8/)
1615 ind(5, 3,:) = (/7, 8, 4, 5/)
1616 ind(5, 4,:) = (/6, 5, 8, 1/)
1617 ind(6, 1,:) = (/1, 2, 3, 6/)
1618 ind(6, 2,:) = (/4, 3, 7, 2/)
1619 ind(6, 3,:) = (/8, 7, 6, 3/)
1620 ind(6, 4,:) = (/5, 6, 2, 7/)
1624 orthdir = global%moveGridOrthDir
1625 orthwg(xcoord) = global%moveGridOrthWghtX *(1._rfreal + global%skewness)
1626 orthwg(ycoord) = global%moveGridOrthWghtY *(1._rfreal + global%skewness)
1627 orthwg(zcoord) = global%moveGridOrthWghtZ *(1._rfreal + global%skewness)
1635 DO ireg = 1,global%nRegions
1636 IF (regions(ireg)%procid==global%myProcid .AND. &
1637 regions(ireg)%active==active)
THEN
1639 grid => regions(ireg)%levels(ilev)%grid
1640 cbuff =>
grid%regCornBuff
1641 corth =>
grid%regCornOrth
1647 IF (
grid%boundMoved(lb)) solidreg = .true.
1650 IF (orthdir==off)
THEN
1653 ELSEIF (orthdir==icoord)
THEN
1656 ELSEIF (orthdir==jcoord)
THEN
1659 ELSEIF (orthdir==kcoord)
THEN
1668 IF (
grid%boundMoved(lb))
THEN
1672 rlen =
sqrt( (cbuff(xcoord,ind(lb,mc,1),ireg)- &
1673 cbuff(xcoord,ind(lb,mc,2),ireg))**2 + &
1674 (cbuff(ycoord,ind(lb,mc,1),ireg)- &
1675 cbuff(ycoord,ind(lb,mc,2),ireg))**2 + &
1676 (cbuff(zcoord,ind(lb,mc,1),ireg)- &
1677 cbuff(zcoord,ind(lb,mc,2),ireg))**2 )
1678 s1(:) = cbuff(:,ind(lb,mc,3),ireg)-cbuff(:,ind(lb,mc,2),ireg)
1679 s2(:) = cbuff(:,ind(lb,mc,4),ireg)-cbuff(:,ind(lb,mc,2),ireg)
1681 corth(:,ind(lb,mc,1),ireg) = cbuff(:,ind(lb,mc,2),ireg)+ &
1694 DO ireg = 1,global%nRegions
1695 IF (regions(ireg)%procid==global%myProcid .AND. &
1696 regions(ireg)%active==active)
THEN
1698 grid => regions(ireg)%levels(ilev)%grid
1699 cbuff =>
grid%regCornBuff
1700 corth =>
grid%regCornOrth
1702 DO ico = 1,
grid%nCorns(ireg)
1703 interior =
grid%nghbor(3, 1, ico)
1705 IF (interior==1)
THEN
1706 ijkcorn =
grid%ijkCorn(ico,ireg)
1709 eps = 10._rfreal*epsilon( 1._rfreal )
1711 DO k = 1,
grid%nshared(ico)
1712 nc =
grid%cshared(1,
k,ico)
1713 nreg =
grid%cshared(2,
k,ico)
1714 dif(:) = corth(:,nc,nreg) - cbuff(:,nc,nreg)
1715 IF ((abs(dif(xcoord)) > eps) .OR. &
1716 (abs(dif(ycoord)) > eps) .OR. &
1717 (abs(dif(zcoord)) > eps)) kf = kf+1
1718 shift(:) = shift(:) + dif(:)
1720 IF ((abs(shift(xcoord)) > eps) .OR. &
1721 (abs(shift(ycoord)) > eps) .OR. &
1722 (abs(shift(zcoord)) > eps))
THEN
1725 IF ((abs(
grid%regCornOld(xcoord,ico,ireg)) > eps) .OR. &
1726 (abs(
grid%regCornOld(ycoord,ico,ireg)) > eps) .OR. &
1727 (abs(
grid%regCornOld(zcoord,ico,ireg)) > eps))
THEN
1728 grid%regCornOld(:,ico,ireg) = (1._rfreal-orthwg(:))* &
1729 grid%regCornOld(:,ico,ireg) + &
1730 orthwg(:)*shift(:)/kf
1732 grid%regCornOld(:,ico,ireg) = shift(:)/kf
1736 ijkcorn =
grid%ijkCorn(ico,ireg)
1737 grid%xyz(xcoord,ijkcorn) =
grid%regCornOld(xcoord,ico,ireg)
1738 grid%xyz(ycoord,ijkcorn) =
grid%regCornOld(ycoord,ico,ireg)
1739 grid%xyz(zcoord,ijkcorn) =
grid%regCornOld(zcoord,ico,ireg)
1779 LOGICAL :: somemoved
1782 TYPE(t_region
),
POINTER :: regions(:)
1785 INTEGER :: ireg, iter, ipatch,
i,
j,
k, ijkn
1788 INTEGER :: ilev, bctype
1796 global => regions(1)%global
1799 'RFLO_ModMoveGridNconform4.F90' )
1806 DO ireg=1,global%nRegions
1807 IF (regions(ireg)%procid==global%myProcid .AND. &
1808 regions(ireg)%active==active .AND. &
1809 regions(ireg)%mixtInput%moveGrid)
THEN
1811 grid => regions(ireg)%levels(ilev)%grid
1812 gridold => regions(ireg)%levels(ilev)%gridOld
1817 gridold%indSvel =
grid%indSvel
1818 gridold%ipc =
grid%ipc
1819 gridold%jpc =
grid%jpc
1820 gridold%kpc =
grid%kpc
1821 gridold%xyz(:,:) =
grid%xyz(:,:)
1822 gridold%si(:,:) =
grid%si(:,:)
1823 gridold%sj(:,:) =
grid%sj(:,:)
1824 gridold%sk(:,:) =
grid%sk(:,:)
1825 gridold%vol(:) =
grid%vol(:)
1855 DO ireg=1,global%nRegions
1856 IF (regions(ireg)%procid==global%myProcid .AND. &
1857 regions(ireg)%active==active .AND. &
1858 regions(ireg)%mixtInput%moveGrid)
THEN
1860 grid => regions(ireg)%levels(ilev)%grid
1861 gridold => regions(ireg)%levels(ilev)%gridOld
1869 gridold%xyzOld,
grid%xyz )
1886 gridold%xyzOld,
grid%xyz )
1919 #include "Indexing.h"
1922 TYPE(t_region
) :: region
1925 INTEGER :: ireg, ipatch,
i,
j,
k
1928 INTEGER :: ilev, ijkn, lbound
1936 global => region%global
1939 'RFLO_ModMoveGridNconform4.F90' )
1946 grid => region%levels(ilev)%grid
1950 DO ipatch=1,region%nPatches
1951 patch => region%levels(ilev)%patches(ipatch)
1952 lbound =
patch%lbound
1954 IF (
patch%bcMotion == bc_external .AND. &
1955 (
grid%allExternal(lbound).EQV..false.))
THEN
1963 ijkn = indijk(
i,
j,
k,inoff,ijnoff)
1964 grid%xyz(xcoord,ijkn) =
grid%xyzOld(xcoord,ijkn)
1965 grid%xyz(ycoord,ijkn) =
grid%xyzOld(ycoord,ijkn)
1966 grid%xyz(zcoord,ijkn) =
grid%xyzOld(zcoord,ijkn)
2004 arclen12,arclen34,arclen56,xyzold,dnode )
2010 #include "Indexing.h"
2013 LOGICAL :: boundmoved(6), allexternal(6), edgemoved(12)
2016 REAL(RFREAL),
POINTER :: arclen12(:,:), arclen34(:,:), arclen56(:,:)
2017 REAL(RFREAL),
POINTER :: dnode(:,:), xyzold(:,:)
2019 TYPE(t_region
) :: region
2022 INTEGER :: iedge, ind
2026 INTEGER :: indbeg, indend, ijkn, ijkn1, ijknbeg, ijknend, inoff, ijnoff
2027 INTEGER :: switch(12,11), intertype, iedgeglo
2029 REAL(RFREAL) :: arclen, ds,
s, dn(3), dnbeg(3), dnend(3)
2035 'RFLO_ModMoveGridNconform4.F90' )
2057 switch( 1,:) = (/5, 6, 1, 3, 56,
kpnbeg, kpnend,
ipnbeg,
jpnbeg, 1, 2/)
2058 switch( 2,:) = (/3, 4, 1, 6, 34,
jpnbeg,
jpnend, kpnend,
ipnbeg, 2, 3/)
2059 switch( 3,:) = (/5, 6, 1, 4, 56,
kpnbeg, kpnend,
ipnbeg,
jpnend, 4, 3/)
2060 switch( 4,:) = (/3, 4, 1, 5, 34,
jpnbeg,
jpnend,
kpnbeg,
ipnbeg, 1, 4/)
2061 switch( 5,:) = (/5, 6, 2, 3, 56,
kpnbeg, kpnend,
ipnend,
jpnbeg, 5, 6/)
2062 switch( 6,:) = (/3, 4, 2, 6, 34,
jpnbeg,
jpnend, kpnend,
ipnend, 6, 7/)
2063 switch( 7,:) = (/5, 6, 2, 4, 56,
kpnbeg, kpnend,
ipnend,
jpnend, 8, 7/)
2064 switch( 8,:) = (/3, 4, 2, 5, 34,
jpnbeg,
jpnend,
kpnbeg,
ipnend, 5, 8/)
2065 switch( 9,:) = (/1, 2, 3, 5, 12,
ipnbeg,
ipnend,
jpnbeg,
kpnbeg, 1, 5/)
2066 switch(10,:) = (/1, 2, 3, 6, 12,
ipnbeg,
ipnend,
jpnbeg, kpnend, 2, 6/)
2067 switch(11,:) = (/1, 2, 4, 5, 12,
ipnbeg,
ipnend,
jpnend,
kpnbeg, 4, 8/)
2068 switch(12,:) = (/1, 2, 4, 6, 12,
ipnbeg,
ipnend,
jpnend, kpnend, 3, 7/)
2072 edgemoved(:) = .false.
2075 IF (boundmoved(1) .AND. allexternal(1))
THEN
2076 edgemoved( 1) = .true.; edgemoved( 2) = .true.
2077 edgemoved( 3) = .true.; edgemoved( 4) = .true.
2079 IF (boundmoved(2) .AND. allexternal(2))
THEN
2080 edgemoved( 5) = .true.; edgemoved( 6) = .true.
2081 edgemoved( 7) = .true.; edgemoved( 8) = .true.
2083 IF (boundmoved(3) .AND. allexternal(3))
THEN
2084 edgemoved( 1) = .true.; edgemoved( 5) = .true.
2085 edgemoved( 9) = .true.; edgemoved(10) = .true.
2087 IF (boundmoved(4) .AND. allexternal(4))
THEN
2088 edgemoved( 3) = .true.; edgemoved( 7) = .true.
2089 edgemoved(11) = .true.; edgemoved(12) = .true.
2091 IF (boundmoved(5) .AND. allexternal(5))
THEN
2092 edgemoved( 4) = .true.; edgemoved( 8) = .true.
2093 edgemoved( 9) = .true.; edgemoved(11) = .true.
2095 IF (boundmoved(6) .AND. allexternal(6))
THEN
2096 edgemoved( 2) = .true.; edgemoved( 6) = .true.
2097 edgemoved(10) = .true.; edgemoved(12) = .true.
2104 IF (.NOT.edgemoved(iedge))
THEN
2106 edgemoved(iedge) = .true.
2109 indbeg = switch(iedge,6)
2110 indend = switch(iedge,7)
2111 l1c = switch(iedge,8)
2112 l2c = switch(iedge,9)
2115 IF (iedge==11) iedgeglo=12
2116 IF (iedge==12) iedgeglo=11
2117 interact = region%levels(ilev)%edgeCells(iedgeglo)%interact
2118 intertype = region%levels(ilev)%edgeCells(iedgeglo)%interType
2120 IF (((region%levels(ilev)%grid%nghbor(3,1,switch(iedge,10))==1 .OR. &
2121 region%levels(ilev)%grid%nghbor(3,1,switch(iedge,11))==1) .AND. &
2122 ((interact .EQV. .true.) .AND. (intertype==edge_interact_full))) &
2124 region%levels(ilev)%grid%nghbor(3,1,switch(iedge,10))==2 .OR. &
2125 region%levels(ilev)%grid%nghbor(3,1,switch(iedge,11))==2)
THEN
2132 DO ind=indbeg+1,indend-1
2133 IF (switch(iedge,5) == 12)
THEN
2134 ijkn = indijk(ind ,l1c,l2c,inoff,ijnoff)
2135 ijkn1 = indijk(ind-1 ,l1c,l2c,inoff,ijnoff)
2136 ijknbeg = indijk(indbeg,l1c,l2c,inoff,ijnoff)
2137 ijknend = indijk(indend,l1c,l2c,inoff,ijnoff)
2138 arclen = arclen12(l1c,l2c)
2139 dnbeg(:) = dnode(:,ijknbeg)
2140 dnend(:) = dnode(:,ijknend)
2141 ELSE IF (switch(iedge,5) == 34)
THEN
2142 ijkn = indijk(l2c,ind ,l1c,inoff,ijnoff)
2143 ijkn1 = indijk(l2c,ind-1 ,l1c,inoff,ijnoff)
2144 ijknbeg = indijk(l2c,indbeg,l1c,inoff,ijnoff)
2145 ijknend = indijk(l2c,indend,l1c,inoff,ijnoff)
2146 arclen = arclen34(l1c,l2c)
2147 dnbeg(:) = dnode(:,ijknbeg)
2148 dnend(:) = dnode(:,ijknend)
2149 ELSE IF (switch(iedge,5) == 56)
THEN
2150 ijkn = indijk(l1c,l2c,ind ,inoff,ijnoff)
2151 ijkn1 = indijk(l1c,l2c,ind-1 ,inoff,ijnoff)
2152 ijknbeg = indijk(l1c,l2c,indbeg,inoff,ijnoff)
2153 ijknend = indijk(l1c,l2c,indend,inoff,ijnoff)
2154 arclen = arclen56(l1c,l2c)
2155 dnbeg(:) = dnode(:,ijknbeg)
2156 dnend(:) = dnode(:,ijknend)
2158 ds = ds +
sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2159 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2160 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2164 dnode(:,ijkn) = dn(:)
2201 #include "Indexing.h"
2204 TYPE(t_region
) :: region
2205 LOGICAL :: edgemoved(12)
2206 REAL(RFREAL),
POINTER :: dnode(:,:), xyzold(:,:)
2209 INTEGER :: ipedge, ind, ipatch,
ic
2212 INTEGER :: ilev,
ibeg,
iend,
jbeg,
jend,
kbeg, kend, ib, ie, jb, je , kb, ke
2213 INTEGER :: indbeg, indend, ijkn, ijkn1, ijknbeg, ijknend, inoff, ijnoff
2214 INTEGER :: lbound, intb, inte, ireg, iedge, intertype, ijktest
2216 REAL(RFREAL) :: arclen, ds,
s, dn(3), dnbeg(3), dnend(3)
2223 'RFLO_ModMoveGridNconform4.F90' )
2227 ireg = region%iRegionGlobal
2231 grid => region%levels(ilev)%grid
2235 edgemoved(:) = .true.
2239 DO ipatch=1,region%nPatches
2240 patch => region%levels(ilev)%patches(ipatch)
2241 lbound =
patch%lbound
2250 IF (lbound==1 .OR. lbound==2)
THEN
2260 ijknbeg = indijk(ib,jb,kb,inoff,ijnoff)
2261 ijknend = indijk(ie,je,ke,inoff,ijnoff)
2262 ijktest = indijk((ib+ie)/2,(jb+je)/2,(kb+ke)/2,inoff,ijnoff)
2270 intertype = region%levels(ilev)%edgeCells(iedge)%interType
2271 DO ic = 1,
grid%nCorns(ireg)
2272 IF (
grid%ijkCorn(
ic,ireg)==ijknbeg) intb =
grid%nghbor(3,1,
ic)
2273 IF (
grid%ijkCorn(
ic,ireg)==ijknend) inte =
grid%nghbor(3,1,
ic)
2275 patch%position(1) = intb
2276 patch%position(2) = inte
2288 dnbeg(:) = dnode(:,ijknbeg)
2289 dnend(:) = dnode(:,ijknend)
2292 DO ind=indbeg+1,indend
2293 ijkn = indijk(
ibeg,
jbeg,ind ,inoff,ijnoff)
2294 ijkn1 = indijk(
ibeg,
jbeg,ind-1,inoff,ijnoff)
2296 sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2297 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2298 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2301 DO ind=indbeg+1,indend-1
2302 ijkn = indijk(
ibeg,
jbeg,ind ,inoff,ijnoff)
2303 ijkn1 = indijk(
ibeg,
jbeg,ind-1,inoff,ijnoff)
2304 ds = ds +
sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2305 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2306 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2309 dnode(:,ijkn) = dn(:)
2312 ELSEIF (ipedge==2)
THEN
2321 ijknbeg = indijk(ib,jb,kb,inoff,ijnoff)
2322 ijknend = indijk(ie,je,ke,inoff,ijnoff)
2323 ijktest = indijk((ib+ie)/2,(jb+je)/2,(kb+ke)/2,inoff,ijnoff)
2331 intertype = region%levels(ilev)%edgeCells(iedge)%interType
2332 DO ic = 1,
grid%nCorns(ireg)
2333 IF (
grid%ijkCorn(
ic,ireg)==ijknbeg) intb =
grid%nghbor(3,1,
ic)
2334 IF (
grid%ijkCorn(
ic,ireg)==ijknend) inte =
grid%nghbor(3,1,
ic)
2339 patch%position(2) = intb
2340 patch%position(3) = inte
2352 dnbeg(:) = dnode(:,ijknbeg)
2353 dnend(:) = dnode(:,ijknend)
2356 DO ind=indbeg+1,indend
2357 ijkn = indijk(
ibeg,ind ,kend,inoff,ijnoff)
2358 ijkn1 = indijk(
ibeg,ind-1,kend,inoff,ijnoff)
2360 sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2361 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2362 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2365 DO ind=indbeg+1,indend-1
2366 ijkn = indijk(
ibeg,ind ,kend,inoff,ijnoff)
2367 ijkn1 = indijk(
ibeg,ind-1,kend,inoff,ijnoff)
2368 ds = ds +
sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2369 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2370 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2373 dnode(:,ijkn) = dn(:)
2376 ELSEIF (ipedge==3)
THEN
2385 ijknbeg = indijk(ib,jb,kb,inoff,ijnoff)
2386 ijknend = indijk(ie,je,ke,inoff,ijnoff)
2387 ijktest = indijk((ib+ie)/2,(jb+je)/2,(kb+ke)/2,inoff,ijnoff)
2395 intertype = region%levels(ilev)%edgeCells(iedge)%interType
2396 DO ic = 1,
grid%nCorns(ireg)
2397 IF (
grid%ijkCorn(
ic,ireg)==ijknbeg) intb =
grid%nghbor(3,1,
ic)
2398 IF (
grid%ijkCorn(
ic,ireg)==ijknend) inte =
grid%nghbor(3,1,
ic)
2400 patch%position(3) = inte
2401 patch%position(4) = intb
2413 dnbeg(:) = dnode(:,ijknbeg)
2414 dnend(:) = dnode(:,ijknend)
2417 DO ind=indbeg+1,indend
2418 ijkn = indijk(
ibeg,
jend,ind ,inoff,ijnoff)
2419 ijkn1 = indijk(
ibeg,
jend,ind-1,inoff,ijnoff)
2421 sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2422 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2423 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2426 DO ind=indbeg+1,indend-1
2427 ijkn = indijk(
ibeg,
jend,ind ,inoff,ijnoff)
2428 ijkn1 = indijk(
ibeg,
jend,ind-1,inoff,ijnoff)
2429 ds = ds +
sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2430 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2431 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2434 dnode(:,ijkn) = dn(:)
2437 ELSEIF (ipedge==4)
THEN
2446 ijknbeg = indijk(ib,jb,kb,inoff,ijnoff)
2447 ijknend = indijk(ie,je,ke,inoff,ijnoff)
2448 ijktest = indijk((ib+ie)/2,(jb+je)/2,(kb+ke)/2,inoff,ijnoff)
2456 intertype = region%levels(ilev)%edgeCells(iedge)%interType
2457 DO ic = 1,
grid%nCorns(ireg)
2458 IF (
grid%ijkCorn(
ic,ireg)==ijknbeg) intb =
grid%nghbor(3,1,
ic)
2459 IF (
grid%ijkCorn(
ic,ireg)==ijknend) inte =
grid%nghbor(3,1,
ic)
2461 patch%position(4) = inte
2462 patch%position(1) = intb
2474 dnbeg(:) = dnode(:,ijknbeg)
2475 dnend(:) = dnode(:,ijknend)
2478 DO ind=indbeg+1,indend
2479 ijkn = indijk(
ibeg,ind ,
kbeg,inoff,ijnoff)
2480 ijkn1 = indijk(
ibeg,ind-1,
kbeg,inoff,ijnoff)
2482 sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2483 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2484 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2487 DO ind=indbeg+1,indend-1
2488 ijkn = indijk(
ibeg,ind ,
kbeg,inoff,ijnoff)
2489 ijkn1 = indijk(
ibeg,ind-1,
kbeg,inoff,ijnoff)
2490 ds = ds +
sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2491 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2492 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2495 dnode(:,ijkn) = dn(:)
2503 IF (lbound==3 .OR. lbound==4)
THEN
2513 ijknbeg = indijk(ib,jb,kb,inoff,ijnoff)
2514 ijknend = indijk(ie,je,ke,inoff,ijnoff)
2515 ijktest = indijk((ib+ie)/2,(jb+je)/2,(kb+ke)/2,inoff,ijnoff)
2523 intertype = region%levels(ilev)%edgeCells(iedge)%interType
2524 DO ic = 1,
grid%nCorns(ireg)
2525 IF (
grid%ijkCorn(
ic,ireg)==ijknbeg) intb =
grid%nghbor(3,1,
ic)
2526 IF (
grid%ijkCorn(
ic,ireg)==ijknend) inte =
grid%nghbor(3,1,
ic)
2528 patch%position(1) = intb
2529 patch%position(2) = inte
2541 dnbeg(:) = dnode(:,ijknbeg)
2542 dnend(:) = dnode(:,ijknend)
2545 DO ind=indbeg+1,indend
2546 ijkn = indijk(ind ,
jbeg,
kbeg,inoff,ijnoff)
2547 ijkn1 = indijk(ind-1,
jbeg,
kbeg,inoff,ijnoff)
2549 sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2550 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2551 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2554 DO ind=indbeg+1,indend-1
2555 ijkn = indijk(ind ,
jbeg,
kbeg,inoff,ijnoff)
2556 ijkn1 = indijk(ind-1,
jbeg,
kbeg,inoff,ijnoff)
2557 ds = ds +
sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2558 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2559 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2562 dnode(:,ijkn) = dn(:)
2565 ELSEIF (ipedge==2)
THEN
2574 ijknbeg = indijk(ib,jb,kb,inoff,ijnoff)
2575 ijknend = indijk(ie,je,ke,inoff,ijnoff)
2576 ijktest = indijk((ib+ie)/2,(jb+je)/2,(kb+ke)/2,inoff,ijnoff)
2584 intertype = region%levels(ilev)%edgeCells(iedge)%interType
2585 DO ic = 1,
grid%nCorns(ireg)
2586 IF (
grid%ijkCorn(
ic,ireg)==ijknbeg) intb =
grid%nghbor(3,1,
ic)
2587 IF (
grid%ijkCorn(
ic,ireg)==ijknend) inte =
grid%nghbor(3,1,
ic)
2589 patch%position(2) = intb
2590 patch%position(3) = inte
2602 dnbeg(:) = dnode(:,ijknbeg)
2603 dnend(:) = dnode(:,ijknend)
2606 DO ind=indbeg+1,indend
2607 ijkn = indijk(
iend,
jbeg,ind ,inoff,ijnoff)
2608 ijkn1 = indijk(
iend,
jbeg,ind-1,inoff,ijnoff)
2610 sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2611 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2612 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2615 DO ind=indbeg+1,indend-1
2616 ijkn = indijk(
iend,
jbeg,ind ,inoff,ijnoff)
2617 ijkn1 = indijk(
iend,
jbeg,ind-1,inoff,ijnoff)
2618 ds = ds +
sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2619 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2620 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2623 dnode(:,ijkn) = dn(:)
2626 ELSEIF (ipedge==3)
THEN
2635 ijknbeg = indijk(ib,jb,kb,inoff,ijnoff)
2636 ijknend = indijk(ie,je,ke,inoff,ijnoff)
2637 ijktest = indijk((ib+ie)/2,(jb+je)/2,(kb+ke)/2,inoff,ijnoff)
2645 intertype = region%levels(ilev)%edgeCells(iedge)%interType
2646 DO ic = 1,
grid%nCorns(ireg)
2647 IF (
grid%ijkCorn(
ic,ireg)==ijknbeg) intb =
grid%nghbor(3,1,
ic)
2648 IF (
grid%ijkCorn(
ic,ireg)==ijknend) inte =
grid%nghbor(3,1,
ic)
2650 patch%position(3) = inte
2651 patch%position(4) = intb
2663 dnbeg(:) = dnode(:,ijknbeg)
2664 dnend(:) = dnode(:,ijknend)
2667 DO ind=indbeg+1,indend
2668 ijkn = indijk(ind ,
jbeg,kend,inoff,ijnoff)
2669 ijkn1 = indijk(ind-1,
jbeg,kend,inoff,ijnoff)
2671 sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2672 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2673 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2676 DO ind=indbeg+1,indend-1
2677 ijkn = indijk(ind ,
jbeg,kend,inoff,ijnoff)
2678 ijkn1 = indijk(ind-1,
jbeg,kend,inoff,ijnoff)
2679 ds = ds +
sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2680 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2681 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2684 dnode(:,ijkn) = dn(:)
2687 ELSEIF (ipedge==4)
THEN
2696 ijknbeg = indijk(ib,jb,kb,inoff,ijnoff)
2697 ijknend = indijk(ie,je,ke,inoff,ijnoff)
2698 ijktest = indijk((ib+ie)/2,(jb+je)/2,(kb+ke)/2,inoff,ijnoff)
2706 intertype = region%levels(ilev)%edgeCells(iedge)%interType
2707 DO ic = 1,
grid%nCorns(ireg)
2708 IF (
grid%ijkCorn(
ic,ireg)==ijknbeg) intb =
grid%nghbor(3,1,
ic)
2709 IF (
grid%ijkCorn(
ic,ireg)==ijknend) inte =
grid%nghbor(3,1,
ic)
2711 patch%position(4) = inte
2712 patch%position(1) = intb
2724 dnbeg(:) = dnode(:,ijknbeg)
2725 dnend(:) = dnode(:,ijknend)
2728 DO ind=indbeg+1,indend
2729 ijkn = indijk(
ibeg,
jbeg,ind ,inoff,ijnoff)
2730 ijkn1 = indijk(
ibeg,
jbeg,ind-1,inoff,ijnoff)
2732 sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2733 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2734 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2737 DO ind=indbeg+1,indend-1
2738 ijkn = indijk(
ibeg,
jbeg,ind ,inoff,ijnoff)
2739 ijkn1 = indijk(
ibeg,
jbeg,ind-1,inoff,ijnoff)
2740 ds = ds +
sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2741 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2742 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2745 dnode(:,ijkn) = dn(:)
2751 IF (lbound==5 .OR. lbound==6)
THEN
2761 ijknbeg = indijk(ib,jb,kb,inoff,ijnoff)
2762 ijknend = indijk(ie,je,ke,inoff,ijnoff)
2763 ijktest = indijk((ib+ie)/2,(jb+je)/2,(kb+ke)/2,inoff,ijnoff)
2771 intertype = region%levels(ilev)%edgeCells(iedge)%interType
2772 DO ic = 1,
grid%nCorns(ireg)
2773 IF (
grid%ijkCorn(
ic,ireg)==ijknbeg) intb =
grid%nghbor(3,1,
ic)
2774 IF (
grid%ijkCorn(
ic,ireg)==ijknend) inte =
grid%nghbor(3,1,
ic)
2776 patch%position(1) = intb
2777 patch%position(2) = inte
2789 dnbeg(:) = dnode(:,ijknbeg)
2790 dnend(:) = dnode(:,ijknend)
2793 DO ind=indbeg+1,indend
2794 ijkn = indijk(
ibeg,ind ,
kbeg,inoff,ijnoff)
2795 ijkn1 = indijk(
ibeg,ind-1,
kbeg,inoff,ijnoff)
2797 sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2798 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2799 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2802 DO ind=indbeg+1,indend-1
2803 ijkn = indijk(
ibeg,ind ,
kbeg,inoff,ijnoff)
2804 ijkn1 = indijk(
ibeg,ind-1,
kbeg,inoff,ijnoff)
2805 ds = ds +
sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2806 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2807 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2810 dnode(:,ijkn) = dn(:)
2813 ELSEIF (ipedge==2)
THEN
2822 ijknbeg = indijk(ib,jb,kb,inoff,ijnoff)
2823 ijknend = indijk(ie,je,ke,inoff,ijnoff)
2824 ijktest = indijk((ib+ie)/2,(jb+je)/2,(kb+ke)/2,inoff,ijnoff)
2832 intertype = region%levels(ilev)%edgeCells(iedge)%interType
2833 DO ic = 1,
grid%nCorns(ireg)
2834 IF (
grid%ijkCorn(
ic,ireg)==ijknbeg) intb =
grid%nghbor(3,1,
ic)
2835 IF (
grid%ijkCorn(
ic,ireg)==ijknend) inte =
grid%nghbor(3,1,
ic)
2837 patch%position(2) = intb
2838 patch%position(3) = inte
2850 dnbeg(:) = dnode(:,ijknbeg)
2851 dnend(:) = dnode(:,ijknend)
2854 DO ind=indbeg+1,indend
2855 ijkn = indijk(ind ,
jend,
kbeg,inoff,ijnoff)
2856 ijkn1 = indijk(ind-1,
jend,
kbeg,inoff,ijnoff)
2858 sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2859 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2860 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2863 DO ind=indbeg+1,indend-1
2864 ijkn = indijk(ind ,
jend,
kbeg,inoff,ijnoff)
2865 ijkn1 = indijk(ind-1,
jend,
kbeg,inoff,ijnoff)
2866 ds = ds +
sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2867 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2868 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2871 dnode(:,ijkn) = dn(:)
2874 ELSEIF (ipedge==3)
THEN
2883 ijknbeg = indijk(ib,jb,kb,inoff,ijnoff)
2884 ijknend = indijk(ie,je,ke,inoff,ijnoff)
2885 ijktest = indijk((ib+ie)/2,(jb+je)/2,(kb+ke)/2,inoff,ijnoff)
2893 intertype = region%levels(ilev)%edgeCells(iedge)%interType
2894 DO ic = 1,
grid%nCorns(ireg)
2895 IF (
grid%ijkCorn(
ic,ireg)==ijknbeg) intb =
grid%nghbor(3,1,
ic)
2896 IF (
grid%ijkCorn(
ic,ireg)==ijknend) inte =
grid%nghbor(3,1,
ic)
2898 patch%position(3) = inte
2899 patch%position(4) = intb
2911 dnbeg(:) = dnode(:,ijknbeg)
2912 dnend(:) = dnode(:,ijknend)
2915 DO ind=indbeg+1,indend
2916 ijkn = indijk(
iend,ind ,
kbeg,inoff,ijnoff)
2917 ijkn1 = indijk(
iend,ind-1,
kbeg,inoff,ijnoff)
2919 sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2920 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2921 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2924 DO ind=indbeg+1,indend-1
2925 ijkn = indijk(
iend,ind ,
kbeg,inoff,ijnoff)
2926 ijkn1 = indijk(
iend,ind-1,
kbeg,inoff,ijnoff)
2927 ds = ds +
sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2928 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2929 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2932 dnode(:,ijkn) = dn(:)
2935 ELSEIF (ipedge==4)
THEN
2944 ijknbeg = indijk(ib,jb,kb,inoff,ijnoff)
2945 ijknend = indijk(ie,je,ke,inoff,ijnoff)
2946 ijktest = indijk((ib+ie)/2,(jb+je)/2,(kb+ke)/2,inoff,ijnoff)
2954 intertype = region%levels(ilev)%edgeCells(iedge)%interType
2955 DO ic = 1,
grid%nCorns(ireg)
2956 IF (
grid%ijkCorn(
ic,ireg)==ijknbeg) intb =
grid%nghbor(3,1,
ic)
2957 IF (
grid%ijkCorn(
ic,ireg)==ijknend) inte =
grid%nghbor(3,1,
ic)
2959 patch%position(4) = inte
2960 patch%position(1) = intb
2972 dnbeg(:) = dnode(:,ijknbeg)
2973 dnend(:) = dnode(:,ijknend)
2976 DO ind=indbeg+1,indend
2977 ijkn = indijk(ind ,
jbeg,
kbeg,inoff,ijnoff)
2978 ijkn1 = indijk(ind-1,
jbeg,
kbeg,inoff,ijnoff)
2980 sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2981 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2982 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2985 DO ind=indbeg+1,indend-1
2986 ijkn = indijk(ind ,
jbeg,
kbeg,inoff,ijnoff)
2987 ijkn1 = indijk(ind-1,
jbeg,
kbeg,inoff,ijnoff)
2988 ds = ds +
sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
2989 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
2990 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
2993 dnode(:,ijkn) = dn(:)
3035 TYPE(t_region
),
POINTER :: regions(:)
3039 INTEGER :: ireg, ipatch, ipass
3042 INTEGER :: bctype, iregsrc, ipatchsrc, ltype, npass
3044 TYPE(t_grid),
POINTER ::
grid, gridold, gridsrc
3050 global => regions(1)%global
3053 'RFLO_ModMoveGridNconform4.F90' )
3058 npass = global%moveGridNsmatch
3059 npass =
max( npass,4 )
3064 DO ireg=1,global%nRegions
3065 IF (regions(ireg)%procid==global%myProcid .AND. &
3066 regions(ireg)%active==active .AND. &
3067 regions(ireg)%mixtInput%moveGrid)
THEN
3069 grid => regions(ireg)%levels(1)%grid
3070 gridold => regions(ireg)%levels(1)%gridOld
3072 DO ipatch=1,regions(ireg)%nPatches
3073 patch => regions(ireg)%levels(1)%patches(ipatch)
3074 bctype =
patch%bcType
3075 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
3076 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR. &
3077 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range))
THEN
3078 iregsrc =
patch%srcRegion
3079 ipatchsrc =
patch%srcPatch
3080 patchsrc => regions(iregsrc)%levels(1)%patches(ipatchsrc)
3081 gridsrc => regions(iregsrc)%levels(1)%grid
3083 IF (regions(iregsrc)%procid == global%myProcid)
THEN
3085 patch,patchsrc,.false., &
3086 grid%xyz,gridsrc%xyz )
3087 IF (ipass < npass-1 .AND. ltype==1)
THEN
3089 gridold%xyzOld,
grid%xyz )
3093 ELSEIF (ipass < npass-1 .AND. ltype==2)
THEN
3097 grid%arcLen56,gridold%xyzOld,
grid%xyz )
3102 gridold%xyzOld,
grid%xyz )
3116 DO ireg=1,global%nRegions
3117 IF (regions(ireg)%procid==global%myProcid .AND. &
3118 regions(ireg)%active==active .AND. &
3119 regions(ireg)%mixtInput%moveGrid)
THEN
3121 grid => regions(ireg)%levels(1)%grid
3122 gridold => regions(ireg)%levels(1)%gridOld
3124 DO ipatch=1,regions(ireg)%nPatches
3125 patch => regions(ireg)%levels(1)%patches(ipatch)
3126 bctype =
patch%bcType
3127 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
3128 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR. &
3129 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range))
THEN
3130 iregsrc =
patch%srcRegion
3131 ipatchsrc =
patch%srcPatch
3132 patchsrc => regions(iregsrc)%levels(1)%patches(ipatchsrc)
3133 gridsrc => regions(iregsrc)%levels(1)%grid
3135 IF (regions(iregsrc)%procid /= global%myProcid)
THEN
3139 IF (ipass < npass-1 .AND. ltype==1)
THEN
3141 gridold%xyzOld,
grid%xyz )
3145 ELSEIF (ipass < npass-1 .AND. ltype==2)
THEN
3149 grid%arcLen56,gridold%xyzOld,
grid%xyz )
3154 gridold%xyzOld,
grid%xyz )
3165 DO ireg=1,global%nRegions
3166 IF (regions(ireg)%procid==global%myProcid .AND. &
3167 regions(ireg)%active==active .AND. &
3168 regions(ireg)%mixtInput%moveGrid)
THEN
3203 arclen12,arclen34,arclen56, &
3210 #include "Indexing.h"
3213 LOGICAL :: boundmoved(6), edgemoved(12)
3215 REAL(RFREAL),
POINTER :: arclen12(:,:), arclen34(:,:), arclen56(:,:)
3216 REAL(RFREAL),
POINTER :: dnode(:,:), xyzold(:,:)
3218 TYPE(t_region
) :: region
3221 INTEGER :: ibound, l1, l2
3225 INTEGER :: l1b, l1e, l2b, l2e, lc, ijkn, ijke(4), ijkem(4), inoff, ijnoff
3226 INTEGER :: switch(6,9)
3230 REAL(RFREAL) :: arclen(4), ds(4),
s(4)
3231 REAL(RFREAL) :: corner(3,8), e1(3), e2(3), e3(3), e4(3), &
3232 p1(3), p2(3), p3(3), p4(3), dn(3)
3237 'RFLO_ModMoveGridNconform4.F90' )
3262 corner(:,2) = dnode(:,indijk(
ipnbeg,
jpnbeg,kpnend,inoff,ijnoff))
3263 corner(:,3) = dnode(:,indijk(
ipnbeg,
jpnend,kpnend,inoff,ijnoff))
3266 corner(:,6) = dnode(:,indijk(
ipnend,
jpnbeg,kpnend,inoff,ijnoff))
3267 corner(:,7) = dnode(:,indijk(
ipnend,
jpnend,kpnend,inoff,ijnoff))
3277 IF ((edgemoved(switch(ibound,1)) .OR. edgemoved(switch(ibound,2)) .OR. &
3278 edgemoved(switch(ibound,3)) .OR. edgemoved(switch(ibound,4))))
THEN
3280 l1b = switch(ibound,5)
3281 l1e = switch(ibound,6)
3282 l2b = switch(ibound,7)
3283 l2e = switch(ibound,8)
3284 lc = switch(ibound,9)
3286 IF (ibound == 1)
THEN
3291 ELSE IF (ibound == 2)
THEN
3296 ELSE IF (ibound == 3)
THEN
3301 ELSE IF (ibound == 4)
THEN
3306 ELSE IF (ibound == 5)
THEN
3311 ELSE IF (ibound == 6)
THEN
3324 IF (ibound==1 .OR. ibound==2)
THEN
3325 ijkn = indijk(lc,l1 ,l2 ,inoff,ijnoff)
3326 ijke(1) = indijk(lc,
jpnbeg,l2 ,inoff,ijnoff)
3327 ijkem(1) = indijk(lc,
jpnbeg,l2-1 ,inoff,ijnoff)
3328 ijke(2) = indijk(lc,
jpnend,l2 ,inoff,ijnoff)
3329 ijkem(2) = indijk(lc,
jpnend,l2-1 ,inoff,ijnoff)
3330 ijke(3) = indijk(lc,l1 ,
kpnbeg,inoff,ijnoff)
3331 ijkem(3) = indijk(lc,l1-1 ,
kpnbeg,inoff,ijnoff)
3332 ijke(4) = indijk(lc,l1 ,kpnend,inoff,ijnoff)
3333 ijkem(4) = indijk(lc,l1-1 ,kpnend,inoff,ijnoff)
3334 arclen(1) = arclen56(lc,
jpnbeg)
3335 arclen(2) = arclen56(lc,
jpnend)
3336 arclen(3) = arclen34(
kpnbeg,lc)
3337 arclen(4) = arclen34(kpnend,lc)
3338 ELSE IF (ibound==3 .OR. ibound==4)
THEN
3339 ijkn = indijk(l2 ,lc,l1 ,inoff,ijnoff)
3340 ijke(1) = indijk(l2 ,lc,
kpnbeg,inoff,ijnoff)
3341 ijkem(1) = indijk(l2-1 ,lc,
kpnbeg,inoff,ijnoff)
3342 ijke(2) = indijk(l2 ,lc,kpnend,inoff,ijnoff)
3343 ijkem(2) = indijk(l2-1 ,lc,kpnend,inoff,ijnoff)
3344 ijke(3) = indijk(
ipnbeg,lc,l1 ,inoff,ijnoff)
3345 ijkem(3) = indijk(
ipnbeg,lc,l1-1 ,inoff,ijnoff)
3346 ijke(4) = indijk(
ipnend,lc,l1 ,inoff,ijnoff)
3347 ijkem(4) = indijk(
ipnend,lc,l1-1 ,inoff,ijnoff)
3348 arclen(1) = arclen12(lc,
kpnbeg)
3349 arclen(2) = arclen12(lc,kpnend)
3350 arclen(3) = arclen56(
ipnbeg,lc)
3351 arclen(4) = arclen56(
ipnend,lc)
3352 ELSE IF (ibound==5 .OR. ibound==6)
THEN
3353 ijkn = indijk(l1 ,l2 ,lc,inoff,ijnoff)
3354 ijke(1) = indijk(
ipnbeg,l2 ,lc,inoff,ijnoff)
3355 ijkem(1) = indijk(
ipnbeg,l2-1 ,lc,inoff,ijnoff)
3356 ijke(2) = indijk(
ipnend,l2 ,lc,inoff,ijnoff)
3357 ijkem(2) = indijk(
ipnend,l2-1 ,lc,inoff,ijnoff)
3358 ijke(3) = indijk(l1 ,
jpnbeg,lc,inoff,ijnoff)
3359 ijkem(3) = indijk(l1-1 ,
jpnbeg,lc,inoff,ijnoff)
3360 ijke(4) = indijk(l1 ,
jpnend,lc,inoff,ijnoff)
3361 ijkem(4) = indijk(l1-1 ,
jpnend,lc,inoff,ijnoff)
3362 arclen(1) = arclen34(lc,
ipnbeg)
3363 arclen(2) = arclen34(lc,
ipnend)
3364 arclen(3) = arclen12(
jpnbeg,lc)
3365 arclen(4) = arclen12(
jpnend,lc)
3369 sqrt((xyzold(xcoord,ijke(1))-xyzold(xcoord,ijkem(1)))**2 + &
3370 (xyzold(ycoord,ijke(1))-xyzold(ycoord,ijkem(1)))**2 + &
3371 (xyzold(zcoord,ijke(1))-xyzold(zcoord,ijkem(1)))**2)
3373 sqrt((xyzold(xcoord,ijke(2))-xyzold(xcoord,ijkem(2)))**2 + &
3374 (xyzold(ycoord,ijke(2))-xyzold(ycoord,ijkem(2)))**2 + &
3375 (xyzold(zcoord,ijke(2))-xyzold(zcoord,ijkem(2)))**2)
3379 sqrt((xyzold(xcoord,ijke(3))-xyzold(xcoord,ijkem(3)))**2 + &
3380 (xyzold(ycoord,ijke(3))-xyzold(ycoord,ijkem(3)))**2 + &
3381 (xyzold(zcoord,ijke(3))-xyzold(zcoord,ijkem(3)))**2)
3383 sqrt((xyzold(xcoord,ijke(4))-xyzold(xcoord,ijkem(4)))**2 + &
3384 (xyzold(ycoord,ijke(4))-xyzold(ycoord,ijkem(4)))**2 + &
3385 (xyzold(zcoord,ijke(4))-xyzold(zcoord,ijkem(4)))**2)
3386 s(:) = ds(:)/arclen(:)
3387 e1(:) = dnode(:,ijke(1))
3388 e2(:) = dnode(:,ijke(2))
3389 e3(:) = dnode(:,ijke(3))
3390 e4(:) = dnode(:,ijke(4))
3391 CALL
rflo_tfint2d(
s(1),
s(2),
s(3),
s(4),e1,e2,e3,e4,
p1,p2,p3,p4,dn )
3392 dnode(:,ijkn) = dn(:)
3427 #include "Indexing.h"
3431 REAL(RFREAL),
POINTER :: dnode(:,:), xyzold(:,:)
3433 TYPE(t_region
) :: region
3436 INTEGER :: ipatch, l1, l2
3440 INTEGER :: l1b, l1e, l2b, l2e, lc, ijkn, ijke(4), ijkem(4), inoff, ijnoff
3441 INTEGER :: switch(6,9)
3444 REAL(RFREAL) :: arclen(4), ds(4),
s(4)
3445 REAL(RFREAL) :: e1(3), e2(3), e3(3), e4(3), &
3446 p1(3), p2(3), p3(3), p4(3), dn(3)
3452 'RFLO_ModMoveGridNconform4.F90' )
3467 DO ipatch=1,region%nPatches
3468 patch => region%levels(ilev)%patches(ipatch)
3469 ibound =
patch%lbound
3483 l1b = switch(ibound,5)
3484 l1e = switch(ibound,6)
3485 l2b = switch(ibound,7)
3486 l2e = switch(ibound,8)
3487 lc = switch(ibound,9)
3489 p1(:) = dnode(:,
patch%corns(1))
3490 p2(:) = dnode(:,
patch%corns(4))
3491 p3(:) = dnode(:,
patch%corns(3))
3492 p4(:) = dnode(:,
patch%corns(2))
3496 IF (ibound==1 .OR. ibound==2)
THEN
3497 arclen(1:2) = 0._rfreal
3499 ijkn = indijk(lc,l1 ,l2 ,inoff,ijnoff)
3500 ijke(1) = indijk(lc,
jbeg ,l2 ,inoff,ijnoff)
3501 ijkem(1) = indijk(lc,
jbeg ,l2-1 ,inoff,ijnoff)
3502 ijke(2) = indijk(lc,
jend ,l2 ,inoff,ijnoff)
3503 ijkem(2) = indijk(lc,
jend ,l2-1 ,inoff,ijnoff)
3504 arclen(1) = arclen(1) + &
3505 sqrt((xyzold(xcoord,ijke(1))-xyzold(xcoord,ijkem(1)))**2 + &
3506 (xyzold(ycoord,ijke(1))-xyzold(ycoord,ijkem(1)))**2 + &
3507 (xyzold(zcoord,ijke(1))-xyzold(zcoord,ijkem(1)))**2)
3508 arclen(2) = arclen(2) + &
3509 sqrt((xyzold(xcoord,ijke(2))-xyzold(xcoord,ijkem(2)))**2 + &
3510 (xyzold(ycoord,ijke(2))-xyzold(ycoord,ijkem(2)))**2 + &
3511 (xyzold(zcoord,ijke(2))-xyzold(zcoord,ijkem(2)))**2)
3513 arclen(3:4) = 0._rfreal
3515 ijkn = indijk(lc,l1 ,l2 ,inoff,ijnoff)
3516 ijke(3) = indijk(lc,l1 ,
kbeg ,inoff,ijnoff)
3517 ijkem(3) = indijk(lc,l1-1 ,
kbeg ,inoff,ijnoff)
3518 ijke(4) = indijk(lc,l1 ,kend ,inoff,ijnoff)
3519 ijkem(4) = indijk(lc,l1-1 ,kend ,inoff,ijnoff)
3520 arclen(3) = arclen(3) + &
3521 sqrt((xyzold(xcoord,ijke(3))-xyzold(xcoord,ijkem(3)))**2 + &
3522 (xyzold(ycoord,ijke(3))-xyzold(ycoord,ijkem(3)))**2 + &
3523 (xyzold(zcoord,ijke(3))-xyzold(zcoord,ijkem(3)))**2)
3524 arclen(4) = arclen(4) + &
3525 sqrt((xyzold(xcoord,ijke(4))-xyzold(xcoord,ijkem(4)))**2 + &
3526 (xyzold(ycoord,ijke(4))-xyzold(ycoord,ijkem(4)))**2 + &
3527 (xyzold(zcoord,ijke(4))-xyzold(zcoord,ijkem(4)))**2)
3529 ELSE IF (ibound==3 .OR. ibound==4)
THEN
3530 arclen(1:2) = 0._rfreal
3532 ijkn = indijk(l2 ,lc,l1 ,inoff,ijnoff)
3533 ijke(1) = indijk(l2 ,lc,
kbeg ,inoff,ijnoff)
3534 ijkem(1) = indijk(l2-1 ,lc,
kbeg ,inoff,ijnoff)
3535 ijke(2) = indijk(l2 ,lc,kend ,inoff,ijnoff)
3536 ijkem(2) = indijk(l2-1 ,lc,kend ,inoff,ijnoff)
3537 arclen(1) = arclen(1) + &
3538 sqrt((xyzold(xcoord,ijke(1))-xyzold(xcoord,ijkem(1)))**2 + &
3539 (xyzold(ycoord,ijke(1))-xyzold(ycoord,ijkem(1)))**2 + &
3540 (xyzold(zcoord,ijke(1))-xyzold(zcoord,ijkem(1)))**2)
3541 arclen(2) = arclen(2) + &
3542 sqrt((xyzold(xcoord,ijke(2))-xyzold(xcoord,ijkem(2)))**2 + &
3543 (xyzold(ycoord,ijke(2))-xyzold(ycoord,ijkem(2)))**2 + &
3544 (xyzold(zcoord,ijke(2))-xyzold(zcoord,ijkem(2)))**2)
3546 arclen(3:4) = 0._rfreal
3548 ijkn = indijk(l2 ,lc,l1 ,inoff,ijnoff)
3549 ijke(3) = indijk(
ibeg ,lc,l1 ,inoff,ijnoff)
3550 ijkem(3) = indijk(
ibeg ,lc,l1-1 ,inoff,ijnoff)
3551 ijke(4) = indijk(
iend ,lc,l1 ,inoff,ijnoff)
3552 ijkem(4) = indijk(
iend ,lc,l1-1 ,inoff,ijnoff)
3553 arclen(3) = arclen(3) + &
3554 sqrt((xyzold(xcoord,ijke(3))-xyzold(xcoord,ijkem(3)))**2 + &
3555 (xyzold(ycoord,ijke(3))-xyzold(ycoord,ijkem(3)))**2 + &
3556 (xyzold(zcoord,ijke(3))-xyzold(zcoord,ijkem(3)))**2)
3557 arclen(4) = arclen(4) + &
3558 sqrt((xyzold(xcoord,ijke(4))-xyzold(xcoord,ijkem(4)))**2 + &
3559 (xyzold(ycoord,ijke(4))-xyzold(ycoord,ijkem(4)))**2 + &
3560 (xyzold(zcoord,ijke(4))-xyzold(zcoord,ijkem(4)))**2)
3562 ELSE IF (ibound==5 .OR. ibound==6)
THEN
3563 arclen(1:2) = 0._rfreal
3565 ijkn = indijk(l1 ,l2 ,lc,inoff,ijnoff)
3566 ijke(1) = indijk(
ibeg ,l2 ,lc,inoff,ijnoff)
3567 ijkem(1) = indijk(
ibeg ,l2-1 ,lc,inoff,ijnoff)
3568 ijke(2) = indijk(
iend ,l2 ,lc,inoff,ijnoff)
3569 ijkem(2) = indijk(
iend ,l2-1 ,lc,inoff,ijnoff)
3570 arclen(1) = arclen(1) + &
3571 sqrt((xyzold(xcoord,ijke(1))-xyzold(xcoord,ijkem(1)))**2 + &
3572 (xyzold(ycoord,ijke(1))-xyzold(ycoord,ijkem(1)))**2 + &
3573 (xyzold(zcoord,ijke(1))-xyzold(zcoord,ijkem(1)))**2)
3574 arclen(2) = arclen(2) + &
3575 sqrt((xyzold(xcoord,ijke(2))-xyzold(xcoord,ijkem(2)))**2 + &
3576 (xyzold(ycoord,ijke(2))-xyzold(ycoord,ijkem(2)))**2 + &
3577 (xyzold(zcoord,ijke(2))-xyzold(zcoord,ijkem(2)))**2)
3579 arclen(3:4) = 0._rfreal
3581 ijkn = indijk(l1 ,l2 ,lc,inoff,ijnoff)
3582 ijke(3) = indijk(l1 ,
jbeg ,lc,inoff,ijnoff)
3583 ijkem(3) = indijk(l1-1 ,
jbeg ,lc,inoff,ijnoff)
3584 ijke(4) = indijk(l1 ,
jend ,lc,inoff,ijnoff)
3585 ijkem(4) = indijk(l1-1 ,
jend ,lc,inoff,ijnoff)
3586 arclen(3) = arclen(3) + &
3587 sqrt((xyzold(xcoord,ijke(3))-xyzold(xcoord,ijkem(3)))**2 + &
3588 (xyzold(ycoord,ijke(3))-xyzold(ycoord,ijkem(3)))**2 + &
3589 (xyzold(zcoord,ijke(3))-xyzold(zcoord,ijkem(3)))**2)
3590 arclen(4) = arclen(4) + &
3591 sqrt((xyzold(xcoord,ijke(4))-xyzold(xcoord,ijkem(4)))**2 + &
3592 (xyzold(ycoord,ijke(4))-xyzold(ycoord,ijkem(4)))**2 + &
3593 (xyzold(zcoord,ijke(4))-xyzold(zcoord,ijkem(4)))**2)
3605 IF (ibound==1 .OR. ibound==2)
THEN
3606 ijkn = indijk(lc,l1 ,l2 ,inoff,ijnoff)
3607 ijke(1) = indijk(lc,
jbeg ,l2 ,inoff,ijnoff)
3608 ijkem(1) = indijk(lc,
jbeg ,l2-1 ,inoff,ijnoff)
3609 ijke(2) = indijk(lc,
jend ,l2 ,inoff,ijnoff)
3610 ijkem(2) = indijk(lc,
jend ,l2-1 ,inoff,ijnoff)
3611 ijke(3) = indijk(lc,l1 ,
kbeg ,inoff,ijnoff)
3612 ijkem(3) = indijk(lc,l1-1 ,
kbeg ,inoff,ijnoff)
3613 ijke(4) = indijk(lc,l1 ,kend ,inoff,ijnoff)
3614 ijkem(4) = indijk(lc,l1-1 ,kend ,inoff,ijnoff)
3615 ELSE IF (ibound==3 .OR. ibound==4)
THEN
3616 ijkn = indijk(l2 ,lc,l1 ,inoff,ijnoff)
3617 ijke(1) = indijk(l2 ,lc,
kbeg ,inoff,ijnoff)
3618 ijkem(1) = indijk(l2-1 ,lc,
kbeg ,inoff,ijnoff)
3619 ijke(2) = indijk(l2 ,lc,kend ,inoff,ijnoff)
3620 ijkem(2) = indijk(l2-1 ,lc,kend ,inoff,ijnoff)
3621 ijke(3) = indijk(
ibeg ,lc,l1 ,inoff,ijnoff)
3622 ijkem(3) = indijk(
ibeg ,lc,l1-1 ,inoff,ijnoff)
3623 ijke(4) = indijk(
iend ,lc,l1 ,inoff,ijnoff)
3624 ijkem(4) = indijk(
iend ,lc,l1-1 ,inoff,ijnoff)
3625 ELSE IF (ibound==5 .OR. ibound==6)
THEN
3626 ijkn = indijk(l1 ,l2 ,lc,inoff,ijnoff)
3627 ijke(1) = indijk(
ibeg ,l2 ,lc,inoff,ijnoff)
3628 ijkem(1) = indijk(
ibeg ,l2-1 ,lc,inoff,ijnoff)
3629 ijke(2) = indijk(
iend ,l2 ,lc,inoff,ijnoff)
3630 ijkem(2) = indijk(
iend ,l2-1 ,lc,inoff,ijnoff)
3631 ijke(3) = indijk(l1 ,
jbeg ,lc,inoff,ijnoff)
3632 ijkem(3) = indijk(l1-1 ,
jbeg ,lc,inoff,ijnoff)
3633 ijke(4) = indijk(l1 ,
jend ,lc,inoff,ijnoff)
3634 ijkem(4) = indijk(l1-1 ,
jend ,lc,inoff,ijnoff)
3638 sqrt((xyzold(xcoord,ijke(1))-xyzold(xcoord,ijkem(1)))**2 + &
3639 (xyzold(ycoord,ijke(1))-xyzold(ycoord,ijkem(1)))**2 + &
3640 (xyzold(zcoord,ijke(1))-xyzold(zcoord,ijkem(1)))**2)
3642 sqrt((xyzold(xcoord,ijke(2))-xyzold(xcoord,ijkem(2)))**2 + &
3643 (xyzold(ycoord,ijke(2))-xyzold(ycoord,ijkem(2)))**2 + &
3644 (xyzold(zcoord,ijke(2))-xyzold(zcoord,ijkem(2)))**2)
3648 sqrt((xyzold(xcoord,ijke(3))-xyzold(xcoord,ijkem(3)))**2 + &
3649 (xyzold(ycoord,ijke(3))-xyzold(ycoord,ijkem(3)))**2 + &
3650 (xyzold(zcoord,ijke(3))-xyzold(zcoord,ijkem(3)))**2)
3652 sqrt((xyzold(xcoord,ijke(4))-xyzold(xcoord,ijkem(4)))**2 + &
3653 (xyzold(ycoord,ijke(4))-xyzold(ycoord,ijkem(4)))**2 + &
3654 (xyzold(zcoord,ijke(4))-xyzold(zcoord,ijkem(4)))**2)
3655 s(:) = ds(:)/arclen(:)
3656 e1(:) = dnode(:,ijke(1))
3657 e2(:) = dnode(:,ijke(2))
3658 e3(:) = dnode(:,ijke(3))
3659 e4(:) = dnode(:,ijke(4))
3660 CALL
rflo_tfint2d(
s(1),
s(2),
s(3),
s(4),e1,e2,e3,e4,
p1,p2,p3,p4,dn )
3661 dnode(:,ijkn) = dn(:)
**********************************************************************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
subroutine rflo_copygeometrydummy(region)
Tfloat sum() const
Return the sum of all the pixel values in an image.
**********************************************************************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 rflo_calccellcentroids(region)
subroutine rflo_mgframesurfaces(regions, someMoved, iType)
subroutine rflo_mgframeedges(region, iType, boundMoved, allExternal, edgeMoved, arcLen12, arcLen34, arcLen56, xyzOld, dNode)
subroutine rflo_mgframeedgeso(region, iType, boundMoved, allExternal, edgeMoved, arcLen12, arcLen34, arcLen56, xyzOld, dNode)
**********************************************************************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 kpcbeg
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine rflo_arclengthbounds(region, xyz, arcLen12, arcLen34, arcLen56)
**********************************************************************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 rflo_tfint2d(s1, s2, s3, s4, e1, e2, e3, e4, p1, p2, p3, p4, xyz)
subroutine rflo_c2eavgcoeffs(region)
subroutine, public rflo_mgframebroadcast(regions, iselect, iter)
subroutine registerfunction(global, funName, fileName)
subroutine, public rflo_normcrossprod(s1, s2, s3)
**********************************************************************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 ic
subroutine, public rflo_movegridframe(regions)
subroutine rflo_exchangednoderecv(region, regionSrc, patch, patchSrc, average, dNode)
subroutine rflo_c2favgcoeffs(region)
**********************************************************************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 jpcbeg
subroutine rflo_changeinteriorgrid(region, boundMoved, edgeMoved, arcLen12, arcLen34, arcLen56, xyzOld, xyz)
subroutine, public rflo_gridqualityglobal(regions)
**********************************************************************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 ipcend
subroutine rflo_movegridinterfaces(regions)
subroutine rflo_calccontrolvolumes(region)
subroutine rflo_tfint1d(s, p1, p2, xyz)
**********************************************************************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
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
subroutine rflo_mgframeorthoshift(regions)
subroutine rflo_mgframemovecorners(regions)
**********************************************************************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 rflo_calcfacevectors(region)
**********************************************************************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 ipcbeg
subroutine rflo_exchangegeometry(regions)
subroutine rflo_movegridsurfaces(regions, someMoved)
subroutine rflo_generatecoarsegrids(region)
subroutine rflo_getpatchindicesnodes(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
subroutine rflo_mgframeinterfaces(regions, iType)
**********************************************************************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_mgframesrchneighbors(regions)
subroutine rflo_clearsendrequests(regions, iReg, geometry)
subroutine rflo_calcgridspeeds(region)
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
subroutine rflo_getdimensphysnodes(region, iLev, ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend)
**********************************************************************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 jpcend
subroutine rflo_mgframebnddeformation0(region, boundMoved, edgeMoved, arcLen12, arcLen34, arcLen56, xyzOld, dNode)
**********************************************************************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_exchangednodecopy(region, regionSrc, patch, patchSrc, average, dNode, dNodeSrc)
subroutine errorstop(global, errorCode, errorLine, addMessage)
**********************************************************************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
long double dist(long double *coord1, long double *coord2, int size)
subroutine rflo_mgframerestoreexternal(region)
subroutine rflo_mgframebnddeformation(region, boundMoved, edgeMoved, arcLen12, arcLen34, arcLen56, xyzOld, dNode)
**********************************************************************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)
**********************************************************************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
subroutine rflo_exchangednodesend(region, regionSrc, patch, dNode)
subroutine rflo_checkmetrics(iReg, region)
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)
subroutine rflo_laplacegridsmoo(regions, resid)
subroutine, public rflo_mgframecornpoints(regions)
subroutine rflo_mgframecorrectneighbors(regions)