63 CHARACTER(CHRLEN),
PRIVATE :: &
64 RCSIdentString =
'$RCSfile: RFLU_ModSymmetryPeriodic.F90,v $ $Revision: 1.8 $'
131 TYPE(t_region
),
POINTER :: pregion
137 INTEGER :: errorflag,
i,icg,icg2,icl,ict,ilayer,iloc,ipatch,ireg,
j,
key, &
138 ncellsvirt,ncellsvirtmax,nlayers
139 INTEGER,
DIMENSION(:),
ALLOCATABLE :: vc
141 TYPE(t_grid),
POINTER :: pgrid
142 TYPE(t_patch),
POINTER :: ppatch,ppatchrelated
148 global => pregion%global
151 'RFLU_ModSymmetryPeriodic.F90')
153 IF ( global%verbLevel > verbose_none )
THEN
154 WRITE(stdout,
'(A,1X,A)') solver_name, &
155 'Adding s/p virtual cells...'
158 IF ( global%verbLevel > verbose_low )
THEN
159 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
160 pregion%iRegionGlobal
167 pgrid => pregion%grid
173 ncellsvirtmax = pgrid%nCellsMax - pgrid%nCells
175 ALLOCATE(vc(ncellsvirtmax),stat=errorflag)
176 global%error = errorflag
177 IF ( global%error /= err_none )
THEN
178 CALL
errorstop(global,err_allocate,__line__,
'vc')
185 DO ipatch = 1,pgrid%nPatches
186 ppatch => pregion%patches(ipatch)
188 SELECT CASE ( ppatch%bcType )
190 IF ( global%verbLevel > verbose_low )
THEN
191 WRITE(stdout,
'(A,5X,A,2(1X,I3))') solver_name,
'Patch:',ipatch, &
195 SELECT CASE ( pregion%mixtInput%spaceOrder )
198 ncellsvirtmax,ncellsvirt)
201 ncellsvirtmax,ncellsvirt)
203 CALL
errorstop(global,err_reached_default,__line__)
208 ppatchrelated => pregion%patches(ppatch%iPatchRelated)
210 IF ( global%verbLevel > verbose_low )
THEN
211 WRITE(stdout,
'(A,5X,A,2(1X,I3))') solver_name,
'Patch:',ipatch, &
215 SELECT CASE ( pregion%mixtInput%spaceOrder )
218 ncellsvirtmax,ncellsvirt)
221 ncellsvirtmax,ncellsvirt)
223 CALL
errorstop(global,err_reached_default,__line__)
234 DEALLOCATE(vc,stat=errorflag)
235 global%error = errorflag
236 IF ( global%error /= err_none )
THEN
237 CALL
errorstop(global,err_deallocate,__line__,
'virtCells')
244 IF ( global%verbLevel > verbose_low )
THEN
245 WRITE(stdout,
'(A,3X,A)') solver_name,
'Virtual cell statistics:'
246 WRITE(stdout,
'(A,5X,A,1X,I6)') solver_name,
'Tetrahedra:', &
247 pgrid%nTetsTot-pgrid%nTets
248 WRITE(stdout,
'(A,5X,A,1X,I6)') solver_name,
'Hexahedra: ', &
249 pgrid%nHexsTot-pgrid%nHexs
250 WRITE(stdout,
'(A,5X,A,1X,I6)') solver_name,
'Prisms: ', &
251 pgrid%nPrisTot-pgrid%nPris
252 WRITE(stdout,
'(A,5X,A,1X,I6)') solver_name,
'Pyramids: ', &
253 pgrid%nPyrsTot-pgrid%nPyrs
260 IF ( global%verbLevel > verbose_none )
THEN
261 WRITE(stdout,
'(A,1X,A)') solver_name, &
262 'Adding s/p virtual cells done.'
308 INTEGER,
INTENT(IN) :: ncellsvirtmax
309 INTEGER,
INTENT(OUT) :: ncellsvirt
310 INTEGER,
INTENT(INOUT) :: vc(ncellsvirtmax)
311 TYPE(t_patch),
POINTER :: ppatch
312 TYPE(t_region
),
POINTER :: pregion
318 INTEGER :: errorflag,ifl
325 global => pregion%global
328 'RFLU_ModSymmetryPeriodic.F90')
330 IF ( global%myProcid == masterproc .AND. &
331 global%verbLevel > verbose_none )
THEN
332 WRITE(stdout,
'(A,1X,A)') solver_name, &
333 'Adding s/p virtual cells for inviscid first-order stencil...'
346 DO ifl = 1,ppatch%nBFaces
347 IF ( ncellsvirt < ncellsvirtmax )
THEN
348 ncellsvirt = ncellsvirt + 1
349 vc(ncellsvirt) = ppatch%bf2c(ifl)
351 CALL
errorstop(global,err_exceed_dimens,__line__,
'vc')
359 IF ( global%myProcid == masterproc .AND. &
360 global%verbLevel > verbose_none )
THEN
361 WRITE(stdout,
'(A,1X,A)') solver_name, &
362 'Adding s/p virtual cells for first-order stencil done.'
426 INTEGER,
INTENT(IN) :: ncellsvirtmax
427 INTEGER,
INTENT(OUT) :: ncellsvirt
428 INTEGER,
INTENT(INOUT) :: vc(ncellsvirtmax)
429 TYPE(t_patch),
POINTER :: ppatch
430 TYPE(t_region
),
POINTER :: pregion
436 INTEGER :: errorflag,
i,icg,icg2,iflbeg,iflend,ilayer,iloc,
j,nlayers, &
437 nvert,scdim,vcnewdim,vcnewdimmax,vcolddim
438 INTEGER,
DIMENSION(:),
ALLOCATABLE :: avv,sc,vcnew,vcold
439 TYPE(t_grid),
POINTER :: pgrid
446 global => pregion%global
449 'RFLU_ModSymmetryPeriodic.F90')
451 IF ( global%myProcid == masterproc .AND. &
452 global%verbLevel > verbose_none )
THEN
453 WRITE(stdout,
'(A,1X,A)') solver_name, &
454 'Adding s/p virtual cells for inviscid higher-order stencil...'
461 pgrid => pregion%grid
472 ALLOCATE(sc(ncellsvirtmax),stat=errorflag)
473 global%error = errorflag
474 IF ( global%error /= err_none )
THEN
475 CALL
errorstop(global,err_allocate,__line__,
'sc')
481 nlayers,pregion%iRegionGlobal,sc, &
497 DO j = 1,pgrid%c2cs(icg)%nCellMembs
498 icg2 = pgrid%c2cs(icg)%cellMembs(
j)
500 IF ( ncellsvirt > 0 )
THEN
503 iloc = element_not_found
506 IF ( iloc == element_not_found )
THEN
507 IF ( ncellsvirt < ncellsvirtmax )
THEN
508 ncellsvirt = ncellsvirt + 1
509 vc(ncellsvirt) = icg2
511 CALL
errorstop(global,err_exceed_dimens,__line__,
'vc')
514 IF ( ncellsvirt > 1 )
THEN
521 DEALLOCATE(sc,stat=errorflag)
522 global%error = errorflag
523 IF ( global%error /= err_none )
THEN
524 CALL
errorstop(global,err_deallocate,__line__,
'sc')
536 vcolddim = ncellsvirt
537 vcnewdimmax = ncellsvirtmax
539 ALLOCATE(vcold(vcolddim),stat=errorflag)
540 global%error = errorflag
541 IF ( global%error /= err_none )
THEN
542 CALL
errorstop(global,err_allocate,__line__,
'vcOld')
549 ALLOCATE(vcnew(vcnewdimmax),stat=errorflag)
550 global%error = errorflag
551 IF ( global%error /= err_none )
THEN
552 CALL
errorstop(global,err_allocate,__line__,
'vcNew')
561 DO ilayer = 1,nlayers
569 DO j = 1,pgrid%c2cs(icg)%nCellMembs
570 icg2 = pgrid%c2cs(icg)%cellMembs(
j)
574 IF ( iloc == element_not_found )
THEN
575 IF ( ncellsvirt < ncellsvirtmax )
THEN
576 ncellsvirt = ncellsvirt + 1
577 vc(ncellsvirt) = icg2
579 CALL
errorstop(global,err_exceed_dimens,__line__,
'vc')
582 IF ( vcnewdim < vcnewdimmax )
THEN
583 vcnewdim = vcnewdim + 1
584 vcnew(vcnewdim) = icg2
586 CALL
errorstop(global,err_exceed_dimens,__line__,
'vcNew')
594 DEALLOCATE(vcold,stat=errorflag)
595 global%error = errorflag
596 IF ( global%error /= err_none )
THEN
597 CALL
errorstop(global,err_deallocate,__line__,
'vcOld')
600 IF ( ilayer /= nlayers )
THEN
603 ALLOCATE(vcold(vcolddim),stat=errorflag)
604 global%error = errorflag
605 IF ( global%error /= err_none )
THEN
606 CALL
errorstop(global,err_allocate,__line__,
'vcOld')
619 DEALLOCATE(vcnew,stat=errorflag)
620 global%error = errorflag
621 IF ( global%error /= err_none )
THEN
622 CALL
errorstop(global,err_deallocate,__line__,
'vcNew')
631 IF ( global%myProcid == masterproc .AND. &
632 global%verbLevel > verbose_none )
THEN
633 WRITE(stdout,
'(A,1X,A)') solver_name, &
634 'Adding s/p virtual cells for inviscid higher-order stencil done.'
680 INTEGER,
INTENT(IN) :: ncellsvirt
681 INTEGER,
INTENT(IN) :: vc(ncellsvirt)
682 TYPE(t_patch),
POINTER :: ppatch
683 TYPE(t_region
),
POINTER :: pregion
689 INTEGER :: errorflag,iborder,icg,icg2,icl,ict,icv,ifl,iflbeg,iflend,ifl2, &
690 ilayer,iloc,iloc2,ipatchrelated,ipatch2,ivg,ivgm,ivl,ivlm,ivl2, &
691 j,nlayers,
nvert,nvertvirtest,scdim,vcnewdim,vcnewdimmax,vcolddim
692 INTEGER,
DIMENSION(:),
ALLOCATABLE :: ivgrecvsorted,ivgsendsorted, &
694 TYPE(t_border),
POINTER :: pborder,pborderrelated
695 TYPE(t_grid),
POINTER :: pgrid
697 TYPE(t_patch),
POINTER :: ppatchrelated,ppatch2,ppatch3
703 global => pregion%global
706 'RFLU_ModSymmetryPeriodic.F90')
708 IF ( global%myProcid == masterproc .AND. &
709 global%verbLevel > verbose_none )
THEN
710 WRITE(stdout,
'(A,1X,A)') solver_name, &
711 'Adding s/p virtual cells to data structure...'
718 pgrid => pregion%grid
720 nvertvirtest = 8*ncellsvirt
722 pborder => pgrid%borders(ppatch%iBorder)
724 ipatchrelated = ppatch%iPatchRelated
725 ppatchrelated => pregion%patches(ipatchrelated)
727 IF ( ppatch%bcType == bc_symmetry )
THEN
728 pborderrelated => pgrid%borders(ppatch%iBorder)
729 ELSE IF ( ppatch%bcType == bc_periodic )
THEN
730 pborderrelated => pgrid%borders(ppatchrelated%iBorder)
732 CALL
errorstop(global,err_reached_default,__line__)
735 pborder%iBorder = ppatchrelated%iBorder
736 pborder%iRegionGlobal = pregion%iRegionGlobal
738 pborderrelated%nCellsSend = ncellsvirt
739 pborderrelated%nVertSend = 0
741 pborder%nCellsRecv = ncellsvirt
742 pborder%nVertRecv = 0
743 pborder%nVertShared = 0
745 ALLOCATE(pborderrelated%icgSend(pborderrelated%nCellsSend),stat=errorflag)
746 global%error = errorflag
747 IF ( global%error /= err_none )
THEN
748 CALL
errorstop(global,err_allocate,__line__,
'pBorderRelated%icgSend')
751 ALLOCATE(pborderrelated%ivgSend(nvertvirtest),stat=errorflag)
752 global%error = errorflag
753 IF ( global%error /= err_none )
THEN
754 CALL
errorstop(global,err_allocate,__line__,
'pBorderRelated%ivgSend')
757 ALLOCATE(pborder%icgRecv(pborder%nCellsRecv),stat=errorflag)
758 global%error = errorflag
759 IF ( global%error /= err_none )
THEN
760 CALL
errorstop(global,err_allocate,__line__,
'pBorder%icgRecv')
763 ALLOCATE(pborder%ivgRecv(nvertvirtest),stat=errorflag)
764 global%error = errorflag
765 IF ( global%error /= err_none )
THEN
766 CALL
errorstop(global,err_allocate,__line__,
'pBorder%ivgRecv')
769 ALLOCATE(pborder%ivgShared(nvertvirtest),stat=errorflag)
770 global%error = errorflag
771 IF ( global%error /= err_none )
THEN
772 CALL
errorstop(global,err_allocate,__line__,
'pBorder%ivgShared')
775 ALLOCATE(ivgsendsorted(nvertvirtest),stat=errorflag)
776 global%error = errorflag
777 IF ( global%error /= err_none )
THEN
778 CALL
errorstop(global,err_allocate,__line__,
'ivgSendSorted')
781 ALLOCATE(ivgrecvsorted(nvertvirtest),stat=errorflag)
782 global%error = errorflag
783 IF ( global%error /= err_none )
THEN
784 CALL
errorstop(global,err_allocate,__line__,
'ivgRecvSorted')
787 ALLOCATE(ivgsharedsorted(nvertvirtest),stat=errorflag)
788 global%error = errorflag
789 IF ( global%error /= err_none )
THEN
790 CALL
errorstop(global,err_allocate,__line__,
'ivgSharedSorted')
798 DO icv = 1,ncellsvirt
801 ict = pgrid%cellGlob2Loc(1,icg)
802 icl = pgrid%cellGlob2Loc(2,icg)
814 CASE ( cell_type_tet )
815 pgrid%nCellsTot = pgrid%nCellsTot + 1
816 pgrid%nTetsTot = pgrid%nTetsTot + 1
818 IF ( pgrid%nTetsTot <= pgrid%nTetsMax )
THEN
820 pborderrelated,pgrid%tet2v,icl, &
821 pgrid%nTetsTot,ivgsendsorted, &
822 ivgrecvsorted,ivgsharedsorted)
824 pgrid%cellGlob2Loc(1,pgrid%nCellsTot) = cell_type_tet
825 pgrid%cellGlob2Loc(2,pgrid%nCellsTot) = pgrid%nTetsTot
827 pgrid%tet2CellGlob(pgrid%nTetsTot) = pgrid%nCellsTot
829 IF ( ppatch%bcType == bc_symmetry )
THEN
831 pgrid%tet2v(2,pgrid%nTetsTot))
834 CALL
errorstop(global,err_exceed_dimens,__line__,
'pGrid%tet2v')
841 CASE ( cell_type_hex )
842 pgrid%nCellsTot = pgrid%nCellsTot + 1
843 pgrid%nHexsTot = pgrid%nHexsTot + 1
845 IF ( pgrid%nHexsTot <= pgrid%nHexsMax )
THEN
847 pborderrelated,pgrid%hex2v,icl, &
848 pgrid%nHexsTot,ivgsendsorted, &
849 ivgrecvsorted,ivgsharedsorted)
851 pgrid%cellGlob2Loc(1,pgrid%nCellsTot) = cell_type_hex
852 pgrid%cellGlob2Loc(2,pgrid%nCellsTot) = pgrid%nHexsTot
854 pgrid%hex2CellGlob(pgrid%nHexsTot) = pgrid%nCellsTot
856 IF ( ppatch%bcType == bc_symmetry )
THEN
858 pgrid%hex2v(4,pgrid%nHexsTot))
860 pgrid%hex2v(8,pgrid%nHexsTot))
863 CALL
errorstop(global,err_exceed_dimens,__line__,
'pGrid%hex2v')
870 CASE ( cell_type_pri )
871 pgrid%nCellsTot = pgrid%nCellsTot + 1
872 pgrid%nPrisTot = pgrid%nPrisTot + 1
874 IF ( pgrid%nPrisTot <= pgrid%nPrisMax )
THEN
876 pborderrelated,pgrid%pri2v,icl, &
877 pgrid%nPrisTot,ivgsendsorted, &
878 ivgrecvsorted,ivgsharedsorted)
880 pgrid%cellGlob2Loc(1,pgrid%nCellsTot) = cell_type_pri
881 pgrid%cellGlob2Loc(2,pgrid%nCellsTot) = pgrid%nPrisTot
883 pgrid%pri2CellGlob(pgrid%nPrisTot) = pgrid%nCellsTot
885 IF ( ppatch%bcType == bc_symmetry )
THEN
887 pgrid%pri2v(3,pgrid%nPrisTot))
889 pgrid%pri2v(6,pgrid%nPrisTot))
892 CALL
errorstop(global,err_exceed_dimens,__line__,
'pGrid%pri2v')
899 CASE ( cell_type_pyr )
900 pgrid%nCellsTot = pgrid%nCellsTot + 1
901 pgrid%nPyrsTot = pgrid%nPyrsTot + 1
903 IF ( pgrid%nPyrsTot <= pgrid%nPyrsMax )
THEN
905 pborderrelated,pgrid%pyr2v,icl, &
906 pgrid%nPyrsTot,ivgsendsorted, &
907 ivgrecvsorted,ivgsharedsorted)
909 pgrid%cellGlob2Loc(1,pgrid%nCellsTot) = cell_type_pyr
910 pgrid%cellGlob2Loc(2,pgrid%nCellsTot) = pgrid%nPyrsTot
912 pgrid%pyr2CellGlob(pgrid%nPyrsTot) = pgrid%nCellsTot
914 IF ( ppatch%bcType == bc_symmetry )
THEN
916 pgrid%pyr2v(4,pgrid%nPyrsTot))
919 CALL
errorstop(global,err_exceed_dimens,__line__,
'pGrid%pyr2v')
927 CALL
errorstop(global,err_reached_default,__line__)
934 pborderrelated%icgSend(icv) = icg
936 pborder%icgRecv(icv) = pgrid%nCellsTot
943 DO ipatch2 = 1,pgrid%nPatches
944 ppatch2 => pregion%patches(ipatch2)
946 ALLOCATE(ppatch2%bf2cSorted(ppatch2%nBFaces),stat=errorflag)
947 global%error = errorflag
948 IF ( global%error /= err_none )
THEN
949 CALL
errorstop(global,err_allocate,__line__,
'pPatch%bf2cSorted')
952 ALLOCATE(ppatch2%bf2cSortedKeys(ppatch2%nBFaces),stat=errorflag)
953 global%error = errorflag
954 IF ( global%error /= err_none )
THEN
955 CALL
errorstop(global,err_allocate,__line__,
'pPatch%bf2cSortedKeys')
958 ALLOCATE(ppatch2%bf2vSorted(4,ppatch2%nBFaces),stat=errorflag)
959 global%error = errorflag
960 IF ( global%error /= err_none )
THEN
961 CALL
errorstop(global,err_allocate,__line__,
'pPatch%bf2vSorted')
964 DO ifl = 1,ppatch2%nBFaces
965 ppatch2%bf2cSorted(ifl) = ppatch2%bf2c(ifl)
966 ppatch2%bf2cSortedKeys(ifl) = ifl
972 DO ifl = 1,ppatch2%nBFaces
973 ifl2 = ppatch2%bf2cSortedKeys(ifl)
975 ppatch2%bf2vSorted(1,ifl) = ppatch2%bf2v(1,ifl2)
976 ppatch2%bf2vSorted(2,ifl) = ppatch2%bf2v(2,ifl2)
977 ppatch2%bf2vSorted(3,ifl) = ppatch2%bf2v(3,ifl2)
978 ppatch2%bf2vSorted(4,ifl) = ppatch2%bf2v(4,ifl2)
986 DO icl = 1,pborderrelated%nCellsSend
987 icg = pborderrelated%icgSend(icl)
993 DO ipatch2 = 1,pgrid%nPatches
994 ppatch2 => pregion%patches(ipatch2)
1002 IF ( (ppatch2%iPatchGlobal /= ppatch%iPatchGlobal) .AND. &
1003 (ppatch2%nbMap(ppatch%iPatchGlobal) .EQV. .true. ) )
THEN
1005 ppatch2%nBFaces,icg,iloc)
1009 IF ( iloc /= element_not_found )
THEN
1013 IF ( ppatch2%bf2vSorted(4,iloc) == vert_none )
THEN
1014 IF ( ppatch2%nBTrisTot < ppatch2%nBTrisMax )
THEN
1015 ppatch2%nBTrisTot = ppatch2%nBTrisTot + 1
1016 ppatch2%nBFacesTot = ppatch2%nBFacesTot + 1
1018 CALL
errorstop(global,err_exceed_dimens,__line__,
'tri2v')
1022 ivl = ppatch2%bf2vSorted(ivl2,iloc)
1023 ivg = ppatch2%bv(ivl)
1026 pborderrelated%nVertSend,ivg,iloc2)
1028 IF ( iloc2 /= element_not_found )
THEN
1029 ppatch2%bTri2v(ivl2,ppatch2%nBTrisTot) = ivgrecvsorted(iloc2)
1031 IF ( ppatch%bcType == bc_symmetry )
THEN
1033 pborder%nVertShared,ivg,iloc2)
1034 ELSE IF ( ppatch%bcType == bc_periodic )
THEN
1035 ipatchrelated = ppatch%iPatchRelated
1037 ppatch3 => pregion%patches(ipatchrelated)
1040 ppatch3%nBVert,ivg,iloc2)
1042 CALL
errorstop(global,err_reached_default,__line__)
1045 IF ( iloc2 /= element_not_found )
THEN
1046 IF ( ppatch%bcType == bc_symmetry )
THEN
1047 ppatch2%bTri2v(ivl2,ppatch2%nBTrisTot) = ivg
1048 ELSE IF ( ppatch%bcType == bc_periodic )
THEN
1049 ivlm = ppatch3%bv2bv(iloc2)
1050 ivgm = ppatch%bv(ivlm)
1052 ppatch2%bTri2v(ivl2,ppatch2%nBTrisTot) = ivgm
1055 CALL
errorstop(global,err_vertex_not_found,__line__)
1060 IF ( ppatch%bcType == bc_symmetry )
THEN
1061 CALL
swapintegers(ppatch2%bTri2v(2,ppatch2%nBTrisTot), &
1062 ppatch2%bTri2v(3,ppatch2%nBTrisTot))
1068 IF ( ppatch2%nBQuadsTot < ppatch2%nBQuadsMax )
THEN
1069 ppatch2%nBQuadsTot = ppatch2%nBQuadsTot + 1
1070 ppatch2%nBFacesTot = ppatch2%nBFacesTot + 1
1072 CALL
errorstop(global,err_exceed_dimens,__line__,
'quad2v')
1076 ivl = ppatch2%bf2vSorted(ivl2,iloc)
1077 ivg = ppatch2%bv(ivl)
1080 pborderrelated%nVertSend,ivg,iloc2)
1082 IF ( iloc2 /= element_not_found )
THEN
1083 ppatch2%bQuad2v(ivl2,ppatch2%nBQuadsTot) = ivgrecvsorted(iloc2)
1085 IF ( ppatch%bcType == bc_symmetry )
THEN
1087 pborder%nVertShared,ivg,iloc2)
1088 ELSE IF ( ppatch%bcType == bc_periodic )
THEN
1089 ipatchrelated = ppatch%iPatchRelated
1091 ppatch3 => pregion%patches(ipatchrelated)
1094 ppatch3%nBVert,ivg,iloc2)
1096 CALL
errorstop(global,err_reached_default,__line__)
1099 IF ( iloc2 /= element_not_found )
THEN
1100 IF ( ppatch%bcType == bc_symmetry )
THEN
1101 ppatch2%bQuad2v(ivl2,ppatch2%nBQuadsTot) = ivg
1102 ELSE IF ( ppatch%bcType == bc_periodic )
THEN
1103 ivlm = ppatch3%bv2bv(iloc2)
1104 ivgm = ppatch%bv(ivlm)
1106 ppatch2%bQuad2v(ivl2,ppatch2%nBQuadsTot) = ivgm
1109 CALL
errorstop(global,err_vertex_not_found,__line__)
1114 IF ( ppatch%bcType == bc_symmetry )
THEN
1115 CALL
swapintegers(ppatch2%bQuad2v(2,ppatch2%nBQuadsTot), &
1116 ppatch2%bQuad2v(4,ppatch2%nBQuadsTot))
1124 DO ipatch2 = 1,pgrid%nPatches
1125 ppatch2 => pregion%patches(ipatch2)
1127 DEALLOCATE(ppatch2%bf2cSorted,stat=errorflag)
1128 global%error = errorflag
1129 IF ( global%error /= err_none )
THEN
1130 CALL
errorstop(global,err_deallocate,__line__,
'pPatch%bf2cSorted')
1138 DEALLOCATE(ivgsendsorted,stat=errorflag)
1139 global%error = errorflag
1140 IF ( global%error /= err_none )
THEN
1141 CALL
errorstop(global,err_deallocate,__line__,
'ivgSendSorted')
1144 DEALLOCATE(ivgrecvsorted,stat=errorflag)
1145 global%error = errorflag
1146 IF ( global%error /= err_none )
THEN
1147 CALL
errorstop(global,err_deallocate,__line__,
'ivgRecvSorted')
1154 IF ( global%myProcid == masterproc .AND. &
1155 global%verbLevel > verbose_none )
THEN
1156 WRITE(stdout,
'(A,1X,A)') solver_name, &
1157 'Adding s/p virtual cells to data structure done.'
1201 pborderrelated,x2v,icl,nxtot, &
1202 ivgsendsorted,ivgrecvsorted, &
1215 INTEGER,
INTENT(IN) :: icl
1216 INTEGER,
INTENT(INOUT) :: nxtot
1217 INTEGER,
DIMENSION(:) :: ivgsendsorted,ivgsharedsorted,ivgrecvsorted
1218 INTEGER,
DIMENSION(:,:),
POINTER :: x2v
1219 REAL(RFREAL),
DIMENSION(XCOORD:XYZMAG) :: xyz,xyzt
1220 TYPE(t_border),
POINTER :: pborder,pborderrelated
1221 TYPE(t_grid),
POINTER :: pgrid
1222 TYPE(t_patch),
POINTER :: ppatch
1223 TYPE(t_region
),
POINTER :: pregion
1229 INTEGER :: iloc,iloc2,ipatchrelated,ivg,ivgm,ivl
1230 REAL(RFREAL) :: nxpc,nypc,nzpc,xpc,xvg,ypc,yvg,zpc,zvg
1232 TYPE(t_patch),
POINTER :: ppatchrelated
1238 global => pregion%global
1241 'RFLU_ModSymmetryPeriodic.F90')
1247 xpc = ppatch%pc(xcoord)
1248 ypc = ppatch%pc(ycoord)
1249 zpc = ppatch%pc(zcoord)
1251 nxpc = ppatch%pn(xcoord)
1252 nypc = ppatch%pn(ycoord)
1253 nzpc = ppatch%pn(zcoord)
1255 IF ( ppatch%bcType == bc_periodic )
THEN
1256 ipatchrelated = ppatch%iPatchRelated
1258 ppatchrelated => pregion%patches(ipatchrelated)
1260 ipatchrelated = crazy_value_int
1262 nullify(ppatchrelated)
1269 DO ivl = 1,
SIZE(x2v,1)
1277 IF ( ppatch%bcType == bc_symmetry )
THEN
1280 ELSE IF ( ppatch%bcType == bc_periodic )
THEN
1282 ppatchrelated%nBVert,ivg,iloc)
1284 CALL
errorstop(global,err_reached_default,__line__)
1291 IF ( iloc == element_not_found )
THEN
1297 IF ( pborderrelated%nVertSend > 1 )
THEN
1299 pborderrelated%nVertSend,ivg,iloc2)
1301 iloc2 = element_not_found
1309 IF ( iloc2 == element_not_found )
THEN
1310 IF ( pgrid%nVertTot < pgrid%nVertMax )
THEN
1311 pgrid%nVertTot = pgrid%nVertTot + 1
1312 x2v(ivl,nxtot) = pgrid%nVertTot
1314 CALL
errorstop(global,err_exceed_dimens,__line__,
'x2v')
1317 IF ( ppatch%bcType == bc_symmetry )
THEN
1318 xvg = pgrid%xyz(xcoord,ivg)
1319 yvg = pgrid%xyz(ycoord,ivg)
1320 zvg = pgrid%xyz(zcoord,ivg)
1324 pgrid%xyz(xcoord,pgrid%nVertTot) = xvg
1325 pgrid%xyz(ycoord,pgrid%nVertTot) = yvg
1326 pgrid%xyz(zcoord,pgrid%nVertTot) = zvg
1327 ELSE IF ( ppatch%bcType == bc_periodic )
THEN
1328 xyz(xcoord) = pgrid%xyz(xcoord,ivg)
1329 xyz(ycoord) = pgrid%xyz(ycoord,ivg)
1330 xyz(zcoord) = pgrid%xyz(zcoord,ivg)
1331 xyz(xyzmag) = 1.0_rfreal
1333 xyzt = matmul(ppatchrelated%tm,xyz)
1335 pgrid%xyz(xcoord,pgrid%nVertTot) = xyzt(xcoord)
1336 pgrid%xyz(ycoord,pgrid%nVertTot) = xyzt(ycoord)
1337 pgrid%xyz(zcoord,pgrid%nVertTot) = xyzt(zcoord)
1339 CALL
errorstop(global,err_reached_default,__line__)
1342 pborderrelated%nVertSend = pborderrelated%nVertSend + 1
1344 pborderrelated%ivgSend(pborderrelated%nVertSend) = ivg
1345 ivgsendsorted(pborderrelated%nVertSend) = ivg
1347 pborder%nVertRecv = pborder%nVertRecv + 1
1349 pborder%ivgRecv(pborder%nVertRecv) = pgrid%nVertTot
1350 ivgrecvsorted(pborder%nVertRecv) = pgrid%nVertTot
1352 IF ( pborder%nVertRecv > 1 )
THEN
1354 ivgrecvsorted(1:pborder%nVertRecv), &
1363 x2v(ivl,nxtot) = ivgrecvsorted(iloc2)
1371 IF ( ppatch%bcType == bc_symmetry )
THEN
1372 x2v(ivl,nxtot) = ivg
1373 ELSE IF ( ppatch%bcType == bc_periodic )
THEN
1376 x2v(ivl,nxtot) = ivgm
1378 CALL
errorstop(global,err_reached_default,__line__)
1385 IF ( pborder%nVertShared > 1 )
THEN
1386 IF ( ppatch%bcType == bc_symmetry )
THEN
1388 pborder%nVertShared,ivg,iloc2)
1389 ELSE IF ( ppatch%bcType == bc_periodic )
THEN
1391 pborder%nVertShared,ivgm,iloc2)
1393 CALL
errorstop(global,err_reached_default,__line__)
1396 iloc2 = element_not_found
1403 IF ( iloc2 == element_not_found )
THEN
1404 pborder%nVertShared = pborder%nVertShared + 1
1406 IF ( ppatch%bcType == bc_symmetry )
THEN
1407 pborder%ivgShared(pborder%nVertShared) = ivg
1408 ivgsharedsorted(pborder%nVertShared) = ivg
1409 ELSE IF ( ppatch%bcType == bc_periodic )
THEN
1410 pborder%ivgShared(pborder%nVertShared) = ivgm
1411 ivgsharedsorted(pborder%nVertShared) = ivgm
1413 CALL
errorstop(global,err_reached_default,__line__)
1416 IF ( pborder%nVertShared > 1 )
THEN
1418 pborder%nVertShared)
1467 TYPE(t_region
),
POINTER :: pregion,pregionserial
1473 INTEGER :: errorflag,iborder,icg,icgs,icl,iloc,ipatch,ipatchserial
1474 INTEGER,
DIMENSION(:),
ALLOCATABLE :: ipatchglob2ipatchloc
1477 TYPE(t_grid),
POINTER :: pgrid,pgridserial
1478 TYPE(t_patch),
POINTER :: ppatch,ppatchserial
1484 global => pregion%global
1487 'RFLU_ModSymmetryPeriodic.F90')
1489 IF ( global%myProcid == masterproc .AND. &
1490 global%verbLevel > verbose_low )
THEN
1491 WRITE(stdout,
'(A,1X,A)') solver_name, &
1492 'Building patch-to-virtual-cell list...'
1493 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1494 pregion%iRegionGlobal
1501 IF ( pregion%iRegionGlobal == 0 )
THEN
1502 CALL
errorstop(global,err_region_id_invalid,__line__)
1505 pgrid => pregion%grid
1506 pgridserial => pregionserial%grid
1513 ALLOCATE(ipatchglob2ipatchloc(pgridserial%nPatches),stat=errorflag)
1514 global%error = errorflag
1515 IF ( global%error /= err_none )
THEN
1516 CALL
errorstop(global,err_allocate,__line__,
'iPatchGlob2iPatchLoc')
1519 DO ipatchserial = 1,pgridserial%nPatches
1520 ipatchglob2ipatchloc(ipatchserial) = crazy_value_int
1523 DO ipatch = 1,pgrid%nPatches
1524 ppatch => pregion%patches(ipatch)
1526 ipatchglob2ipatchloc(ppatch%iPatchGlobal) = ipatch
1534 DO ipatch = 1,pgrid%nPatches
1535 ppatch => pregion%patches(ipatch)
1537 ppatch%nBCellsVirt = 0
1544 DO iborder = 1,pgrid%nBorders
1545 pborder => pgrid%borders(iborder)
1547 DO icl = 1,pborder%nCellsRecv
1548 icg = pborder%icgRecv(icl)
1549 icgs = pgrid%pc2sc(icg)
1551 patchserialloop:
DO ipatchserial = 1,pgridserial%nPatches
1552 ppatchserial => pregionserial%patches(ipatchserial)
1554 IF ( ppatchserial%bcType == bc_periodic .OR. &
1555 ppatchserial%bcType == bc_symmetry )
THEN
1557 ppatchserial%nBCellsVirt,icgs,iloc)
1559 IF ( iloc /= element_not_found )
THEN
1560 ipatch = ipatchglob2ipatchloc(ipatchserial)
1561 ppatch => pregion%patches(ipatch)
1563 ppatch%nBCellsVirt = ppatch%nBCellsVirt + 1
1565 EXIT patchserialloop
1568 END DO patchserialloop
1578 DO ipatch = 1,pgrid%nPatches
1579 ppatch => pregion%patches(ipatch)
1581 ppatch%nBCellsVirt = 0
1588 DO iborder = 1,pgrid%nBorders
1589 pborder => pgrid%borders(iborder)
1591 DO icl = 1,pborder%nCellsRecv
1592 icg = pborder%icgRecv(icl)
1593 icgs = pgrid%pc2sc(icg)
1595 patchserialloop2:
DO ipatchserial = 1,pgridserial%nPatches
1596 ppatchserial => pregionserial%patches(ipatchserial)
1598 IF ( ppatchserial%bcType == bc_periodic .OR. &
1599 ppatchserial%bcType == bc_symmetry )
THEN
1601 ppatchserial%nBCellsVirt,icgs,iloc)
1603 IF ( iloc /= element_not_found )
THEN
1604 ipatch = ipatchglob2ipatchloc(ipatchserial)
1605 ppatch => pregion%patches(ipatch)
1607 ppatch%nBCellsVirt = ppatch%nBCellsVirt + 1
1608 ppatch%bvc(ppatch%nBCellsVirt) = icg
1610 EXIT patchserialloop2
1613 END DO patchserialloop2
1621 DEALLOCATE(ipatchglob2ipatchloc,stat=errorflag)
1622 global%error = errorflag
1623 IF ( global%error /= err_none )
THEN
1624 CALL
errorstop(global,err_deallocate,__line__,
'iPatchGlob2iPatchLoc')
1631 IF ( global%myProcid == masterproc .AND. &
1632 global%verbLevel > verbose_low )
THEN
1633 WRITE(stdout,
'(A,1X,A)') solver_name, &
1634 'Building patch-to-virtual-cell list done.'
1676 TYPE(t_region
),
POINTER :: pregion
1682 INTEGER :: errorflag,iborder,icl,ipatch
1685 TYPE(t_grid),
POINTER :: pgrid
1686 TYPE(t_patch),
POINTER :: ppatch
1692 global => pregion%global
1695 'RFLU_ModSymmetryPeriodic.F90')
1697 IF ( global%myProcid == masterproc .AND. &
1698 global%verbLevel > verbose_low )
THEN
1699 WRITE(stdout,
'(A,1X,A)') solver_name, &
1700 'Building patch-to-virtual-cell list...'
1701 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1702 pregion%iRegionGlobal
1709 IF ( pregion%iRegionGlobal /= 0 )
THEN
1710 CALL
errorstop(global,err_region_id_invalid,__line__)
1713 pgrid => pregion%grid
1719 DO ipatch = 1,pgrid%nPatches
1720 ppatch => pregion%patches(ipatch)
1722 IF ( ppatch%bcType == bc_periodic .OR. &
1723 ppatch%bcType == bc_symmetry )
THEN
1724 iborder = ppatch%iBorder
1725 pborder => pgrid%borders(iborder)
1727 ppatch%nBCellsVirt = pborder%nCellsRecv
1729 ALLOCATE(ppatch%bvc(ppatch%nBCellsVirt),stat=errorflag)
1730 global%error = errorflag
1731 IF ( global%error /= err_none )
THEN
1732 CALL
errorstop(global,err_allocate,__line__,
'pPatch%bvc')
1735 DO icl = 1,ppatch%nBCellsVirt
1736 ppatch%bvc(icl) = pborder%icgRecv(icl)
1739 ppatch%nBCellsVirt = 0
1749 IF ( global%myProcid == masterproc .AND. &
1750 global%verbLevel > verbose_low )
THEN
1751 WRITE(stdout,
'(A,1X,A)') solver_name, &
1752 'Building patch-to-virtual-cell list done.'
1792 TYPE(t_region
),
POINTER :: pregion
1798 INTEGER :: ipatch,ipatchrelated
1799 REAL(RFREAL) :: ct,dotp,eqtol,ex,ey,ez,nx,nxr,ny,nyr,nz,nzr,st,theta
1802 TYPE(t_grid),
POINTER :: pgrid
1803 TYPE(t_patch),
POINTER :: ppatch,ppatchrelated
1809 global => pregion%global
1812 'RFLU_ModSymmetryPeriodic.F90')
1814 IF ( global%myProcid == masterproc .AND. &
1815 global%verbLevel > verbose_none )
THEN
1816 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building periodicity transforms...'
1823 pgrid => pregion%grid
1825 eqtol = 1.0e-6_rfreal
1831 DO ipatch = 1,pgrid%nPatches
1832 ppatch => pregion%patches(ipatch)
1838 IF ( ppatch%bcType == bc_periodic )
THEN
1839 ipatchrelated = ppatch%iPatchRelated
1841 ppatchrelated => pregion%patches(ipatchrelated)
1847 IF ( ppatch%flatFlag .EQV. ppatchrelated%flatFlag )
THEN
1848 nx = ppatch%pn(xcoord)
1849 ny = ppatch%pn(ycoord)
1850 nz = ppatch%pn(zcoord)
1852 nxr = ppatchrelated%pn(xcoord)
1853 nyr = ppatchrelated%pn(ycoord)
1854 nzr = ppatchrelated%pn(zcoord)
1856 dotp = nx*nxr + ny*nyr + nz*nzr
1860 IF ( (
floatequal(dotp,-1.0_rfreal,eqtol) .EQV. .true.) )
THEN
1861 ppatch%tm(xcoord,xcoord) = 1.0_rfreal
1862 ppatch%tm(ycoord,xcoord) = 0.0_rfreal
1863 ppatch%tm(zcoord,xcoord) = 0.0_rfreal
1864 ppatch%tm(xyzmag,xcoord) = 0.0_rfreal
1866 ppatch%tm(xcoord,ycoord) = 0.0_rfreal
1867 ppatch%tm(ycoord,ycoord) = 1.0_rfreal
1868 ppatch%tm(zcoord,ycoord) = 0.0_rfreal
1869 ppatch%tm(xyzmag,ycoord) = 0.0_rfreal
1871 ppatch%tm(xcoord,zcoord) = 0.0_rfreal
1872 ppatch%tm(ycoord,zcoord) = 0.0_rfreal
1873 ppatch%tm(zcoord,zcoord) = 1.0_rfreal
1874 ppatch%tm(xyzmag,zcoord) = 0.0_rfreal
1876 ppatch%tm(xcoord,xyzmag) = ppatchrelated%pc(xcoord) - ppatch%pc(xcoord)
1877 ppatch%tm(ycoord,xyzmag) = ppatchrelated%pc(ycoord) - ppatch%pc(ycoord)
1878 ppatch%tm(zcoord,xyzmag) = ppatchrelated%pc(zcoord) - ppatch%pc(zcoord)
1879 ppatch%tm(xyzmag,xyzmag) = 1.0_rfreal
1884 theta = ppatch%angleRelated
1889 SELECT CASE ( ppatch%axisRelated )
1903 CALL
errorstop(global,err_reached_default,__line__)
1906 ppatch%tm(xcoord,xcoord) = ct + (1.0_rfreal-ct)*ex*ex
1907 ppatch%tm(ycoord,xcoord) = (1.0_rfreal-ct)*ex*ey - st*ez
1908 ppatch%tm(zcoord,xcoord) = (1.0_rfreal-ct)*ex*ez + st*ey
1909 ppatch%tm(xyzmag,xcoord) = 0.0_rfreal
1911 ppatch%tm(xcoord,ycoord) = (1.0_rfreal-ct)*ey*ex + st*ez
1912 ppatch%tm(ycoord,ycoord) = ct + (1.0_rfreal-ct)*ey*ey
1913 ppatch%tm(zcoord,ycoord) = (1.0_rfreal-ct)*ey*ez - st*ex
1914 ppatch%tm(xyzmag,ycoord) = 0.0_rfreal
1916 ppatch%tm(xcoord,zcoord) = (1.0_rfreal-ct)*ez*ex - st*ey
1917 ppatch%tm(ycoord,zcoord) = (1.0_rfreal-ct)*ez*ey + st*ex
1918 ppatch%tm(zcoord,zcoord) = ct + (1.0_rfreal-ct)*ez*ez
1919 ppatch%tm(xyzmag,zcoord) = 0.0_rfreal
1921 ppatch%tm(xcoord,xyzmag) = 0.0_rfreal
1922 ppatch%tm(ycoord,xyzmag) = 0.0_rfreal
1923 ppatch%tm(zcoord,xyzmag) = 0.0_rfreal
1924 ppatch%tm(xyzmag,xyzmag) = 1.0_rfreal
1932 CALL
errorstop(global,err_flatflag_inconsistent,__line__)
1941 IF ( global%myProcid == masterproc .AND. &
1942 global%verbLevel > verbose_none )
THEN
1943 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building periodicity transforms done.'
1992 TYPE(t_region
),
POINTER :: pregion
1998 INTEGER :: cvsize,errorflag,icv,ipatch,ipatchrelated,ivg,ivg2,ivl,ivlmin,ivl2
1999 INTEGER,
DIMENSION(:),
ALLOCATABLE :: cv
2000 REAL(RFREAL) :: delfrac,
dist,distmax,distmin,distminsave,eqtol,maxfrac, &
2002 REAL(RFREAL) :: xyz(xcoord:xyzmag),xyzt(xcoord:xyzmag)
2003 REAL(RFREAL),
DIMENSION(:,:),
ALLOCATABLE :: xyzr
2005 TYPE(t_grid),
POINTER :: pgrid
2006 TYPE(t_patch),
POINTER :: ppatch,ppatchrelated
2012 global => pregion%global
2015 'RFLU_ModSymmetryPeriodic.F90')
2017 IF ( global%myProcid == masterproc .AND. &
2018 global%verbLevel > verbose_none )
THEN
2019 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building vertex maps...'
2026 pgrid => pregion%grid
2030 delfrac = 0.01_rfreal
2031 maxfrac = 0.1_rfreal
2037 ALLOCATE(cv(cvsize),stat=errorflag)
2038 global%error = errorflag
2039 IF ( global%error /= err_none )
THEN
2040 CALL
errorstop(global,err_allocate,__line__,
'cv')
2047 DO ipatch = 1,pgrid%nPatches
2048 ppatch => pregion%patches(ipatch)
2059 IF ( ppatch%bcType == bc_periodic )
THEN
2060 ipatchrelated = ppatch%iPatchRelated
2061 ppatchrelated => pregion%patches(ipatchrelated)
2063 IF ( global%myProcid == masterproc .AND. &
2064 global%verbLevel > verbose_none )
THEN
2065 WRITE(stdout,
'(A,2X,2(1X,A,1X,I2),A)') solver_name,
'Matching patches', &
2066 ipatch,
'and',ipatchrelated,
'...'
2074 IF ( ipatchrelated > ipatch )
THEN
2078 eqtol = 0.1_rfreal*
sqrt(minval(ppatch%fn(xyzmag,1:ppatch%nBFaces)))
2080 distmax = -huge(1.0_rfreal)
2081 distminsave = huge(1.0_rfreal)
2083 IF ( global%myProcid == masterproc .AND. &
2084 global%verbLevel > verbose_none )
THEN
2085 WRITE(stdout,
'(A,5X,A,24X,E13.6)') solver_name, &
2086 'Distance tolerance:',eqtol
2091 ALLOCATE(xyzr(xcoord:zcoord,ppatchrelated%nBVert),stat=errorflag)
2092 global%error = errorflag
2093 IF ( global%error /= err_none )
THEN
2094 CALL
errorstop(global,err_allocate,__line__,
'xyzr')
2099 DO ivl = 1,ppatchrelated%nBVert
2100 ivg = ppatchrelated%bv(ivl)
2102 xyzr(xcoord,ivl) = pgrid%xyz(xcoord,ivg)
2103 xyzr(ycoord,ivl) = pgrid%xyz(ycoord,ivg)
2104 xyzr(zcoord,ivl) = pgrid%xyz(zcoord,ivg)
2109 xmin = minval(xyzr(xcoord,1:ppatchrelated%nBVert))
2110 xmax = maxval(xyzr(xcoord,1:ppatchrelated%nBVert))
2111 ymin = minval(xyzr(ycoord,1:ppatchrelated%nBVert))
2112 ymax = maxval(xyzr(ycoord,1:ppatchrelated%nBVert))
2113 zmin = minval(xyzr(zcoord,1:ppatchrelated%nBVert))
2114 zmax = maxval(xyzr(zcoord,1:ppatchrelated%nBVert))
2120 xdel =
max(xdel,
min(maxfrac*ydel,maxfrac*zdel))
2121 ydel =
max(ydel,
min(maxfrac*xdel,maxfrac*zdel))
2122 zdel =
max(zdel,
min(maxfrac*xdel,maxfrac*ydel))
2133 xyzr(ycoord,1:ppatchrelated%nBVert), &
2134 xyzr(zcoord,1:ppatchrelated%nBVert), &
2139 DO ivl = 1,ppatch%nBVert
2140 ivg = ppatch%bv(ivl)
2144 xyz(xcoord) = pgrid%xyz(xcoord,ivg)
2145 xyz(ycoord) = pgrid%xyz(ycoord,ivg)
2146 xyz(zcoord) = pgrid%xyz(zcoord,ivg)
2147 xyz(xyzmag) = 1.0_rfreal
2149 xyzt = matmul(ppatch%tm,xyz)
2158 distmin = huge(1.0_rfreal)
2160 cvloop:
DO icv = 1,cvsize
2163 ivg2 = ppatchrelated%bv(ivl2)
2165 dist = (xyzt(xcoord)-pgrid%xyz(xcoord,ivg2))**2 &
2166 + (xyzt(ycoord)-pgrid%xyz(ycoord,ivg2))**2 &
2167 + (xyzt(zcoord)-pgrid%xyz(zcoord,ivg2))**2
2169 IF (
dist > distmax )
THEN
2173 IF (
dist <= distmin )
THEN
2177 IF ( distmin <= eqtol )
THEN
2185 IF ( distmin <= eqtol )
THEN
2186 ppatch%bv2bv(ivl) = ivlmin
2188 CALL
errorstop(global,err_vertex_match_failed,__line__)
2191 distminsave =
min(distmin,distminsave)
2198 DEALLOCATE(xyzr,stat=errorflag)
2199 global%error = errorflag
2200 IF ( global%error /= err_none )
THEN
2201 CALL
errorstop(global,err_deallocate,__line__,
'xyzr')
2206 IF ( global%myProcid == masterproc .AND. &
2207 global%verbLevel > verbose_none )
THEN
2208 WRITE(stdout,
'(A,5X,A,1X,E13.6)') solver_name, &
2209 'Maximum distance between matched vertices:',distmax
2210 WRITE(stdout,
'(A,5X,A,1X,E13.6)') solver_name, &
2211 'Minimum distance between matched vertices:',distminsave
2220 DO ivl = 1,ppatch%nBVert
2221 ivl2 = ppatchrelated%bv2bv(ivl)
2223 ppatch%bv2bv(ivl2) = ivl
2234 DEALLOCATE(cv,stat=errorflag)
2235 global%error = errorflag
2236 IF ( global%error /= err_none )
THEN
2237 CALL
errorstop(global,err_deallocate,__line__,
'cv')
2244 IF ( global%myProcid == masterproc .AND. &
2245 global%verbLevel > verbose_none )
THEN
2246 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building vertex maps done.'
2286 TYPE(t_region
),
POINTER :: pregion
2292 INTEGER :: errorflag,ipatch
2294 TYPE(t_grid),
POINTER :: pgrid
2295 TYPE(t_patch),
POINTER :: ppatch
2301 global => pregion%global
2304 'RFLU_ModSymmetryPeriodic.F90')
2306 IF ( global%myProcid == masterproc .AND. &
2307 global%verbLevel > verbose_low )
THEN
2308 WRITE(stdout,
'(A,1X,A)') solver_name, &
2309 'Creating patch-to-virtual-cell list...'
2310 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
2311 pregion%iRegionGlobal
2318 pgrid => pregion%grid
2324 DO ipatch = 1,pgrid%nPatches
2325 ppatch => pregion%patches(ipatch)
2327 IF ( ppatch%nBCellsVirt > 0 )
THEN
2328 ALLOCATE(ppatch%bvc(ppatch%nBCellsVirt),stat=errorflag)
2329 global%error = errorflag
2330 IF ( global%error /= err_none )
THEN
2331 CALL
errorstop(global,err_allocate,__line__,
'pPatch%bvc')
2342 IF ( global%myProcid == masterproc .AND. &
2343 global%verbLevel > verbose_low )
THEN
2344 WRITE(stdout,
'(A,1X,A)') solver_name, &
2345 'Creating patch-to-virtual-cell list done.'
2384 TYPE(t_region
),
POINTER :: pregion
2390 INTEGER :: errorflag,ipatch
2392 TYPE(t_grid),
POINTER :: pgrid
2393 TYPE(t_patch),
POINTER :: ppatch
2399 global => pregion%global
2402 'RFLU_ModSymmetryPeriodic.F90')
2404 IF ( global%myProcid == masterproc .AND. &
2405 global%verbLevel > verbose_none )
THEN
2406 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating vertex maps...'
2409 pgrid => pregion%grid
2415 DO ipatch = 1,pgrid%nPatches
2416 ppatch => pregion%patches(ipatch)
2418 IF ( ppatch%bcType == bc_periodic )
THEN
2419 ALLOCATE(ppatch%bv2bv(ppatch%nBVert),stat=errorflag)
2420 global%error = errorflag
2421 IF ( global%error /= err_none )
THEN
2422 CALL
errorstop(global,err_allocate,__line__,
'pPatch%bv2bv')
2425 nullify(ppatch%bv2bv)
2433 IF ( global%myProcid == masterproc .AND. &
2434 global%verbLevel > verbose_none )
THEN
2435 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating vertex maps done.'
2475 TYPE(t_region
),
POINTER :: pregion
2481 INTEGER :: errorflag,ipatch
2483 TYPE(t_grid),
POINTER :: pgrid
2484 TYPE(t_patch),
POINTER :: ppatch
2490 global => pregion%global
2493 'RFLU_ModSymmetryPeriodic.F90')
2495 IF ( global%myProcid == masterproc .AND. &
2496 global%verbLevel > verbose_low )
THEN
2497 WRITE(stdout,
'(A,1X,A)') solver_name, &
2498 'Destroying patch-to-virtual-cell list...'
2505 pgrid => pregion%grid
2511 DO ipatch = 1,pgrid%nPatches
2512 ppatch => pregion%patches(ipatch)
2514 IF ( ppatch%nBCellsVirt > 0 )
THEN
2515 ppatch%nBCellsVirt = 0
2517 DEALLOCATE(ppatch%bvc,stat=errorflag)
2518 global%error = errorflag
2519 IF ( global%error /= err_none )
THEN
2520 CALL
errorstop(global,err_deallocate,__line__,
'pPatch%bvc')
2531 IF ( global%myProcid == masterproc .AND. &
2532 global%verbLevel > verbose_low )
THEN
2533 WRITE(stdout,
'(A,1X,A)') solver_name, &
2534 'Destroying patch-to-virtual-cell list done.'
2578 INTEGER,
INTENT(IN) :: icgs
2579 INTEGER,
INTENT(OUT) :: icgs2
2580 TYPE(t_region
),
POINTER :: pregionserial
2586 LOGICAL :: foundflag
2587 INTEGER :: iborderserial,iborderserial2,iloc
2588 TYPE(t_border),
POINTER :: pborderserial,pborderserial2
2590 TYPE(t_grid),
POINTER :: pgridserial
2596 global => pregionserial%global
2599 'RFLU_ModSymmetryPeriodic.F90')
2605 pgridserial => pregionserial%grid
2611 IF ( pregionserial%iRegionGlobal /= 0 )
THEN
2612 CALL
errorstop(global,err_region_id_invalid,__line__)
2615 IF ( (icgs <= pgridserial%nCells ) .OR. &
2616 (icgs > pgridserial%nCellsTot) )
THEN
2617 CALL
errorstop(global,err_cell_kind_invalid,__line__)
2624 borderloop2:
DO iborderserial = 1,pgridserial%nBorders
2625 pborderserial => pgridserial%borders(iborderserial)
2628 pborderserial%nCellsRecv,icgs,iloc)
2630 IF ( iloc /= element_not_found )
THEN
2633 iborderserial2 = pborderserial%iBorder
2635 IF ( iborderserial2 > pgridserial%nBorders )
THEN
2636 CALL
errorstop(global,err_border_index_invalid,__line__)
2639 pborderserial2 => pgridserial%borders(iborderserial2)
2641 icgs2 = pborderserial2%icgSend(iloc)
2643 IF ( icgs2 > pgridserial%nCells )
THEN
2644 CALL
errorstop(global,err_cell_kind_invalid,__line__)
2651 IF ( foundflag .EQV. .false. )
THEN
2652 CALL
errorstop(global,err_cell_not_found,__line__)
2702 INTEGER,
INTENT(IN) :: ivgs
2703 INTEGER,
INTENT(OUT) :: ivg
2704 TYPE(t_region
),
POINTER :: pregion,pregionserial
2710 LOGICAL :: exitborderloopflag,foundflagrecv,foundflagshared
2711 INTEGER :: errorflag,iborderserial,iborderserial2,iloc,ivgs2,ivl,ivls2
2712 INTEGER,
DIMENSION(:),
ALLOCATABLE :: ivgsharedsorted,sortkey
2713 TYPE(t_border),
POINTER :: pborderserial,pborderserial2
2715 TYPE(t_grid),
POINTER :: pgrid,pgridserial
2721 global => pregionserial%global
2724 'RFLU_ModSymmetryPeriodic.F90')
2730 pgridserial => pregionserial%grid
2731 pgrid => pregion%grid
2733 foundflagrecv = .false.
2734 foundflagshared = .false.
2740 IF ( pregionserial%iRegionGlobal /= 0 )
THEN
2741 CALL
errorstop(global,err_region_id_invalid,__line__)
2748 exitborderloopflag = .false.
2750 borderloopshared:
DO iborderserial = 1,pgridserial%nBorders
2751 pborderserial => pgridserial%borders(iborderserial)
2753 ALLOCATE(ivgsharedsorted(pborderserial%nVertShared),stat=errorflag)
2754 global%error = errorflag
2755 IF ( global%error /= err_none )
THEN
2756 CALL
errorstop(global,err_allocate,__line__,
'ivgSharedSorted')
2759 ALLOCATE(sortkey(pborderserial%nVertShared),stat=errorflag)
2760 global%error = errorflag
2761 IF ( global%error /= err_none )
THEN
2762 CALL
errorstop(global,err_allocate,__line__,
'sortKey')
2765 DO ivl = 1,pborderserial%nVertShared
2766 ivgsharedsorted(ivl) = pborderserial%ivgShared(ivl)
2771 pborderserial%nVertShared)
2776 IF ( iloc /= element_not_found )
THEN
2777 iborderserial2 = pborderserial%iBorder
2779 pborderserial2 => pgridserial%borders(iborderserial2)
2781 ivls2 = sortkey(iloc)
2782 ivgs2 = pborderserial2%ivgShared(ivls2)
2785 pgrid%nVertTot,ivgs2,iloc)
2787 IF ( iloc /= element_not_found )
THEN
2788 ivg = pgrid%sv2pv(2,iloc)
2790 IF ( ivg > pgrid%nVert )
THEN
2791 CALL
errorstop(global,err_vertex_kind_invalid,__line__)
2794 exitborderloopflag = .true.
2795 foundflagshared = .true.
2797 CALL
errorstop(global,err_vertex_not_found,__line__)
2801 DEALLOCATE(ivgsharedsorted,stat=errorflag)
2802 global%error = errorflag
2803 IF ( global%error /= err_none )
THEN
2804 CALL
errorstop(global,err_deallocate,__line__,
'ivgSharedSorted')
2807 DEALLOCATE(sortkey,stat=errorflag)
2808 global%error = errorflag
2809 IF ( global%error /= err_none )
THEN
2810 CALL
errorstop(global,err_deallocate,__line__,
'sortKey')
2813 IF ( exitborderloopflag .EQV. .true. )
THEN
2814 EXIT borderloopshared
2816 END DO borderloopshared
2822 IF ( foundflagshared .EQV. .false. )
THEN
2823 exitborderloopflag = .false.
2825 borderlooprecv:
DO iborderserial = 1,pgridserial%nBorders
2826 pborderserial => pgridserial%borders(iborderserial)
2829 pborderserial%nVertRecv,ivgs,iloc)
2831 IF ( iloc /= element_not_found )
THEN
2832 iborderserial2 = pborderserial%iBorder
2834 pborderserial2 => pgridserial%borders(iborderserial2)
2836 ivgs2 = pborderserial2%ivgSend(iloc)
2839 pgrid%nVertTot,ivgs2,iloc)
2841 IF ( iloc /= element_not_found )
THEN
2842 ivg = pgrid%sv2pv(2,iloc)
2844 IF ( ivg > pgrid%nVert )
THEN
2845 CALL
errorstop(global,err_vertex_kind_invalid,__line__)
2848 exitborderloopflag = .true.
2849 foundflagrecv = .true.
2851 CALL
errorstop(global,err_vertex_not_found,__line__)
2855 IF ( exitborderloopflag .EQV. .true. )
THEN
2858 END DO borderlooprecv
2862 IF ( (foundflagshared .EQV. .false.) .AND. &
2863 (foundflagrecv .EQV. .false.) )
THEN
2864 CALL
errorstop(global,err_vertex_not_found,__line__)
2911 TYPE(t_region
),
POINTER :: pregion
2917 INTEGER :: errorflag,ipatch,nsypepatches
2919 TYPE(t_grid),
POINTER :: pgrid
2920 TYPE(t_patch),
POINTER :: ppatch
2926 global => pregion%global
2929 'RFLU_ModSymmetryPeriodic.F90')
2935 pgrid => pregion%grid
2943 ipatchloop:
DO ipatch = 1,pgrid%nPatches
2944 ppatch => pregion%patches(ipatch)
2946 IF ( ppatch%bcType == bc_symmetry .OR. ppatch%bcType == bc_periodic )
THEN
2947 nsypepatches = nsypepatches + 1
2953 IF ( nsypepatches > 0 )
THEN
3005 INTEGER,
INTENT(IN) :: ivg
3006 INTEGER,
INTENT(OUT) :: ivgm
3007 TYPE(t_patch),
POINTER :: ppatch
3008 TYPE(t_region
),
POINTER :: pregion
3014 INTEGER :: errorflag,iloc,ipatchrelated,ivlm
3016 TYPE(t_patch),
POINTER :: ppatchrelated
3022 global => pregion%global
3025 'RFLU_ModSymmetryPeriodic.F90')
3031 ipatchrelated = ppatch%iPatchRelated
3032 ppatchrelated => pregion%patches(ipatchrelated)
3040 IF ( iloc /= element_not_found )
THEN
3041 ivlm = ppatch%bv2bv(iloc)
3042 ivgm = ppatchrelated%bv(ivlm)
3044 CALL
errorstop(global,err_vertex_not_found,__line__)
3089 TYPE(t_region
),
POINTER :: pregion
3095 CHARACTER(CHRLEN) :: ifilename,sectionstring
3096 INTEGER :: errorflag,ifile,ipatch,ipatchglobal
3097 REAL(RFREAL) :: tm(xcoord:xyzmag,xcoord:xyzmag)
3099 TYPE(t_grid),
POINTER :: pgrid
3100 TYPE(t_patch),
POINTER :: ppatch
3106 global => pregion%global
3109 'RFLU_ModSymmetryPeriodic.F90')
3111 IF ( global%myProcid == masterproc )
THEN
3112 IF ( global%verbLevel > verbose_none )
THEN
3113 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading periodicity transforms...'
3115 IF ( global%verbLevel > verbose_low )
THEN
3116 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
3117 pregion%iRegionGlobal
3126 pgrid => pregion%grid
3136 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"OLD",iostat=errorflag)
3137 global%error = errorflag
3138 IF ( global%error /= err_none )
THEN
3139 CALL
errorstop(global,err_file_open,__line__,trim(ifilename))
3146 READ(ifile,
'(A)') sectionstring
3147 IF ( trim(sectionstring) /= &
3148 '# ROCFLU periodic-transformation matrix file' )
THEN
3149 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
3157 READ(ifile,
'(A)') sectionstring
3159 SELECT CASE ( trim(sectionstring) )
3166 READ(ifile,
'(I3)') ipatchglobal
3168 IF ( global%myProcid == masterproc .AND. &
3169 global%verbLevel > verbose_low )
THEN
3170 WRITE(stdout,
'(A,3X,A,1X,I3)') solver_name,
'Global patch:', &
3174 READ(ifile,
'(4(E23.16))') tm(xcoord,xcoord),tm(xcoord,ycoord), &
3175 tm(xcoord,zcoord),tm(xcoord,xyzmag)
3176 READ(ifile,
'(4(E23.16))') tm(ycoord,xcoord),tm(ycoord,ycoord), &
3177 tm(ycoord,zcoord),tm(ycoord,xyzmag)
3178 READ(ifile,
'(4(E23.16))') tm(zcoord,xcoord),tm(zcoord,ycoord), &
3179 tm(zcoord,zcoord),tm(zcoord,xyzmag)
3180 READ(ifile,
'(4(E23.16))') tm(xyzmag,xcoord),tm(xyzmag,ycoord), &
3181 tm(xyzmag,zcoord),tm(xyzmag,xyzmag)
3187 patchloop:
DO ipatch = 1,pgrid%nPatches
3188 ppatch => pregion%patches(ipatch)
3190 IF ( ppatch%iPatchGlobal == ipatchglobal )
THEN
3191 IF ( global%myProcid == masterproc .AND. &
3192 global%verbLevel > verbose_low )
THEN
3193 WRITE(stdout,
'(A,5X,A,1X,I3)') solver_name,
'Local patch:', &
3197 ppatch%transformFlag = .true.
3199 ppatch%tm(xcoord,xcoord) = tm(xcoord,xcoord)
3200 ppatch%tm(xcoord,ycoord) = tm(xcoord,ycoord)
3201 ppatch%tm(xcoord,zcoord) = tm(xcoord,zcoord)
3202 ppatch%tm(xcoord,xyzmag) = tm(xcoord,xyzmag)
3203 ppatch%tm(ycoord,xcoord) = tm(ycoord,xcoord)
3204 ppatch%tm(ycoord,ycoord) = tm(ycoord,ycoord)
3205 ppatch%tm(ycoord,zcoord) = tm(ycoord,zcoord)
3206 ppatch%tm(ycoord,xyzmag) = tm(ycoord,xyzmag)
3207 ppatch%tm(zcoord,xcoord) = tm(zcoord,xcoord)
3208 ppatch%tm(zcoord,ycoord) = tm(zcoord,ycoord)
3209 ppatch%tm(zcoord,zcoord) = tm(zcoord,zcoord)
3210 ppatch%tm(zcoord,xyzmag) = tm(zcoord,xyzmag)
3211 ppatch%tm(xyzmag,xcoord) = tm(xyzmag,xcoord)
3212 ppatch%tm(xyzmag,ycoord) = tm(xyzmag,ycoord)
3213 ppatch%tm(xyzmag,zcoord) = tm(xyzmag,zcoord)
3214 ppatch%tm(xyzmag,xyzmag) = tm(xyzmag,xyzmag)
3232 IF ( global%verbLevel > verbose_low )
THEN
3233 WRITE(stdout,
'(3X,A)') sectionstring
3236 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
3244 CLOSE(ifile,iostat=errorflag)
3245 global%error = errorflag
3246 IF ( global%error /= err_none )
THEN
3247 CALL
errorstop(global,err_file_close,__line__,trim(ifilename))
3254 DO ipatch = 1,pgrid%nPatches
3255 ppatch => pregion%patches(ipatch)
3257 IF ( ppatch%bcType == bc_periodic )
THEN
3258 IF ( ppatch%transformFlag .EQV. .false. )
THEN
3260 WRITE(*,*)
'ERROR! Periodic patch without transform!'
3271 IF ( global%myProcid == masterproc .AND. &
3272 global%verbLevel > verbose_none )
THEN
3273 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading periodicity transforms done.'
3329 CHARACTER(CHRLEN) :: ifilename
3330 CHARACTER(256) ::
line
3331 INTEGER :: errorflag,ipatch,loopcounter
3338 'RFLU_ModSymmetryPeriodic.F90')
3346 global%syPePatchesFlag = .false.
3354 OPEN(if_input,file=ifilename,
form=
'FORMATTED',
status=
'OLD',iostat=errorflag)
3355 global%error = errorflag
3356 IF ( global%error /= err_none )
THEN
3357 CALL
errorstop(global,err_file_open,__line__,
'File: '//trim(ifilename))
3365 READ(if_input,
'(A256)',iostat=errorflag)
line
3367 IF ( errorflag > 0 )
THEN
3368 CALL
errorstop(global,err_file_read,__line__,
'File: '//trim(ifilename))
3369 ELSE IF ( errorflag < 0 )
THEN
3373 SELECT CASE( trim(
line) )
3374 CASE (
'# BC_PERIODIC')
3375 global%syPePatchesFlag = .true.
3377 CASE (
'# BC_SYMMETRY')
3378 global%syPePatchesFlag = .true.
3384 loopcounter = loopcounter + 1
3386 IF ( loopcounter >= limit_infinite_loop )
THEN
3387 CALL
errorstop(global,err_infinite_loop ,__line__)
3395 CLOSE(if_input,iostat=errorflag)
3396 global%error = errorflag
3397 IF ( global%error /= err_none )
THEN
3398 CALL
errorstop(global,err_file_close,__line__,
'File: '//trim(ifilename))
3445 TYPE(t_region
),
POINTER :: pregion
3451 CHARACTER(CHRLEN) :: ifilename,sectionstring
3452 INTEGER :: errorflag,ifile,ipatch
3454 TYPE(t_grid),
POINTER :: pgrid
3455 TYPE(t_patch),
POINTER :: ppatch
3461 global => pregion%global
3464 'RFLU_ModSymmetryPeriodic.F90')
3466 IF ( global%myProcid == masterproc )
THEN
3467 IF ( global%verbLevel > verbose_none )
THEN
3468 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing periodicity transforms...'
3470 IF ( global%verbLevel > verbose_low )
THEN
3471 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
3472 pregion%iRegionGlobal
3481 pgrid => pregion%grid
3491 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"UNKNOWN",iostat=errorflag)
3492 global%error = errorflag
3493 IF ( global%error /= err_none )
THEN
3494 CALL
errorstop(global,err_file_open,__line__,trim(ifilename))
3501 sectionstring =
'# ROCFLU periodic-transformation matrix file'
3502 WRITE(ifile,
'(A)') trim(sectionstring)
3508 DO ipatch = 1,pgrid%nPatches
3509 ppatch => pregion%patches(ipatch)
3511 IF ( ppatch%bcType == bc_periodic )
THEN
3512 WRITE(ifile,
'(A)')
'# Patch'
3514 WRITE(ifile,
'(I3)') ppatch%iPatchGlobal
3516 WRITE(ifile,
'(4(E23.16))') ppatch%tm(xcoord,xcoord), &
3517 ppatch%tm(xcoord,ycoord), &
3518 ppatch%tm(xcoord,zcoord), &
3519 ppatch%tm(xcoord,xyzmag)
3520 WRITE(ifile,
'(4(E23.16))') ppatch%tm(ycoord,xcoord), &
3521 ppatch%tm(ycoord,ycoord), &
3522 ppatch%tm(ycoord,zcoord), &
3523 ppatch%tm(ycoord,xyzmag)
3524 WRITE(ifile,
'(4(E23.16))') ppatch%tm(zcoord,xcoord), &
3525 ppatch%tm(zcoord,ycoord), &
3526 ppatch%tm(zcoord,zcoord), &
3527 ppatch%tm(zcoord,xyzmag)
3528 WRITE(ifile,
'(4(E23.16))') ppatch%tm(xyzmag,xcoord), &
3529 ppatch%tm(xyzmag,ycoord), &
3530 ppatch%tm(xyzmag,zcoord), &
3531 ppatch%tm(xyzmag,xyzmag)
3539 sectionstring =
'# End'
3540 WRITE(ifile,
'(A)') trim(sectionstring)
3546 CLOSE(ifile,iostat=errorflag)
3547 global%error = errorflag
3548 IF ( global%error /= err_none )
THEN
3549 CALL
errorstop(global,err_file_close,__line__,trim(ifilename))
3556 IF ( global%myProcid == masterproc .AND. &
3557 global%verbLevel > verbose_none )
THEN
3558 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing periodicity transforms done.'
subroutine, public rflu_sype_setsypepatchesflag(global)
subroutine rflu_sype_imposevertexmap(pRegion, pPatch, ivg, ivgm)
subroutine, public rflu_sype_buildtransforms(pRegion)
subroutine, public rflu_createc2cstencilwrapper(pRegion)
subroutine, public rflu_queryoctree(XPT, YPT, ZPT, NUMP, NEIGHP)
subroutine rflu_sype_createp2vclist(pRegion)
CImg< T > & line(const unsigned int y0)
Get a line.
subroutine, public rflu_buildfacevertlist(global, pGrid, fList, fListDim, vList, vListDimMax, vListDim, errorFlag)
subroutine, public rflu_sype_buildvertexmaps(pRegion)
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine rflu_sype_augmentcelllists(pRegion, pPatch, vc, nCellsVirt)
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine, public rflu_buildoctree(XI, YI, ZI, XLOW, XUPP, YLOW, YUPP, ZLOW, ZUPP)
subroutine quicksortinteger(a, n)
subroutine binarysearchinteger(a, n, v, i, j)
subroutine, public rflu_sype_destroyp2vclist(pRegion)
subroutine buildfilenameplain(global, dest, ext, fileName)
subroutine, public rflu_sype_getactualserialcell(pRegionSerial, icgs, icgs2)
subroutine rflu_sype_addvirtualcellsinv1(pRegion, pPatch, vc, nCellsVirtMax, nCellsVirt)
subroutine, public rflu_destroyc2cstencilwrapper(pRegion)
subroutine, public rflu_destroyoctree(global)
subroutine quicksortintegerinteger(a, b, n)
subroutine, private rflu_sype_addvirtualcellsinv2(pRegion, pPatch, vc, nCellsVirtMax, nCellsVirt)
subroutine, public rflu_sype_getrelatedvertex(pRegionSerial, pRegion, ivgs, ivg)
subroutine, public rflu_sype_addvirtualcells(pRegion)
**********************************************************************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 form
subroutine reflectposition(nx, ny, nz, xc, yc, zc, xComp, yComp, zComp)
subroutine, public rflu_sype_buildp2vclist(pRegion, pRegionSerial)
subroutine, public rflu_sype_createvertexmaps(pRegion)
subroutine, public rflu_setinfoc2cstencilwrapper(pRegion, orderNominal)
subroutine, public rflu_buildc2cstencilwrapper(pRegion, icgInput, constrInput)
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
subroutine rflu_sype_augmentvertexlists(pRegion, pGrid, pPatch, pBorder, pBorderRelated, x2v, icl, nXTot, ivgSendSorted, ivgRecvSorted, ivgSharedSorted)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine, public rflu_sype_writetransforms(pRegion)
subroutine, public rflu_buildvertcellnghblist(global, pGrid, vListOrig, vListOrigDim, nLayers, iReg, cList, cListDimMax, cListDim)
subroutine, public rflu_sype_readtransforms(pRegion)
subroutine, public rflu_sype_buildp2vclistserial(pRegion)
long double dist(long double *coord1, long double *coord2, int size)
subroutine deregisterfunction(global)
LOGICAL function, public rflu_sype_havesypepatches(pRegion)
subroutine, public rflu_createoctree(global, nPoints)