67 CHARACTER(CHRLEN) :: RCSIdentString = &
68 '$RCSfile: RFLO_ModVolMeshSmoothing.F90,v $ $Revision: 1.8 $'
106 include
'roccomf90.h'
110 TYPE(t_region
),
POINTER :: regions(:)
113 INTEGER :: ireg, iter, ipatch, ijk
120 REAL(RFREAL) :: resid, globalresid
121 REAL(RFREAL),
POINTER :: xyz(:,:), xyzold(:,:)
127 DOUBLE PRECISION :: dalpha
132 global => regions(1)%global
135 'RFLO_ModVolMeshSmoothing.F90' )
140 dalpha = global%dtMin/global%dTimeSystem
141 CALL com_call_function( global%genxHandleGm,1,dalpha )
151 DO iter=1,global%moveGridNiter
155 IF (global%verbLevel /= verbose_none)
THEN
157 CALL mpi_reduce( resid,globalresid,1,mpi_rfreal,mpi_sum, &
158 masterproc,global%mpiComm,global%mpierr )
159 IF (global%mpierr /= 0) CALL
errorstop( global,err_mpi_trouble,&
164 IF (global%myProcid == masterproc)
THEN
165 WRITE(stdout,1000) solver_name,global%moveGridNiter,
sqrt(globalresid)
172 DO ireg=1,global%nRegions
173 IF (regions(ireg)%procid==global%myProcid .AND. &
174 regions(ireg)%active==active .AND. &
175 regions(ireg)%mixtInput%moveGrid)
THEN
179 xyz => regions(ireg)%levels(1)%grid%xyz
180 xyzold => regions(ireg)%levels(1)%gridOld%xyz
182 DO ijk=lbound(xyz,2),ubound(xyz,2)
183 xyz(xcoord,ijk) = xyz(xcoord,ijk) - xyzold(xcoord,ijk)
184 xyz(ycoord,ijk) = xyz(ycoord,ijk) - xyzold(ycoord,ijk)
185 xyz(zcoord,ijk) = xyz(zcoord,ijk) - xyzold(zcoord,ijk)
190 grid => regions(ireg)%levels(1)%grid
191 gridold => regions(ireg)%levels(1)%gridOld
192 grid%boundMoved(:) = .true.
193 grid%edgeMoved(:) = .true.
194 DO ipatch=1,regions(ireg)%nPatches
195 patch => regions(ireg)%levels(1)%patches(ipatch)
196 bctype =
patch%bcType
200 IF ((bctype.eq.bc_symmetry))
THEN
207 gridold%xyzOld,
grid%xyz )
214 gridold%xyzOld,
grid%xyz )
228 DO ireg=1,global%nRegions
229 IF (regions(ireg)%procid==global%myProcid .AND. &
230 regions(ireg)%active==active .AND. &
231 regions(ireg)%mixtInput%moveGrid)
THEN
235 IF (regions(ireg)%mixtInput%faceEdgeAvg==fe_avg_linear) &
247 1000
FORMAT(
a,1
x,
'VMS grid motion: ',i6,1pe13.4)
273 TYPE(t_region
),
POINTER :: regions(:)
284 global => regions(1)%global
287 'RFLO_ModVolMeshSmoothing.F90' )
293 DO ireg=1,global%nRegions
294 IF (regions(ireg)%procid==global%myProcid .AND. &
295 regions(ireg)%active==active .AND. &
296 regions(ireg)%mixtInput%moveGrid)
THEN
298 grid => regions(ireg)%levels(1)%grid
299 gridold => regions(ireg)%levels(1)%gridOld
304 gridold%indSvel =
grid%indSvel
305 gridold%ipc =
grid%ipc
306 gridold%jpc =
grid%jpc
307 gridold%kpc =
grid%kpc
308 gridold%xyz(:,:) =
grid%xyz(:,:)
309 gridold%si(:,:) =
grid%si(:,:)
310 gridold%sj(:,:) =
grid%sj(:,:)
311 gridold%sk(:,:) =
grid%sk(:,:)
312 gridold%vol(:) =
grid%vol(:)
354 #include "Indexing.h"
358 REAL(RFREAL) :: resid
360 TYPE(t_region
),
POINTER :: regions(:)
363 INTEGER :: ireg, ipatch, ijk,
i,
j,
k
367 INTEGER :: bctype, iregsrc, ipatchsrc
369 REAL(RFREAL) ::
dx,
dy,
dz
370 REAL(RFREAL),
POINTER :: xyz(:,:), xyzold(:,:)
373 TYPE(t_grid),
POINTER ::
grid, gridold, gridsrc
378 global => regions(1)%global
381 'RFLO_ModVolMeshSmoothing.F90' )
387 DO ireg=1,global%nRegions
388 IF (regions(ireg)%procid==global%myProcid .AND. &
389 regions(ireg)%active==active .AND. &
390 regions(ireg)%mixtInput%moveGrid)
THEN
398 DO ipatch=1,regions(ireg)%nPatches
399 patch => regions(ireg)%levels(1)%patches(ipatch)
400 bctype =
patch%bcType
401 IF ((bctype>=bc_inflow .AND. bctype<=bc_inflow +bc_range) .OR. &
402 (bctype>=bc_outflow .AND. bctype<=bc_outflow +bc_range) .OR. &
403 (bctype>=bc_slipwall .AND. bctype<=bc_slipwall +bc_range) .OR. &
404 (bctype>=bc_noslipwall .AND. bctype<=bc_noslipwall+bc_range) .OR. &
405 (bctype>=bc_farfield .AND. bctype<=bc_farfield +bc_range) .OR. &
406 (bctype>=bc_injection .AND. bctype<=bc_injection +bc_range) .OR. &
407 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR. &
408 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range))
THEN
417 xyz => regions(ireg)%levels(1)%grid%xyz
418 xyzold => regions(ireg)%levels(1)%grid%xyzOld
423 ijk = indijk(
i,
j,
k,inoff,ijnoff)
424 dx = xyz(xcoord,ijk) - xyzold(xcoord,ijk)
425 dy = xyz(ycoord,ijk) - xyzold(ycoord,ijk)
426 dz = xyz(zcoord,ijk) - xyzold(zcoord,ijk)
438 DO ireg=1,global%nRegions
439 IF (regions(ireg)%procid==global%myProcid .AND. &
440 regions(ireg)%active==active .AND. &
441 regions(ireg)%mixtInput%moveGrid)
THEN
443 grid => regions(ireg)%levels(1)%grid
444 gridold => regions(ireg)%levels(1)%gridOld
446 DO ipatch=1,regions(ireg)%nPatches
447 patch => regions(ireg)%levels(1)%patches(ipatch)
448 bctype =
patch%bcType
449 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
450 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR. &
451 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range))
THEN
452 iregsrc =
patch%srcRegion
453 ipatchsrc =
patch%srcPatch
454 patchsrc => regions(iregsrc)%levels(1)%patches(ipatchsrc)
455 gridsrc => regions(iregsrc)%levels(1)%grid
457 IF (regions(iregsrc)%procid == global%myProcid)
THEN
459 patch,patchsrc,.true., &
460 grid%xyz,gridsrc%xyz )
473 DO ireg=1,global%nRegions
474 IF (regions(ireg)%procid==global%myProcid .AND. &
475 regions(ireg)%active==active .AND. &
476 regions(ireg)%mixtInput%moveGrid)
THEN
478 grid => regions(ireg)%levels(1)%grid
479 gridold => regions(ireg)%levels(1)%gridOld
481 DO ipatch=1,regions(ireg)%nPatches
482 patch => regions(ireg)%levels(1)%patches(ipatch)
483 bctype =
patch%bcType
484 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
485 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR. &
486 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range))
THEN
487 iregsrc =
patch%srcRegion
488 ipatchsrc =
patch%srcPatch
489 patchsrc => regions(iregsrc)%levels(1)%patches(ipatchsrc)
490 gridsrc => regions(iregsrc)%levels(1)%grid
492 IF (regions(iregsrc)%procid /= global%myProcid)
THEN
504 DO ireg=1,global%nRegions
505 IF (regions(ireg)%procid==global%myProcid .AND. &
506 regions(ireg)%active==active .AND. &
507 regions(ireg)%mixtInput%moveGrid)
THEN
514 DO ireg=1,global%nRegions
515 IF (regions(ireg)%procid==global%myProcid .AND. &
516 regions(ireg)%active==active .AND. &
517 regions(ireg)%mixtInput%moveGrid)
THEN
521 xyz => regions(ireg)%levels(1)%grid%xyz
522 xyzold => regions(ireg)%levels(1)%gridOld%xyz
524 DO ijk=lbound(xyz,2),ubound(xyz,2)
525 xyz(xcoord,ijk) = xyz(xcoord,ijk) + xyzold(xcoord,ijk)
526 xyz(ycoord,ijk) = xyz(ycoord,ijk) + xyzold(ycoord,ijk)
527 xyz(zcoord,ijk) = xyz(zcoord,ijk) + xyzold(zcoord,ijk)
567 #include "Indexing.h"
570 TYPE(t_region
) :: region
571 REAL(RFREAL),
POINTER :: vxyz(:,:)
581 REAL(RFREAL),
POINTER :: xyz(:,:)
585 global => region%global
588 'RFLO_ModVolMeshSmoothing.F90' )
598 xyz => region%levels(ilev)%grid%xyz
602 rd = 1._rfreal/12._rfreal
607 ijk = indijk(
i ,
j ,
k ,inoff,ijnoff)
609 xyz(xcoord,ijk) = vxyz(xcoord,ijk)*rd
610 xyz(ycoord,ijk) = vxyz(ycoord,ijk)*rd
611 xyz(zcoord,ijk) = vxyz(zcoord,ijk)*rd
645 #include "Indexing.h"
648 TYPE(t_region
) :: region
656 INTEGER :: ijk, ip1, im1, jp1, jm1, kp1, km1
658 REAL(RFREAL) :: rxi, ryi, rzi, rxj, ryj, rzj, rxk, ryk, rzk, rd
659 REAL(RFREAL),
POINTER :: xyz(:,:), xyzold(:,:), xyzorig(:,:)
664 'RFLO_ModVolMeshSmoothing.F90' )
678 xyz => region%levels(ilev)%grid%xyz
679 xyzold => region%levels(ilev)%grid%xyzOld
680 xyzorig => region%levels(ilev)%gridOld%xyz
682 rd = 1._rfreal/6._rfreal
687 xyzold(xcoord,ijk) = xyz(xcoord,ijk) - xyzorig(xcoord,ijk)
688 xyzold(ycoord,ijk) = xyz(ycoord,ijk) - xyzorig(ycoord,ijk)
689 xyzold(zcoord,ijk) = xyz(zcoord,ijk) - xyzorig(zcoord,ijk)
697 ijk = indijk(
i ,
j ,
k ,inoff,ijnoff)
698 ip1 = indijk(
i+1,
j ,
k ,inoff,ijnoff)
699 im1 = indijk(
i-1,
j ,
k ,inoff,ijnoff)
700 jp1 = indijk(
i ,
j+1,
k ,inoff,ijnoff)
701 jm1 = indijk(
i ,
j-1,
k ,inoff,ijnoff)
702 kp1 = indijk(
i ,
j ,
k+1,inoff,ijnoff)
703 km1 = indijk(
i ,
j ,
k-1,inoff,ijnoff)
705 rxi = xyzold(xcoord,im1) + xyzold(xcoord,ip1)
706 ryi = xyzold(ycoord,im1) + xyzold(ycoord,ip1)
707 rzi = xyzold(zcoord,im1) + xyzold(zcoord,ip1)
709 rxj = xyzold(xcoord,jm1) + xyzold(xcoord,jp1)
710 ryj = xyzold(ycoord,jm1) + xyzold(ycoord,jp1)
711 rzj = xyzold(zcoord,jm1) + xyzold(zcoord,jp1)
713 rxk = xyzold(xcoord,km1) + xyzold(xcoord,kp1)
714 ryk = xyzold(ycoord,km1) + xyzold(ycoord,kp1)
715 rzk = xyzold(zcoord,km1) + xyzold(zcoord,kp1)
717 xyz(xcoord,ijk) = xyz(xcoord,ijk) + (rxi+rxj+rxk)*rd
718 xyz(ycoord,ijk) = xyz(ycoord,ijk) + (ryi+ryj+ryk)*rd
719 xyz(zcoord,ijk) = xyz(zcoord,ijk) + (rzi+rzj+rzk)*rd
751 #include "Indexing.h"
754 TYPE(t_region
) :: region
764 INTEGER :: inoff, ijnoff, errfl
765 REAL(RFREAL),
POINTER :: dxyz(:,:), vxyz(:,:)
769 global => region%global
772 'RFLO_ModVolMeshSmoothing.F90' )
782 ALLOCATE( dxyz(xcoord:zcoord,ibn:ien), stat=errfl );
IF (errfl>0) goto 88
783 ALLOCATE( vxyz(xcoord:zcoord,ibn:ien), stat=errfl );
IF (errfl>0) goto 88
788 dxyz = region%levels(1)%grid%xyz
790 region%levels(1)%grid%xyz(xcoord,in)= &
791 region%levels(1)%gridOld%xyz(xcoord,in) + dxyz(xcoord,in)
792 region%levels(1)%grid%xyz(ycoord,in)= &
793 region%levels(1)%gridOld%xyz(ycoord,in) + dxyz(ycoord,in)
794 region%levels(1)%grid%xyz(zcoord,in)= &
795 region%levels(1)%gridOld%xyz(zcoord,in) + dxyz(zcoord,in)
830 region%levels(1)%grid%xyz(xcoord,in)= &
831 region%levels(1)%grid%xyz(xcoord,in)- &
832 region%levels(1)%gridOld%xyz(xcoord,in)
833 region%levels(1)%grid%xyz(ycoord,in)= &
834 region%levels(1)%grid%xyz(ycoord,in)- &
835 region%levels(1)%gridOld%xyz(ycoord,in)
836 region%levels(1)%grid%xyz(zcoord,in)= &
837 region%levels(1)%grid%xyz(zcoord,in)- &
838 region%levels(1)%gridOld%xyz(zcoord,in)
843 DEALLOCATE( dxyz, stat=errfl );
IF (errfl>0) goto 99
844 DEALLOCATE( vxyz, stat=errfl );
IF (errfl>0) goto 99
888 #include "Indexing.h"
891 TYPE(t_region
) :: region
892 REAL(RFREAL),
POINTER :: vxyz(:,:)
900 INTEGER :: ilev, inoff, ijnoff, icoff, ijcoff
903 INTEGER :: ijk, m1, m2, m12,
ic, errfl
905 REAL(RFREAL) :: sn, c1, c2, c3, c4, wc, wm
906 REAL(RFREAL),
POINTER :: xyz(:,:), si(:,:), sj(:,:), sk(:,:), cofg(:,:)
907 REAL(RFREAL),
ALLOCATABLE :: fc(:,:), snx(:), sny(:), snz(:)
911 global => region%global
913 'RFLO_ModVolMeshSmoothing.F90' )
928 xyz => region%levels(ilev)%grid%xyz
929 cofg => region%levels(ilev)%grid%cofg
933 si => region%levels(ilev)%grid%si
934 sj => region%levels(ilev)%grid%sj
935 sk => region%levels(ilev)%grid%sk
937 ALLOCATE( fc(xcoord:zcoord,ibn:ien), stat=errfl );
IF (errfl>0) goto 88
938 ALLOCATE( snx(ibn:ien), stat=errfl );
IF (errfl>0) goto 88
939 ALLOCATE( sny(ibn:ien), stat=errfl );
IF (errfl>0) goto 88
940 ALLOCATE( snz(ibn:ien), stat=errfl );
IF (errfl>0) goto 88
950 ijk = indijk(
i ,
j ,
k ,inoff,ijnoff)
951 ic = indijk(
i ,
j ,
k ,icoff,ijcoff)
952 m1 = indijk(
i-1,
j ,
k ,icoff,ijcoff)
957 fc(xcoord,ijk) = wc*cofg(xcoord,
ic) + wm*cofg(xcoord,m1)
958 fc(ycoord,ijk) = wc*cofg(ycoord,
ic) + wm*cofg(ycoord,m1)
959 fc(zcoord,ijk) = wc*cofg(zcoord,
ic) + wm*cofg(zcoord,m1)
961 sn =
sqrt( si(xcoord,ijk)**2+si(ycoord,ijk)**2+si(zcoord,ijk)**2 )
962 snx(ijk) = si(xcoord,ijk)/(sn+1.e-12_rfreal)
963 sny(ijk) = si(ycoord,ijk)/(sn+1.e-12_rfreal)
964 snz(ijk) = si(zcoord,ijk)/(sn+1.e-12_rfreal)
973 ijk = indijk(
i ,
j ,
k ,inoff,ijnoff)
974 m1 = indijk(
i ,
j-1,
k ,inoff,ijnoff)
975 m2 = indijk(
i ,
j ,
k-1,inoff,ijnoff)
976 m12 = indijk(
i ,
j-1,
k-1,inoff,ijnoff)
978 c1 = snx(ijk)*(xyz(xcoord,ijk)-fc(xcoord,ijk))+ &
979 sny(ijk)*(xyz(ycoord,ijk)-fc(ycoord,ijk))+ &
980 snz(ijk)*(xyz(zcoord,ijk)-fc(zcoord,ijk))
982 c2 = snx(m1)*(xyz(xcoord,ijk)-fc(xcoord,m1))+ &
983 sny(m1)*(xyz(ycoord,ijk)-fc(ycoord,m1))+ &
984 snz(m1)*(xyz(zcoord,ijk)-fc(zcoord,m1))
986 c3 = snx(m2)*(xyz(xcoord,ijk)-fc(xcoord,m2))+ &
987 sny(m2)*(xyz(ycoord,ijk)-fc(ycoord,m2))+ &
988 snz(m2)*(xyz(zcoord,ijk)-fc(zcoord,m2))
990 c4 = snx(m12)*(xyz(xcoord,ijk)-fc(xcoord,m12))+ &
991 sny(m12)*(xyz(ycoord,ijk)-fc(ycoord,m12))+ &
992 snz(m12)*(xyz(zcoord,ijk)-fc(zcoord,m12))
994 vxyz(xcoord,ijk) = xyz(xcoord,ijk)-c1*snx(ijk)
995 vxyz(ycoord,ijk) = xyz(ycoord,ijk)-c1*sny(ijk)
996 vxyz(zcoord,ijk) = xyz(zcoord,ijk)-c1*snz(ijk)
998 vxyz(xcoord,ijk) = vxyz(xcoord,ijk)+xyz(xcoord,m1)-c2*snx(m1)
999 vxyz(ycoord,ijk) = vxyz(ycoord,ijk)+xyz(ycoord,m1)-c2*sny(m1)
1000 vxyz(zcoord,ijk) = vxyz(zcoord,ijk)+xyz(zcoord,m1)-c2*snz(m1)
1002 vxyz(xcoord,ijk) = vxyz(xcoord,ijk)+xyz(xcoord,m2)-c3*snx(m2)
1003 vxyz(ycoord,ijk) = vxyz(ycoord,ijk)+xyz(ycoord,m2)-c3*sny(m2)
1004 vxyz(zcoord,ijk) = vxyz(zcoord,ijk)+xyz(zcoord,m2)-c3*snz(m2)
1006 vxyz(xcoord,ijk) = vxyz(xcoord,ijk)+xyz(xcoord,m12)-c4*snx(m12)
1007 vxyz(ycoord,ijk) = vxyz(ycoord,ijk)+xyz(ycoord,m12)-c4*sny(m12)
1008 vxyz(zcoord,ijk) = vxyz(zcoord,ijk)+xyz(zcoord,m12)-c4*snz(m12)
1021 ijk = indijk(
i ,
j ,
k ,inoff,ijnoff)
1022 ic = indijk(
i ,
j ,
k ,icoff,ijcoff)
1023 m1 = indijk(
i ,
j-1,
k ,icoff,ijcoff)
1028 fc(xcoord,ijk) = wc*cofg(xcoord,
ic) + wm*cofg(xcoord,m1)
1029 fc(ycoord,ijk) = wc*cofg(ycoord,
ic) + wm*cofg(ycoord,m1)
1030 fc(zcoord,ijk) = wc*cofg(zcoord,
ic) + wm*cofg(zcoord,m1)
1032 sn =
sqrt( sj(xcoord,ijk)**2+sj(ycoord,ijk)**2+sj(zcoord,ijk)**2 )
1033 snx(ijk) = sj(xcoord,ijk)/(sn+1.e-12_rfreal)
1034 sny(ijk) = sj(ycoord,ijk)/(sn+1.e-12_rfreal)
1035 snz(ijk) = sj(zcoord,ijk)/(sn+1.e-12_rfreal)
1044 ijk = indijk(
i ,
j ,
k ,inoff,ijnoff)
1045 m1 = indijk(
i ,
j ,
k-1,inoff,ijnoff)
1046 m2 = indijk(
i-1,
j ,
k ,inoff,ijnoff)
1047 m12 = indijk(
i-1,
j ,
k-1,inoff,ijnoff)
1049 c1 = snx(ijk)*(xyz(xcoord,ijk)-fc(xcoord,ijk))+ &
1050 sny(ijk)*(xyz(ycoord,ijk)-fc(ycoord,ijk))+ &
1051 snz(ijk)*(xyz(zcoord,ijk)-fc(zcoord,ijk))
1053 c2 = snx(m1)*(xyz(xcoord,ijk)-fc(xcoord,m1))+ &
1054 sny(m1)*(xyz(ycoord,ijk)-fc(ycoord,m1))+ &
1055 snz(m1)*(xyz(zcoord,ijk)-fc(zcoord,m1))
1057 c3 = snx(m2)*(xyz(xcoord,ijk)-fc(xcoord,m2))+ &
1058 sny(m2)*(xyz(ycoord,ijk)-fc(ycoord,m2))+ &
1059 snz(m2)*(xyz(zcoord,ijk)-fc(zcoord,m2))
1061 c4 = snx(m12)*(xyz(xcoord,ijk)-fc(xcoord,m12))+ &
1062 sny(m12)*(xyz(ycoord,ijk)-fc(ycoord,m12))+ &
1063 snz(m12)*(xyz(zcoord,ijk)-fc(zcoord,m12))
1065 vxyz(xcoord,ijk) = vxyz(xcoord,ijk)+xyz(xcoord,ijk)-c1*snx(ijk)
1066 vxyz(ycoord,ijk) = vxyz(xcoord,ijk)+xyz(ycoord,ijk)-c1*sny(ijk)
1067 vxyz(zcoord,ijk) = vxyz(xcoord,ijk)+xyz(zcoord,ijk)-c1*snz(ijk)
1069 vxyz(xcoord,ijk) = vxyz(xcoord,ijk)+xyz(xcoord,m1)-c2*snx(m1)
1070 vxyz(ycoord,ijk) = vxyz(ycoord,ijk)+xyz(ycoord,m1)-c2*sny(m1)
1071 vxyz(zcoord,ijk) = vxyz(zcoord,ijk)+xyz(zcoord,m1)-c2*snz(m1)
1073 vxyz(xcoord,ijk) = vxyz(xcoord,ijk)+xyz(xcoord,m2)-c3*snx(m2)
1074 vxyz(ycoord,ijk) = vxyz(ycoord,ijk)+xyz(ycoord,m2)-c3*sny(m2)
1075 vxyz(zcoord,ijk) = vxyz(zcoord,ijk)+xyz(zcoord,m2)-c3*snz(m2)
1077 vxyz(xcoord,ijk) = vxyz(xcoord,ijk)+xyz(xcoord,m12)-c4*snx(m12)
1078 vxyz(ycoord,ijk) = vxyz(ycoord,ijk)+xyz(ycoord,m12)-c4*sny(m12)
1079 vxyz(zcoord,ijk) = vxyz(zcoord,ijk)+xyz(zcoord,m12)-c4*snz(m12)
1092 ijk = indijk(
i ,
j ,
k ,inoff,ijnoff)
1093 ic = indijk(
i ,
j ,
k ,icoff,ijcoff)
1094 m1 = indijk(
i ,
j ,
k-1,icoff,ijcoff)
1099 fc(xcoord,ijk) = wc*cofg(xcoord,
ic) + wm*cofg(xcoord,m1)
1100 fc(ycoord,ijk) = wc*cofg(ycoord,
ic) + wm*cofg(ycoord,m1)
1101 fc(zcoord,ijk) = wc*cofg(zcoord,
ic) + wm*cofg(zcoord,m1)
1103 sn =
sqrt( sk(xcoord,ijk)**2+sk(ycoord,ijk)**2+sk(zcoord,ijk)**2 )
1104 snx(ijk) = sk(xcoord,ijk)/(sn+1.e-12_rfreal)
1105 sny(ijk) = sk(ycoord,ijk)/(sn+1.e-12_rfreal)
1106 snz(ijk) = sk(zcoord,ijk)/(sn+1.e-12_rfreal)
1115 ijk = indijk(
i ,
j ,
k ,inoff,ijnoff)
1116 m1 = indijk(
i-1,
j ,
k ,inoff,ijnoff)
1117 m2 = indijk(
i ,
j-1,
k ,inoff,ijnoff)
1118 m12 = indijk(
i-1,
j-1,
k ,inoff,ijnoff)
1120 c1 = snx(ijk)*(xyz(xcoord,ijk)-fc(xcoord,ijk))+ &
1121 sny(ijk)*(xyz(ycoord,ijk)-fc(ycoord,ijk))+ &
1122 snz(ijk)*(xyz(zcoord,ijk)-fc(zcoord,ijk))
1124 c2 = snx(m1)*(xyz(xcoord,ijk)-fc(xcoord,m1))+ &
1125 sny(m1)*(xyz(ycoord,ijk)-fc(ycoord,m1))+ &
1126 snz(m1)*(xyz(zcoord,ijk)-fc(zcoord,m1))
1128 c3 = snx(m2)*(xyz(xcoord,ijk)-fc(xcoord,m2))+ &
1129 sny(m2)*(xyz(ycoord,ijk)-fc(ycoord,m2))+ &
1130 snz(m2)*(xyz(zcoord,ijk)-fc(zcoord,m2))
1132 c4 = snx(m12)*(xyz(xcoord,ijk)-fc(xcoord,m12))+ &
1133 sny(m12)*(xyz(ycoord,ijk)-fc(ycoord,m12))+ &
1134 snz(m12)*(xyz(zcoord,ijk)-fc(zcoord,m12))
1136 vxyz(xcoord,ijk) = vxyz(xcoord,ijk)+xyz(xcoord,ijk)-c1*snx(ijk)
1137 vxyz(ycoord,ijk) = vxyz(xcoord,ijk)+xyz(ycoord,ijk)-c1*sny(ijk)
1138 vxyz(zcoord,ijk) = vxyz(xcoord,ijk)+xyz(zcoord,ijk)-c1*snz(ijk)
1140 vxyz(xcoord,ijk) = vxyz(xcoord,ijk)+xyz(xcoord,m1)-c2*snx(m1)
1141 vxyz(ycoord,ijk) = vxyz(ycoord,ijk)+xyz(ycoord,m1)-c2*sny(m1)
1142 vxyz(zcoord,ijk) = vxyz(zcoord,ijk)+xyz(zcoord,m1)-c2*snz(m1)
1144 vxyz(xcoord,ijk) = vxyz(xcoord,ijk)+xyz(xcoord,m2)-c3*snx(m2)
1145 vxyz(ycoord,ijk) = vxyz(ycoord,ijk)+xyz(ycoord,m2)-c3*sny(m2)
1146 vxyz(zcoord,ijk) = vxyz(zcoord,ijk)+xyz(zcoord,m2)-c3*snz(m2)
1148 vxyz(xcoord,ijk) = vxyz(xcoord,ijk)+xyz(xcoord,m12)-c4*snx(m12)
1149 vxyz(ycoord,ijk) = vxyz(ycoord,ijk)+xyz(ycoord,m12)-c4*sny(m12)
1150 vxyz(zcoord,ijk) = vxyz(zcoord,ijk)+xyz(zcoord,m12)-c4*snz(m12)
1158 DEALLOCATE( fc , stat=errfl );
IF (errfl>0) goto 99
1159 DEALLOCATE( snx, stat=errfl );
IF (errfl>0) goto 99
1160 DEALLOCATE( sny, stat=errfl );
IF (errfl>0) goto 99
1161 DEALLOCATE( snz, stat=errfl );
IF (errfl>0) goto 99
1169 global%error = errfl
1175 global%error = errfl
1206 #include "Indexing.h"
1209 TYPE(t_region
) :: region
1211 REAL(RFREAL),
POINTER :: dxyz(:,:)
1214 INTEGER :: ipatch,
i,
j,
k
1220 REAL(RFREAL),
POINTER :: xyz(:,:), xyzorig(:,:)
1225 'RFLO_ModVolMeshSmoothing.F90' )
1235 xyz => region%levels(ilev)%grid%xyz
1236 xyzorig => region%levels(ilev)%gridOld%xyz
1240 DO ipatch=1,region%nPatches
1241 patch => region%levels(ilev)%patches(ipatch)
1243 IF (
patch%bcMotion == bc_external)
THEN
1247 ijknb = indijk(
i,
j,
k,inoff,ijnoff)
1248 xyz(xcoord,ijknb) = xyzorig(xcoord,ijknb)+ dxyz(xcoord,ijknb)
1249 xyz(ycoord,ijknb) = xyzorig(ycoord,ijknb)+ dxyz(ycoord,ijknb)
1250 xyz(zcoord,ijknb) = xyzorig(zcoord,ijknb)+ dxyz(zcoord,ijknb)
**********************************************************************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)
**********************************************************************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_c2eavgcoeffs(region)
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 rflo_exchangednoderecv(region, regionSrc, patch, patchSrc, average, dNode)
subroutine rflo_c2favgcoeffs(region)
subroutine rflo_vmsprojectvertices(region, vxyz)
subroutine rflo_changeinteriorgrid(region, boundMoved, edgeMoved, arcLen12, arcLen34, arcLen56, xyzOld, xyz)
subroutine rflo_movegridinterfaces(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 jdnbeg
subroutine rflo_calccontrolvolumes(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 jpnend
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE idnend
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jdnend
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE idnbeg
**********************************************************************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)
subroutine rflo_vmsrestorebounddeform(region, ibn, ien, dxyz)
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_vmslaplaceprocedure(region, iter)
**********************************************************************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 rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
subroutine rflo_vmsaveragevertices(region, vxyz)
subroutine rflo_vmsinit(regions, someMoved)
subroutine rflo_clearsendrequests(regions, iReg, geometry)
subroutine rflo_calcgridspeeds(region)
subroutine rflo_laplacegridpatch(region, patch)
subroutine rflo_vmslaplaceperturb(region)
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 knode jend
subroutine rflo_exchangednodecopy(region, regionSrc, patch, patchSrc, average, dNode, dNodeSrc)
subroutine rflo_getdimensdummynodes(region, iLev, idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend)
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
subroutine, public rflo_movegridvms(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 kbeg
subroutine deregisterfunction(global)
subroutine rflo_vmslaplaceiterate(regions, iter, resid)
**********************************************************************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)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE kdnbeg
subroutine rflo_laplacegridsmoo(regions, resid)