101 CHARACTER(CHRLEN) :: RCSIdentString = &
102 '$RCSfile: RFLO_ModMoveGridConform.F90,v $ $Revision: 1.33 $'
141 include
'roccomf90.h'
145 TYPE(t_region
),
POINTER :: regions(:)
148 INTEGER :: ireg, iter, ipatch, ijk
151 LOGICAL :: somemoved, someremesh
153 INTEGER :: bctype, iremesh, jremesh, nremesh, itype
155 REAL(RFREAL) :: resid, globalresid
156 REAL(RFREAL),
POINTER :: xyz(:,:), xyzold(:,:)
162 DOUBLE PRECISION :: dalpha
167 global => regions(1)%global
170 'RFLO_ModMoveGridConform.F90' )
177 dalpha = global%dtMin/global%dTimeSystem
178 CALL com_call_function( global%genxHandleGm,1,dalpha )
193 DO ireg=1,global%nRegions
194 IF (regions(ireg)%procid==global%myProcid .AND. &
195 regions(ireg)%active==active .AND. &
196 regions(ireg)%mixtInput%moveGrid)
THEN
200 grid => regions(ireg)%levels(1)%grid
201 gridold => regions(ireg)%levels(1)%gridOld
205 gridold%xyzOld,
grid%xyz )
218 IF (global%moveGridNiter < 1)
THEN
219 IF (global%verbLevel >= verbose_high)
THEN
220 IF (global%myProcid == masterproc)
THEN
221 WRITE(stdout,4000) solver_name,global%skewness,global%minVol
222 WRITE(stdout,1000) solver_name, global%moveGridNiter, &
223 global%moveGridAmplifX,global%moveGridAmplifY, &
224 global%moveGridAmplifZ,global%moveGridPower
231 DO iter=1,global%moveGridNiter
235 IF (global%verbLevel >= verbose_high)
THEN
237 CALL mpi_reduce( resid,globalresid,1,mpi_rfreal,mpi_sum, &
238 masterproc,global%mpiComm,global%mpierr )
239 IF (global%mpierr /= 0) CALL
errorstop( global,err_mpi_trouble,__line__ )
243 IF (global%myProcid == masterproc)
THEN
244 WRITE(stdout,4000) solver_name,global%skewness,global%minVol
246 IF (global%moveGridScheme==movegrid_frame)
THEN
247 WRITE(stdout,2000) solver_name, &
248 global%moveGridNiter, &
249 global%moveGridAmplifX,global%moveGridAmplifY, &
250 global%moveGridAmplifZ,global%moveGridPower, &
252 ELSEIF (global%moveGridScheme==movegrid_foms)
THEN
253 WRITE(stdout,3000) solver_name, &
254 global%moveGridNiter, &
255 global%moveGridAmplifX,global%moveGridAmplifY, &
256 global%moveGridAmplifZ,global%moveGridPower, &
257 global%moveGridWeight,global%moveGridOrthCell, &
266 DO ireg=1,global%nRegions
267 IF (regions(ireg)%procid==global%myProcid .AND. &
268 regions(ireg)%active==active .AND. &
269 regions(ireg)%mixtInput%moveGrid)
THEN
273 xyz => regions(ireg)%levels(1)%grid%xyz
274 xyzold => regions(ireg)%levels(1)%gridOld%xyz
276 DO ijk=lbound(xyz,2),ubound(xyz,2)
277 xyz(xcoord,ijk) = xyz(xcoord,ijk) - xyzold(xcoord,ijk)
278 xyz(ycoord,ijk) = xyz(ycoord,ijk) - xyzold(ycoord,ijk)
279 xyz(zcoord,ijk) = xyz(zcoord,ijk) - xyzold(zcoord,ijk)
284 grid => regions(ireg)%levels(1)%grid
285 gridold => regions(ireg)%levels(1)%gridOld
286 grid%boundMoved(:) = .true.
287 grid%edgeMoved(:) = .true.
288 DO ipatch=1,regions(ireg)%nPatches
289 patch => regions(ireg)%levels(1)%patches(ipatch)
290 bctype =
patch%bcType
292 IF (bctype .EQ. bc_symmetry)
THEN
299 gridold%xyzOld,
grid%xyz )
306 gridold%xyzOld,
grid%xyz )
324 DO ireg=1,global%nRegions
325 IF (regions(ireg)%procid==global%myProcid .AND. &
326 regions(ireg)%active==active .AND. &
327 regions(ireg)%mixtInput%moveGrid)
THEN
331 IF (global%moveGridScheme==movegrid_foms) &
333 IF (regions(ireg)%mixtInput%faceEdgeAvg==fe_avg_linear) &
346 CALL mpi_allreduce( iremesh, nremesh, 1, mpi_integer, mpi_sum, &
347 global%mpiComm, global%mpierr )
348 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,__line__ )
349 IF (nremesh > 0) someremesh = .true.
354 DO ireg=1,global%nRegions
355 IF (regions(ireg)%procid==global%myProcid .AND. &
356 regions(ireg)%active==active .AND. &
361 IF (global%moveGridScheme==movegrid_foms) &
363 IF (regions(ireg)%mixtInput%faceEdgeAvg==fe_avg_linear) &
374 1000
FORMAT(
a,1
x,
'Global-TFI grid motion:',i6,4(1pe9.2))
375 2000
FORMAT(
a,1
x,
'Global-Weighted-Laplacian grid motion:',i6,4(1pe9.2),1pe13.4)
376 3000
FORMAT(
a,1
x,
'Global-Orthogonal-Laplacian gridmotion:',i4,6(1pe9.2),1pe10.2)
377 4000
FORMAT(
a,1
x,
'global skewness, minvol:',2(1pe14.5))
404 #include "Indexing.h"
407 TYPE(t_region
),
POINTER :: regions(:)
410 INTEGER :: l, ipatch, ireg, ipcorn, intcorn
413 INTEGER,
PARAMETER :: ncmax=100
416 INTEGER :: iptc, jptc, kptc, iblk, jblk, kblk, ijkcurr
417 INTEGER :: inoff, ijnoff, lbound, regnc, errfl
418 INTEGER :: ijkcorn(ncmax)
427 global => regions(1)%global
430 'RFLO_ModMoveGridConform.F90' )
436 DO ireg = 1,global%nRegions
437 IF (regions(ireg)%procid==global%myProcid .AND. &
438 regions(ireg)%active==active)
THEN
440 grid => regions(ireg)%levels(ilev)%grid
448 grid%nCorns(ireg) = 8
450 ijkcorn(2) = indijk(
ibeg,
jbeg,kend,inoff,ijnoff)
451 ijkcorn(3) = indijk(
ibeg,
jend,kend,inoff,ijnoff)
454 ijkcorn(6) = indijk(
iend,
jbeg,kend,inoff,ijnoff)
455 ijkcorn(7) = indijk(
iend,
jend,kend,inoff,ijnoff)
458 DO ipatch=1,regions(ireg)%nPatches
459 patch => regions(ireg)%levels(ilev)%patches(ipatch)
460 lbound =
patch%lbound
466 IF (lbound==1 .OR. lbound==2)
THEN
468 IF (lbound==1) iblk =
ipnbeg
469 IF (lbound==2) iblk =
ipnend
475 ELSEIF (ipcorn==2)
THEN
480 ELSEIF (ipcorn==3)
THEN
485 ELSEIF (ipcorn==4)
THEN
491 ELSEIF (lbound==3 .OR. lbound==4)
THEN
493 IF (lbound==3) jblk =
jpnbeg
494 IF (lbound==4) jblk =
jpnend
500 ELSEIF (ipcorn==2)
THEN
505 ELSEIF (ipcorn==3)
THEN
510 ELSEIF (ipcorn==4)
THEN
516 ELSEIF (lbound==5 .OR. lbound==6)
THEN
518 IF (lbound==5) kblk =
kpnbeg
519 IF (lbound==6) kblk = kpnend
525 ELSEIF (ipcorn==2)
THEN
530 ELSEIF (ipcorn==3)
THEN
535 ELSEIF (ipcorn==4)
THEN
543 IF (iptc/=iblk .OR. jptc/=jblk .OR. kptc/=kblk)
THEN
545 ijkcurr = indijk(iptc,jptc,kptc,inoff,ijnoff)
546 DO intcorn=1,
grid%nCorns(ireg)
547 IF (ijkcorn(intcorn)==ijkcurr)
THEN
551 IF (.NOT. wasfound)
THEN
552 grid%nCorns(ireg) =
grid%nCorns(ireg) +1
553 ijkcorn(
grid%nCorns(ireg)) = ijkcurr
556 IF (
grid%nCorns(ireg) >= ncmax)
THEN
557 CALL
errorstop( global,err_illegal_value,__line__, &
558 'too low ncMax in RFLO_ModMoveGridNconform/RFLO_MgFrameCornPoints')
563 regnc =
grid%nCorns(ireg)
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,6,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)
622 #include "Indexing.h"
625 TYPE(t_region
),
POINTER :: regions(:)
626 INTEGER :: iselect, iter
629 INTEGER ::
i, l, ireg, corner(8)
632 INTEGER :: ilev, ncorns, regnc, errfl
635 REAL(RFREAL),
ALLOCATABLE :: rvar(:,:,:)
636 REAL(RFREAL),
POINTER :: dxyz(:,:)
643 global => regions(1)%global
646 'RFLO_ModMoveGridConform.F90' )
651 ALLOCATE( rvar(xcoord:zcoord,regnc,global%nRegions), &
654 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
659 DO ireg = 1,global%nRegions
660 IF (regions(ireg)%procid==global%myProcid .AND. &
661 regions(ireg)%active==active)
THEN
663 grid => regions(ireg)%levels(ilev)%grid
674 corner(2) = indijk(
ipnbeg ,
jpnbeg ,kpnend ,inoff,ijnoff)
675 corner(3) = indijk(
ipnbeg ,
jpnend ,kpnend ,inoff,ijnoff)
678 corner(6) = indijk(
ipnend ,
jpnbeg ,kpnend ,inoff,ijnoff)
679 corner(7) = indijk(
ipnend ,
jpnend ,kpnend ,inoff,ijnoff)
684 grid%regCornOld(xcoord,
i,ireg) = dxyz(xcoord,corner(
i))
685 grid%regCornOld(ycoord,
i,ireg) = dxyz(ycoord,corner(
i))
686 grid%regCornOld(zcoord,
i,ireg) = dxyz(zcoord,corner(
i))
687 rvar(:,
i,ireg) =
grid%regCornOld(:,
i,ireg)
691 grid%regCornOrig(xcoord,
i,ireg) = dxyz(xcoord,corner(
i))
692 grid%regCornOrig(ycoord,
i,ireg) = dxyz(ycoord,corner(
i))
693 grid%regCornOrig(zcoord,
i,ireg) = dxyz(zcoord,corner(
i))
694 rvar(:,
i,ireg) =
grid%regCornOrig(:,
i,ireg)
702 DO ireg = 1,global%nRegions
705 CALL mpi_bcast( rvar(xcoord:zcoord,1:ncorns,ireg),3*ncorns, &
706 mpi_rfreal,regions(ireg)%procId,global%mpiComm,global%mpierr )
707 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,__line__ )
709 CALL mpi_barrier( global%mpiComm,global%mpierr )
711 DO ireg = 1,global%nRegions
712 IF (regions(ireg)%procid==global%myProcid .AND. &
713 regions(ireg)%active==active)
THEN
715 grid => regions(ireg)%levels(ilev)%grid
718 DO l=1,global%nRegions
719 grid%regCornOld(:,:,l) = rvar(:,:,l)
722 DO l=1,global%nRegions
723 grid%regCornOrig(:,:,l) = rvar(:,:,l)
727 DO l=1,global%nRegions
728 grid%regCornOld(:,:,l) = rvar(:,:,l)
773 TYPE(t_region
),
POINTER :: regions(:)
776 INTEGER ::
i,
j,
k, ipatch,
ic, ireg, nc, nreg
782 INTEGER :: ijknode(4), ncmin(6), nregmin(6), inoff, ijnoff, lbound, errfl
783 REAL(RFREAL) :: edgelen, ds, tol, distmin(6)
784 REAL(RFREAL),
POINTER :: xyz(:,:)
785 REAL(RFREAL),
ALLOCATABLE ::
dist(:,:)
793 global => regions(1)%global
796 'RFLO_ModMoveGridConform.F90' )
800 ALLOCATE(
dist(8,global%nRegions), stat=errfl );
IF (errfl>0) goto 88
804 DO ireg = 1,global%nRegions
805 IF (regions(ireg)%procid==global%myProcid .AND. &
806 regions(ireg)%active==active)
THEN
808 grid => regions(ireg)%levels(ilev)%grid
816 xyz => regions(ireg)%levels(ilev)%grid%xyz
820 edgelen = 1.e+30_rfreal
825 ijknode(1) = indijk(
i ,
j ,
k ,inoff,ijnoff)
826 ijknode(2) = indijk(
i+1,
j ,
k ,inoff,ijnoff)
827 ijknode(3) = indijk(
i ,
j+1,
k ,inoff,ijnoff)
828 ijknode(4) = indijk(
i ,
j ,
k+1,inoff,ijnoff)
829 ds =
sqrt((xyz(xcoord,ijknode(2))-xyz(xcoord,ijknode(1)))**2+ &
830 (xyz(ycoord,ijknode(2))-xyz(ycoord,ijknode(1)))**2+ &
831 (xyz(zcoord,ijknode(2))-xyz(zcoord,ijknode(1)))**2)
832 edgelen =
min(edgelen,ds)
833 ds =
sqrt((xyz(xcoord,ijknode(3))-xyz(xcoord,ijknode(1)))**2+ &
834 (xyz(ycoord,ijknode(3))-xyz(ycoord,ijknode(1)))**2+ &
835 (xyz(zcoord,ijknode(3))-xyz(zcoord,ijknode(1)))**2)
836 edgelen =
min(edgelen,ds)
837 ds =
sqrt((xyz(xcoord,ijknode(4))-xyz(xcoord,ijknode(1)))**2+ &
838 (xyz(ycoord,ijknode(4))-xyz(ycoord,ijknode(1)))**2+ &
839 (xyz(zcoord,ijknode(4))-xyz(zcoord,ijknode(1)))**2)
840 edgelen =
min(edgelen,ds)
844 tol = 1.e-5_rfreal*edgelen
847 distmin(1:6) = 1.e+30_rfreal
850 DO nreg = 1,global%nRegions
852 dist(nc,nreg) =
sqrt((
grid%regCornOrig(xcoord,nc,nreg)- &
853 grid%regCornOrig(xcoord,
ic,ireg))**2 + &
854 (
grid%regCornOrig(ycoord,nc,nreg)- &
855 grid%regCornOrig(ycoord,
ic,ireg))**2 + &
856 (
grid%regCornOrig(zcoord,nc,nreg)- &
857 grid%regCornOrig(zcoord,
ic,ireg))**2)
871 IF (
dist(nc,nreg)<distmin(1) .AND.
dist(nc,nreg)>edgelen)
THEN
873 distmin(
k) = distmin(
k-1)
874 ncmin(
k) = ncmin(
k-1)
875 nregmin(
k) = nregmin(
k-1)
877 distmin(1) =
dist(nc,nreg)
883 IF (
dist(nc,nreg) > (distmin(
k-1) + tol) .AND. &
884 dist(nc,nreg) < (distmin(
k) - tol))
THEN
889 distmin(
j) = distmin(
j-1)
890 ncmin(
j) = ncmin(
j-1)
891 nregmin(
j) = nregmin(
j-1)
893 distmin(
k) =
dist(nc,nreg)
912 grid%nghbor(3,:,:) = 1
915 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(1)%interact).OR. &
916 (.NOT. regions(ireg)%levels(ilev)%edgeCells(1)%interact).OR. &
917 (.NOT. regions(ireg)%levels(ilev)%edgeCells(4)%interact).OR. &
918 (.NOT. regions(ireg)%levels(ilev)%edgeCells(9)%interact)) &
919 grid%nghbor(3,1:6,1) = 0
922 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(2)%interact).OR. &
923 (.NOT. regions(ireg)%levels(ilev)%edgeCells(1)%interact).OR. &
924 (.NOT. regions(ireg)%levels(ilev)%edgeCells(2)%interact).OR. &
925 (.NOT. regions(ireg)%levels(ilev)%edgeCells(10)%interact)) &
926 grid%nghbor(3,1:6,2) = 0
929 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(3)%interact).OR. &
930 (.NOT. regions(ireg)%levels(ilev)%edgeCells(2)%interact).OR. &
931 (.NOT. regions(ireg)%levels(ilev)%edgeCells(3)%interact).OR. &
932 (.NOT. regions(ireg)%levels(ilev)%edgeCells(11)%interact)) &
933 grid%nghbor(3,1:6,3) = 0
936 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(4)%interact).OR. &
937 (.NOT. regions(ireg)%levels(ilev)%edgeCells(3)%interact).OR. &
938 (.NOT. regions(ireg)%levels(ilev)%edgeCells(4)%interact).OR. &
939 (.NOT. regions(ireg)%levels(ilev)%edgeCells(12)%interact)) &
940 grid%nghbor(3,1:6,4) = 0
943 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(5)%interact).OR. &
944 (.NOT. regions(ireg)%levels(ilev)%edgeCells(5)%interact).OR. &
945 (.NOT. regions(ireg)%levels(ilev)%edgeCells(8)%interact).OR. &
946 (.NOT. regions(ireg)%levels(ilev)%edgeCells(9)%interact)) &
947 grid%nghbor(3,1:6,5) = 0
950 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(6)%interact).OR. &
951 (.NOT. regions(ireg)%levels(ilev)%edgeCells(5)%interact).OR. &
952 (.NOT. regions(ireg)%levels(ilev)%edgeCells(6)%interact).OR. &
953 (.NOT. regions(ireg)%levels(ilev)%edgeCells(10)%interact)) &
954 grid%nghbor(3,1:6,6) = 0
957 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(7)%interact).OR. &
958 (.NOT. regions(ireg)%levels(ilev)%edgeCells(6)%interact).OR. &
959 (.NOT. regions(ireg)%levels(ilev)%edgeCells(7)%interact).OR. &
960 (.NOT. regions(ireg)%levels(ilev)%edgeCells(11)%interact)) &
961 grid%nghbor(3,1:6,7) = 0
964 IF ((.NOT. regions(ireg)%levels(ilev)%cornerCells(8)%interact).OR. &
965 (.NOT. regions(ireg)%levels(ilev)%edgeCells(7)%interact).OR. &
966 (.NOT. regions(ireg)%levels(ilev)%edgeCells(8)%interact).OR. &
967 (.NOT. regions(ireg)%levels(ilev)%edgeCells(12)%interact)) &
968 grid%nghbor(3,1:6,8) = 0
972 DO ipatch=1,regions(ireg)%nPatches
973 patch => regions(ireg)%levels(ilev)%patches(ipatch)
974 lbound =
patch%lbound
975 bctype =
patch%bcType
980 IF (
patch%bcMotion == bc_external)
THEN
986 ELSEIF (lbound==2)
THEN
991 ELSEIF (lbound==3)
THEN
996 ELSEIF (lbound==4)
THEN
1001 ELSEIF (lbound==5)
THEN
1006 ELSEIF (lbound==6)
THEN
1015 DO ipatch=1,regions(ireg)%nPatches
1016 patch => regions(ireg)%levels(ilev)%patches(ipatch)
1017 lbound =
patch%lbound
1018 bctype =
patch%bcType
1023 IF ((bctype>=bc_inflow .AND. bctype<=bc_inflow +bc_range) .OR. &
1024 (bctype>=bc_outflow .AND. bctype<=bc_outflow +bc_range) .OR. &
1025 (bctype>=bc_slipwall .AND. bctype<=bc_slipwall +bc_range) .OR. &
1026 (bctype>=bc_noslipwall .AND. bctype<=bc_noslipwall+bc_range) .OR. &
1027 (bctype>=bc_farfield .AND. bctype<=bc_farfield +bc_range) .OR. &
1028 (bctype>=bc_injection .AND. bctype<=bc_injection +bc_range) .OR. &
1029 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR. &
1030 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range))
THEN
1036 ELSEIF (lbound==2)
THEN
1041 ELSEIF (lbound==3)
THEN
1046 ELSEIF (lbound==4)
THEN
1051 ELSEIF (lbound==5)
THEN
1056 ELSEIF (lbound==6)
THEN
1080 DEALLOCATE(
dist, stat=errfl );
IF (errfl>0) goto 99
1088 global%error = errfl
1089 CALL
errorstop( global,err_allocate,__line__ )
1093 global%error = errfl
1094 CALL
errorstop( global,err_deallocate,__line__ )
1124 TYPE(t_region
),
POINTER :: regions(:)
1127 INTEGER ::
i,
j,
k,
ic, ireg, nc, nreg, lc, lreg
1131 INTEGER :: ijknode(4), inoff, ijnoff, errfl
1132 REAL(RFREAL) :: edgelen, ds, du2, dumax
1133 REAL(RFREAL),
POINTER :: xyz(:,:)
1134 REAL(RFREAL),
ALLOCATABLE ::
dist(:,:)
1142 global => regions(1)%global
1145 'RFLO_ModMoveGridConform.F90' )
1149 ALLOCATE(
dist(8,global%nRegions), stat=errfl );
IF (errfl>0) goto 88
1153 DO ireg = 1,global%nRegions
1154 IF (regions(ireg)%procid==global%myProcid .AND. &
1155 regions(ireg)%active==active)
THEN
1157 grid => regions(ireg)%levels(ilev)%grid
1163 xyz => regions(ireg)%levels(ilev)%gridOld%xyz
1167 edgelen = 1.e+30_rfreal
1172 ijknode(1) = indijk(
i ,
j ,
k ,inoff,ijnoff)
1173 ijknode(2) = indijk(
i+1,
j ,
k ,inoff,ijnoff)
1174 ijknode(3) = indijk(
i ,
j+1,
k ,inoff,ijnoff)
1175 ijknode(4) = indijk(
i ,
j ,
k+1,inoff,ijnoff)
1176 ds =
sqrt((xyz(xcoord,ijknode(2))-xyz(xcoord,ijknode(1)))**2+ &
1177 (xyz(ycoord,ijknode(2))-xyz(ycoord,ijknode(1)))**2+ &
1178 (xyz(zcoord,ijknode(2))-xyz(zcoord,ijknode(1)))**2)
1179 edgelen =
min(edgelen,ds)
1180 ds =
sqrt((xyz(xcoord,ijknode(3))-xyz(xcoord,ijknode(1)))**2+ &
1181 (xyz(ycoord,ijknode(3))-xyz(ycoord,ijknode(1)))**2+ &
1182 (xyz(zcoord,ijknode(3))-xyz(zcoord,ijknode(1)))**2)
1183 edgelen =
min(edgelen,ds)
1184 ds =
sqrt((xyz(xcoord,ijknode(4))-xyz(xcoord,ijknode(1)))**2+ &
1185 (xyz(ycoord,ijknode(4))-xyz(ycoord,ijknode(1)))**2+ &
1186 (xyz(zcoord,ijknode(4))-xyz(zcoord,ijknode(1)))**2)
1187 edgelen =
min(edgelen,ds)
1196 dumax = -1.e+20_rfreal
1198 DO lreg = 1,global%nRegions
1200 dist(lc,lreg) =
sqrt((
grid%regCornOrig(xcoord,nc,nreg)- &
1201 grid%regCornOrig(xcoord,lc,lreg))**2 + &
1202 (
grid%regCornOrig(ycoord,nc,nreg)- &
1203 grid%regCornOrig(ycoord,lc,lreg))**2 + &
1204 (
grid%regCornOrig(zcoord,nc,nreg)- &
1205 grid%regCornOrig(zcoord,lc,lreg))**2)
1207 IF (
dist(lc,lreg) < 0.1_rfreal*edgelen)
THEN
1208 du2 =
grid%regCornOld(xcoord,lc,lreg)**2 + &
1209 grid%regCornOld(ycoord,lc,lreg)**2 + &
1210 grid%regCornOld(zcoord,lc,lreg)**2
1212 IF ( du2 > dumax )
THEN
1228 DEALLOCATE(
dist, stat=errfl );
IF (errfl>0) goto 99
1236 global%error = errfl
1237 CALL
errorstop( global,err_allocate,__line__ )
1241 global%error = errfl
1242 CALL
errorstop( global,err_deallocate,__line__ )
1270 #include "Indexing.h"
1273 TYPE(t_region
),
POINTER :: regions(:)
1276 INTEGER :: ireg, ico,
k
1279 INTEGER :: ilev, interior, nco(6), nreg(6),
ic(8)
1281 REAL(RFREAL) :: rdenom, amp(3), pow,
dist(6), wght(6)
1288 global => regions(1)%global
1291 'RFLO_ModMoveGridConform.F90' )
1296 amp(1) = global%moveGridAmplifX
1297 amp(2) = global%moveGridAmplifY
1298 amp(3) = global%moveGridAmplifZ
1299 pow = global%moveGridPower
1301 DO ireg = 1,global%nRegions
1302 IF (regions(ireg)%procid==global%myProcid .AND. &
1303 regions(ireg)%active==active)
THEN
1305 grid => regions(ireg)%levels(ilev)%grid
1308 nco(1:6) =
grid%nghbor(1,1:6,ico)
1309 nreg(1:6) =
grid%nghbor(2,1:6,ico)
1310 interior =
grid%nghbor(3,1 ,ico)
1312 IF (interior==1)
THEN
1314 dist(
k) = (
grid%regCornOrig(xcoord,nco(
k),nreg(
k)) - &
1315 grid%regCornOrig(xcoord,ico,ireg))**2 + &
1316 (
grid%regCornOrig(ycoord,nco(
k),nreg(
k)) - &
1317 grid%regCornOrig(ycoord,ico,ireg))**2 + &
1318 (
grid%regCornOrig(zcoord,nco(
k),nreg(
k)) - &
1319 grid%regCornOrig(zcoord,ico,ireg))**2
1328 CALL
errorstop( global,err_illegal_value,__line__, &
1329 'invalid weights for global frame motion')
1332 grid%regCorn(xcoord,ico,ireg) = &
1333 (wght(1)*
grid%regCornOld(xcoord,nco(1),nreg(1)) + &
1334 wght(2)*
grid%regCornOld(xcoord,nco(2),nreg(2)) + &
1335 wght(3)*
grid%regCornOld(xcoord,nco(3),nreg(3)) + &
1336 wght(4)*
grid%regCornOld(xcoord,nco(4),nreg(4)) + &
1337 wght(5)*
grid%regCornOld(xcoord,nco(5),nreg(5)) + &
1338 wght(6)*
grid%regCornOld(xcoord,nco(6),nreg(6)))
1340 grid%regCorn(ycoord,ico,ireg) = &
1341 (wght(1)*
grid%regCornOld(ycoord,nco(1),nreg(1)) + &
1342 wght(2)*
grid%regCornOld(ycoord,nco(2),nreg(2)) + &
1343 wght(3)*
grid%regCornOld(ycoord,nco(3),nreg(3)) + &
1344 wght(4)*
grid%regCornOld(ycoord,nco(4),nreg(4)) + &
1345 wght(5)*
grid%regCornOld(ycoord,nco(5),nreg(5)) + &
1346 wght(6)*
grid%regCornOld(ycoord,nco(6),nreg(6)))
1348 grid%regCorn(zcoord,ico,ireg) = &
1349 (wght(1)*
grid%regCornOld(zcoord,nco(1),nreg(1)) + &
1350 wght(2)*
grid%regCornOld(zcoord,nco(2),nreg(2)) + &
1351 wght(3)*
grid%regCornOld(zcoord,nco(3),nreg(3)) + &
1352 wght(4)*
grid%regCornOld(zcoord,nco(4),nreg(4)) + &
1353 wght(5)*
grid%regCornOld(zcoord,nco(5),nreg(5)) + &
1354 wght(6)*
grid%regCornOld(zcoord,nco(6),nreg(6)))
1360 DO ireg = 1,global%nRegions
1361 IF (regions(ireg)%procid==global%myProcid .AND. &
1362 regions(ireg)%active==active)
THEN
1368 grid => regions(ireg)%levels(ilev)%grid
1380 interior =
grid%nghbor(3, 1, ico)
1381 IF (interior==1)
THEN
1382 grid%regCornOld(xcoord,ico,ireg)=amp(1)*
grid%regCorn(xcoord,ico,ireg)
1383 grid%regCornOld(ycoord,ico,ireg)=amp(2)*
grid%regCorn(ycoord,ico,ireg)
1384 grid%regCornOld(zcoord,ico,ireg)=amp(3)*
grid%regCorn(zcoord,ico,ireg)
1386 grid%xyz(xcoord,
ic(ico)) =
grid%regCorn(xcoord,ico,ireg)
1387 grid%xyz(ycoord,
ic(ico)) =
grid%regCorn(ycoord,ico,ireg)
1388 grid%xyz(zcoord,
ic(ico)) =
grid%regCorn(zcoord,ico,ireg)
1426 LOGICAL :: somemoved
1429 TYPE(t_region
),
POINTER :: regions(:)
1432 INTEGER :: ireg, iter, ipatch,
i,
j,
k, ijkn
1435 INTEGER :: ilev, bctype
1443 global => regions(1)%global
1446 'RFLO_ModMoveGridConform.F90' )
1453 DO ireg=1,global%nRegions
1454 IF (regions(ireg)%procid==global%myProcid .AND. &
1455 regions(ireg)%active==active .AND. &
1456 regions(ireg)%mixtInput%moveGrid)
THEN
1458 grid => regions(ireg)%levels(ilev)%grid
1459 gridold => regions(ireg)%levels(ilev)%gridOld
1464 gridold%indSvel =
grid%indSvel
1465 gridold%ipc =
grid%ipc
1466 gridold%jpc =
grid%jpc
1467 gridold%kpc =
grid%kpc
1468 gridold%xyz(:,:) =
grid%xyz(:,:)
1469 gridold%si(:,:) =
grid%si(:,:)
1470 gridold%sj(:,:) =
grid%sj(:,:)
1471 gridold%sk(:,:) =
grid%sk(:,:)
1472 gridold%vol(:) =
grid%vol(:)
1500 DO ireg=1,global%nRegions
1501 IF (regions(ireg)%procid==global%myProcid .AND. &
1502 regions(ireg)%active==active .AND. &
1503 regions(ireg)%mixtInput%moveGrid)
THEN
1505 grid => regions(ireg)%levels(ilev)%grid
1506 gridold => regions(ireg)%levels(ilev)%gridOld
1520 gridold%xyzOld,
grid%xyz )
1527 gridold%xyzOld,
grid%xyz )
1562 TYPE(t_region
) :: region
1565 INTEGER :: ireg, ipatch,
i,
j,
k
1568 INTEGER :: ilev, ijkn, lbound
1576 global => region%global
1579 'RFLO_ModMoveGridConform.F90' )
1586 grid => region%levels(ilev)%grid
1590 DO ipatch=1,region%nPatches
1591 patch => region%levels(ilev)%patches(ipatch)
1592 lbound =
patch%lbound
1594 IF (
patch%bcMotion == bc_external .AND. &
1595 (
grid%allExternal(lbound).EQV..false.))
THEN
1602 ijkn = indijk(
i,
j,
k,inoff,ijnoff)
1603 grid%xyz(xcoord,ijkn) =
grid%xyzOld(xcoord,ijkn)
1604 grid%xyz(ycoord,ijkn) =
grid%xyzOld(ycoord,ijkn)
1605 grid%xyz(zcoord,ijkn) =
grid%xyzOld(zcoord,ijkn)
1643 arclen12,arclen34,arclen56,xyzold,dnode )
1649 #include "Indexing.h"
1652 LOGICAL :: boundmoved(6), allexternal(6), edgemoved(12)
1655 REAL(RFREAL),
POINTER :: arclen12(:,:), arclen34(:,:), arclen56(:,:)
1656 REAL(RFREAL),
POINTER :: dnode(:,:), xyzold(:,:)
1658 TYPE(t_region
) :: region
1661 INTEGER :: iedge, ind
1665 INTEGER :: indbeg, indend, ijkn, ijkn1, ijknbeg, ijknend, inoff, ijnoff
1666 INTEGER :: switch(12,11), intertype, iedgeglo
1668 REAL(RFREAL) :: arclen, ds,
s, dn(3), dnbeg(3), dnend(3)
1674 'RFLO_ModMoveGridConform.F90' )
1696 switch( 1,:) = (/5, 6, 1, 3, 56,
kpnbeg, kpnend,
ipnbeg,
jpnbeg, 1, 2/)
1697 switch( 2,:) = (/3, 4, 1, 6, 34,
jpnbeg,
jpnend, kpnend,
ipnbeg, 2, 3/)
1698 switch( 3,:) = (/5, 6, 1, 4, 56,
kpnbeg, kpnend,
ipnbeg,
jpnend, 4, 3/)
1699 switch( 4,:) = (/3, 4, 1, 5, 34,
jpnbeg,
jpnend,
kpnbeg,
ipnbeg, 1, 4/)
1700 switch( 5,:) = (/5, 6, 2, 3, 56,
kpnbeg, kpnend,
ipnend,
jpnbeg, 5, 6/)
1701 switch( 6,:) = (/3, 4, 2, 6, 34,
jpnbeg,
jpnend, kpnend,
ipnend, 6, 7/)
1702 switch( 7,:) = (/5, 6, 2, 4, 56,
kpnbeg, kpnend,
ipnend,
jpnend, 8, 7/)
1703 switch( 8,:) = (/3, 4, 2, 5, 34,
jpnbeg,
jpnend,
kpnbeg,
ipnend, 5, 8/)
1704 switch( 9,:) = (/1, 2, 3, 5, 12,
ipnbeg,
ipnend,
jpnbeg,
kpnbeg, 1, 5/)
1705 switch(10,:) = (/1, 2, 3, 6, 12,
ipnbeg,
ipnend,
jpnbeg, kpnend, 2, 6/)
1706 switch(11,:) = (/1, 2, 4, 5, 12,
ipnbeg,
ipnend,
jpnend,
kpnbeg, 4, 8/)
1707 switch(12,:) = (/1, 2, 4, 6, 12,
ipnbeg,
ipnend,
jpnend, kpnend, 3, 7/)
1711 edgemoved(:) = .false.
1714 IF (boundmoved(1) .AND. allexternal(1))
THEN
1715 edgemoved( 1) = .true.; edgemoved( 2) = .true.
1716 edgemoved( 3) = .true.; edgemoved( 4) = .true.
1718 IF (boundmoved(2) .AND. allexternal(2))
THEN
1719 edgemoved( 5) = .true.; edgemoved( 6) = .true.
1720 edgemoved( 7) = .true.; edgemoved( 8) = .true.
1722 IF (boundmoved(3) .AND. allexternal(3))
THEN
1723 edgemoved( 1) = .true.; edgemoved( 5) = .true.
1724 edgemoved( 9) = .true.; edgemoved(10) = .true.
1726 IF (boundmoved(4) .AND. allexternal(4))
THEN
1727 edgemoved( 3) = .true.; edgemoved( 7) = .true.
1728 edgemoved(11) = .true.; edgemoved(12) = .true.
1730 IF (boundmoved(5) .AND. allexternal(5))
THEN
1731 edgemoved( 4) = .true.; edgemoved( 8) = .true.
1732 edgemoved( 9) = .true.; edgemoved(11) = .true.
1734 IF (boundmoved(6) .AND. allexternal(6))
THEN
1735 edgemoved( 2) = .true.; edgemoved( 6) = .true.
1736 edgemoved(10) = .true.; edgemoved(12) = .true.
1743 IF (.NOT.edgemoved(iedge))
THEN
1745 edgemoved(iedge) = .true.
1748 indbeg = switch(iedge,6)
1749 indend = switch(iedge,7)
1750 l1c = switch(iedge,8)
1751 l2c = switch(iedge,9)
1754 IF (iedge==11) iedgeglo=12
1755 IF (iedge==12) iedgeglo=11
1756 interact = region%levels(ilev)%edgeCells(iedgeglo)%interact
1757 intertype = region%levels(ilev)%edgeCells(iedgeglo)%interType
1759 IF (((region%levels(ilev)%grid%nghbor(3,1,switch(iedge,10))==1 .OR. &
1760 region%levels(ilev)%grid%nghbor(3,1,switch(iedge,11))==1) .AND. &
1761 ((interact .EQV. .true.) .AND. (intertype==edge_interact_full))) &
1763 region%levels(ilev)%grid%nghbor(3,1,switch(iedge,10))==2 .OR. &
1764 region%levels(ilev)%grid%nghbor(3,1,switch(iedge,11))==2)
THEN
1766 DO ind=indbeg+1,indend-1
1767 IF (switch(iedge,5) == 12)
THEN
1768 ijkn = indijk(ind ,l1c,l2c,inoff,ijnoff)
1769 ijkn1 = indijk(ind-1 ,l1c,l2c,inoff,ijnoff)
1770 ijknbeg = indijk(indbeg,l1c,l2c,inoff,ijnoff)
1771 ijknend = indijk(indend,l1c,l2c,inoff,ijnoff)
1772 arclen = arclen12(l1c,l2c)
1773 dnbeg(:) = dnode(:,ijknbeg)
1774 dnend(:) = dnode(:,ijknend)
1775 ELSE IF (switch(iedge,5) == 34)
THEN
1776 ijkn = indijk(l2c,ind ,l1c,inoff,ijnoff)
1777 ijkn1 = indijk(l2c,ind-1 ,l1c,inoff,ijnoff)
1778 ijknbeg = indijk(l2c,indbeg,l1c,inoff,ijnoff)
1779 ijknend = indijk(l2c,indend,l1c,inoff,ijnoff)
1780 arclen = arclen34(l1c,l2c)
1781 dnbeg(:) = dnode(:,ijknbeg)
1782 dnend(:) = dnode(:,ijknend)
1783 ELSE IF (switch(iedge,5) == 56)
THEN
1784 ijkn = indijk(l1c,l2c,ind ,inoff,ijnoff)
1785 ijkn1 = indijk(l1c,l2c,ind-1 ,inoff,ijnoff)
1786 ijknbeg = indijk(l1c,l2c,indbeg,inoff,ijnoff)
1787 ijknend = indijk(l1c,l2c,indend,inoff,ijnoff)
1788 arclen = arclen56(l1c,l2c)
1789 dnbeg(:) = dnode(:,ijknbeg)
1790 dnend(:) = dnode(:,ijknend)
1792 ds = ds +
sqrt((xyzold(xcoord,ijkn)-xyzold(xcoord,ijkn1))**2 + &
1793 (xyzold(ycoord,ijkn)-xyzold(ycoord,ijkn1))**2 + &
1794 (xyzold(zcoord,ijkn)-xyzold(zcoord,ijkn1))**2)
1798 dnode(:,ijkn) = dn(:)
1834 TYPE(t_region
),
POINTER :: regions(:)
1838 INTEGER :: ireg, ipatch, ipass
1841 INTEGER :: bctype, iregsrc, ipatchsrc, npass
1843 TYPE(t_grid),
POINTER ::
grid, gridold, gridsrc
1849 global => regions(1)%global
1852 'RFLO_ModMoveGridConform.F90' )
1856 npass = global%moveGridNsmatch
1861 DO ireg=1,global%nRegions
1862 IF (regions(ireg)%procid==global%myProcid .AND. &
1863 regions(ireg)%active==active .AND. &
1864 regions(ireg)%mixtInput%moveGrid)
THEN
1866 grid => regions(ireg)%levels(1)%grid
1867 gridold => regions(ireg)%levels(1)%gridOld
1869 DO ipatch=1,regions(ireg)%nPatches
1870 patch => regions(ireg)%levels(1)%patches(ipatch)
1871 bctype =
patch%bcType
1872 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
1873 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR. &
1874 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range))
THEN
1875 iregsrc =
patch%srcRegion
1876 ipatchsrc =
patch%srcPatch
1877 patchsrc => regions(iregsrc)%levels(1)%patches(ipatchsrc)
1878 gridsrc => regions(iregsrc)%levels(1)%grid
1880 IF (regions(iregsrc)%procid == global%myProcid)
THEN
1882 patch,patchsrc,.false., &
1883 grid%xyz,gridsrc%xyz )
1884 IF (ipass < npass)
THEN
1888 grid%arcLen56,gridold%xyzOld,
grid%xyz )
1892 gridold%xyzOld,
grid%xyz )
1907 DO ireg=1,global%nRegions
1908 IF (regions(ireg)%procid==global%myProcid .AND. &
1909 regions(ireg)%active==active .AND. &
1910 regions(ireg)%mixtInput%moveGrid)
THEN
1912 grid => regions(ireg)%levels(1)%grid
1913 gridold => regions(ireg)%levels(1)%gridOld
1915 DO ipatch=1,regions(ireg)%nPatches
1916 patch => regions(ireg)%levels(1)%patches(ipatch)
1917 bctype =
patch%bcType
1918 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
1919 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR. &
1920 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range))
THEN
1921 iregsrc =
patch%srcRegion
1922 ipatchsrc =
patch%srcPatch
1923 patchsrc => regions(iregsrc)%levels(1)%patches(ipatchsrc)
1924 gridsrc => regions(iregsrc)%levels(1)%grid
1926 IF (regions(iregsrc)%procid /= global%myProcid)
THEN
1929 IF (ipass < npass)
THEN
1933 grid%arcLen56,gridold%xyzOld,
grid%xyz )
1937 gridold%xyzOld,
grid%xyz )
1949 DO ireg=1,global%nRegions
1950 IF (regions(ireg)%procid==global%myProcid .AND. &
1951 regions(ireg)%active==active .AND. &
1952 regions(ireg)%mixtInput%moveGrid)
THEN
1987 arclen12,arclen34,arclen56, &
1994 #include "Indexing.h"
1997 LOGICAL :: boundmoved(6), edgemoved(12)
1999 REAL(RFREAL),
POINTER :: arclen12(:,:), arclen34(:,:), arclen56(:,:)
2000 REAL(RFREAL),
POINTER :: dnode(:,:), xyzold(:,:)
2002 TYPE(t_region
) :: region
2005 INTEGER :: ibound, l1, l2
2009 INTEGER :: l1b, l1e, l2b, l2e, lc, ijkn, ijke(4), ijkem(4), inoff, ijnoff
2010 INTEGER :: switch(6,9)
2014 REAL(RFREAL) :: arclen(4), ds(4),
s(4)
2015 REAL(RFREAL) :: corner(3,8), e1(3), e2(3), e3(3), e4(3), &
2016 p1(3), p2(3), p3(3), p4(3), dn(3)
2021 'RFLO_ModMoveGridConform.F90' )
2046 corner(:,2) = dnode(:,indijk(
ipnbeg,
jpnbeg,kpnend,inoff,ijnoff))
2047 corner(:,3) = dnode(:,indijk(
ipnbeg,
jpnend,kpnend,inoff,ijnoff))
2050 corner(:,6) = dnode(:,indijk(
ipnend,
jpnbeg,kpnend,inoff,ijnoff))
2051 corner(:,7) = dnode(:,indijk(
ipnend,
jpnend,kpnend,inoff,ijnoff))
2061 IF ((edgemoved(switch(ibound,1)) .OR. edgemoved(switch(ibound,2)) .OR. &
2062 edgemoved(switch(ibound,3)) .OR. edgemoved(switch(ibound,4))))
THEN
2064 l1b = switch(ibound,5)
2065 l1e = switch(ibound,6)
2066 l2b = switch(ibound,7)
2067 l2e = switch(ibound,8)
2068 lc = switch(ibound,9)
2070 IF (ibound == 1)
THEN
2075 ELSE IF (ibound == 2)
THEN
2080 ELSE IF (ibound == 3)
THEN
2085 ELSE IF (ibound == 4)
THEN
2090 ELSE IF (ibound == 5)
THEN
2095 ELSE IF (ibound == 6)
THEN
2108 IF (ibound==1 .OR. ibound==2)
THEN
2109 ijkn = indijk(lc,l1 ,l2 ,inoff,ijnoff)
2110 ijke(1) = indijk(lc,
jpnbeg,l2 ,inoff,ijnoff)
2111 ijkem(1) = indijk(lc,
jpnbeg,l2-1 ,inoff,ijnoff)
2112 ijke(2) = indijk(lc,
jpnend,l2 ,inoff,ijnoff)
2113 ijkem(2) = indijk(lc,
jpnend,l2-1 ,inoff,ijnoff)
2114 ijke(3) = indijk(lc,l1 ,
kpnbeg,inoff,ijnoff)
2115 ijkem(3) = indijk(lc,l1-1 ,
kpnbeg,inoff,ijnoff)
2116 ijke(4) = indijk(lc,l1 ,kpnend,inoff,ijnoff)
2117 ijkem(4) = indijk(lc,l1-1 ,kpnend,inoff,ijnoff)
2118 arclen(1) = arclen56(lc,
jpnbeg)
2119 arclen(2) = arclen56(lc,
jpnend)
2120 arclen(3) = arclen34(
kpnbeg,lc)
2121 arclen(4) = arclen34(kpnend,lc)
2122 ELSE IF (ibound==3 .OR. ibound==4)
THEN
2123 ijkn = indijk(l2 ,lc,l1 ,inoff,ijnoff)
2124 ijke(1) = indijk(l2 ,lc,
kpnbeg,inoff,ijnoff)
2125 ijkem(1) = indijk(l2-1 ,lc,
kpnbeg,inoff,ijnoff)
2126 ijke(2) = indijk(l2 ,lc,kpnend,inoff,ijnoff)
2127 ijkem(2) = indijk(l2-1 ,lc,kpnend,inoff,ijnoff)
2128 ijke(3) = indijk(
ipnbeg,lc,l1 ,inoff,ijnoff)
2129 ijkem(3) = indijk(
ipnbeg,lc,l1-1 ,inoff,ijnoff)
2130 ijke(4) = indijk(
ipnend,lc,l1 ,inoff,ijnoff)
2131 ijkem(4) = indijk(
ipnend,lc,l1-1 ,inoff,ijnoff)
2132 arclen(1) = arclen12(lc,
kpnbeg)
2133 arclen(2) = arclen12(lc,kpnend)
2134 arclen(3) = arclen56(
ipnbeg,lc)
2135 arclen(4) = arclen56(
ipnend,lc)
2136 ELSE IF (ibound==5 .OR. ibound==6)
THEN
2137 ijkn = indijk(l1 ,l2 ,lc,inoff,ijnoff)
2138 ijke(1) = indijk(
ipnbeg,l2 ,lc,inoff,ijnoff)
2139 ijkem(1) = indijk(
ipnbeg,l2-1 ,lc,inoff,ijnoff)
2140 ijke(2) = indijk(
ipnend,l2 ,lc,inoff,ijnoff)
2141 ijkem(2) = indijk(
ipnend,l2-1 ,lc,inoff,ijnoff)
2142 ijke(3) = indijk(l1 ,
jpnbeg,lc,inoff,ijnoff)
2143 ijkem(3) = indijk(l1-1 ,
jpnbeg,lc,inoff,ijnoff)
2144 ijke(4) = indijk(l1 ,
jpnend,lc,inoff,ijnoff)
2145 ijkem(4) = indijk(l1-1 ,
jpnend,lc,inoff,ijnoff)
2146 arclen(1) = arclen34(lc,
ipnbeg)
2147 arclen(2) = arclen34(lc,
ipnend)
2148 arclen(3) = arclen12(
jpnbeg,lc)
2149 arclen(4) = arclen12(
jpnend,lc)
2153 sqrt((xyzold(xcoord,ijke(1))-xyzold(xcoord,ijkem(1)))**2 + &
2154 (xyzold(ycoord,ijke(1))-xyzold(ycoord,ijkem(1)))**2 + &
2155 (xyzold(zcoord,ijke(1))-xyzold(zcoord,ijkem(1)))**2)
2157 sqrt((xyzold(xcoord,ijke(2))-xyzold(xcoord,ijkem(2)))**2 + &
2158 (xyzold(ycoord,ijke(2))-xyzold(ycoord,ijkem(2)))**2 + &
2159 (xyzold(zcoord,ijke(2))-xyzold(zcoord,ijkem(2)))**2)
2163 sqrt((xyzold(xcoord,ijke(3))-xyzold(xcoord,ijkem(3)))**2 + &
2164 (xyzold(ycoord,ijke(3))-xyzold(ycoord,ijkem(3)))**2 + &
2165 (xyzold(zcoord,ijke(3))-xyzold(zcoord,ijkem(3)))**2)
2167 sqrt((xyzold(xcoord,ijke(4))-xyzold(xcoord,ijkem(4)))**2 + &
2168 (xyzold(ycoord,ijke(4))-xyzold(ycoord,ijkem(4)))**2 + &
2169 (xyzold(zcoord,ijke(4))-xyzold(zcoord,ijkem(4)))**2)
2170 s(:) = ds(:)/arclen(:)
2171 e1(:) = dnode(:,ijke(1))
2172 e2(:) = dnode(:,ijke(2))
2173 e3(:) = dnode(:,ijke(3))
2174 e4(:) = dnode(:,ijke(4))
2175 CALL
rflo_tfint2d(
s(1),
s(2),
s(3),
s(4),e1,e2,e3,e4,
p1,p2,p3,p4,dn )
2176 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)
**********************************************************************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)
**********************************************************************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
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)
**********************************************************************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)
**********************************************************************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_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
**********************************************************************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 rflo_calcfacecentroids(region)
subroutine, public rflo_mgframecornpoints(regions)
subroutine rflo_mgframecorrectneighbors(regions)