11 private :: lessequalindirecthalotype
12 private :: lessindirecthalotype
27 integer(kind=intType) :: myblock
28 integer(kind=intType) :: myi, myj, myk
29 integer(kind=intType) :: mydirecthalo
30 integer(kind=intType) :: levofind
31 integer(kind=intType) :: donorproc
38 interface operator(<=)
39 module procedure lessequalindirecthalotype
40 end interface operator(<=)
43 module procedure lessindirecthalotype
44 end interface operator(<)
64 integer(kind=intType),
dimension(:),
allocatable ::
nhaloperlev
71 logical function lessequalindirecthalotype(g1, g2)
88 if (g1%levOfInd < g2%levOfInd)
then
89 lessequalindirecthalotype = .true.
91 else if (g1%levOfInd > g2%levOfInd)
then
92 lessequalindirecthalotype = .false.
98 if (g1%donorProc < g2%donorProc)
then
99 lessequalindirecthalotype = .true.
101 else if (g1%donorProc > g2%donorProc)
then
102 lessequalindirecthalotype = .false.
108 if (g1%myDirectHalo < g2%myDirectHalo)
then
109 lessequalindirecthalotype = .true.
111 else if (g1%myDirectHalo > g2%myDirectHalo)
then
112 lessequalindirecthalotype = .false.
118 if (g1%myBlock < g2%myBlock)
then
119 lessequalindirecthalotype = .true.
121 else if (g1%myBlock > g2%myBlock)
then
122 lessequalindirecthalotype = .false.
128 if (g1%myK < g2%myK)
then
129 lessequalindirecthalotype = .true.
131 else if (g1%myK > g2%myK)
then
132 lessequalindirecthalotype = .false.
138 if (g1%myJ < g2%myJ)
then
139 lessequalindirecthalotype = .true.
141 else if (g1%myJ > g2%myJ)
then
142 lessequalindirecthalotype = .false.
148 if (g1%myI < g2%myI)
then
149 lessequalindirecthalotype = .true.
151 else if (g1%myI > g2%myI)
then
152 lessequalindirecthalotype = .false.
158 lessequalindirecthalotype = .true.
160 end function lessequalindirecthalotype
164 logical function lessindirecthalotype(g1, g2)
180 if (g1%levOfInd < g2%levOfInd)
then
181 lessindirecthalotype = .true.
183 else if (g1%levOfInd > g2%levOfInd)
then
184 lessindirecthalotype = .false.
190 if (g1%donorProc < g2%donorProc)
then
191 lessindirecthalotype = .true.
193 else if (g1%donorProc > g2%donorProc)
then
194 lessindirecthalotype = .false.
200 if (g1%myDirectHalo < g2%myDirectHalo)
then
201 lessindirecthalotype = .true.
203 else if (g1%myDirectHalo > g2%myDirectHalo)
then
204 lessindirecthalotype = .false.
210 if (g1%myBlock < g2%myBlock)
then
211 lessindirecthalotype = .true.
213 else if (g1%myBlock > g2%myBlock)
then
214 lessindirecthalotype = .false.
220 if (g1%myK < g2%myK)
then
221 lessindirecthalotype = .true.
223 else if (g1%myK > g2%myK)
then
224 lessindirecthalotype = .false.
230 if (g1%myJ < g2%myJ)
then
231 lessindirecthalotype = .true.
233 else if (g1%myJ > g2%myJ)
then
234 lessindirecthalotype = .false.
240 if (g1%myI < g2%myI)
then
241 lessindirecthalotype = .true.
243 else if (g1%myI > g2%myI)
then
244 lessindirecthalotype = .false.
251 lessindirecthalotype = .false.
253 end function lessindirecthalotype
266 private :: lessequalhalolisttype
267 private :: lesshalolisttype
292 integer(kind=intType) :: myblock
293 integer(kind=intType) :: myi, myj, myk
294 integer(kind=intType) :: donorproc, donorblock
295 integer(kind=intType) :: di, dj, dk
296 integer(kind=intType) :: levofind
297 real(kind=
realtype),
dimension(:),
pointer :: interp
299 integer(kind=intType) :: nperiodicsubfaces
300 integer(kind=intType),
dimension(:),
pointer :: periodicsubfaces
307 interface operator(<=)
308 module procedure lessequalhalolisttype
309 end interface operator(<=)
311 interface operator(<)
312 module procedure lesshalolisttype
313 end interface operator(<)
365 integer(kind=intType),
dimension(:, :, :),
pointer :: entrylist
379 logical function lessequalhalolisttype(g1, g2)
396 if (g1%donorProc < g2%donorProc)
then
397 lessequalhalolisttype = .true.
399 else if (g1%donorProc > g2%donorProc)
then
400 lessequalhalolisttype = .false.
407 boundary:
if (g1%donorProc == -1)
then
413 if (g1%myBlock < g2%myBlock)
then
414 lessequalhalolisttype = .true.
416 else if (g1%myBlock > g2%myBlock)
then
417 lessequalhalolisttype = .false.
425 if (g1%donorBlock < g2%donorBlock)
then
426 lessequalhalolisttype = .true.
428 else if (g1%donorBlock > g2%donorBlock)
then
429 lessequalhalolisttype = .false.
437 if (g1%levOfInd < g2%levOfInd)
then
438 lessequalhalolisttype = .true.
440 else if (g1%levOfInd > g2%levOfInd)
then
441 lessequalhalolisttype = .false.
448 if (g1%myK < g2%myK)
then
449 lessequalhalolisttype = .true.
451 else if (g1%myK > g2%myK)
then
452 lessequalhalolisttype = .false.
456 if (g1%myJ < g2%myJ)
then
457 lessequalhalolisttype = .true.
459 else if (g1%myJ > g2%myJ)
then
460 lessequalhalolisttype = .false.
464 if (g1%myI < g2%myI)
then
465 lessequalhalolisttype = .true.
467 else if (g1%myI > g2%myI)
then
468 lessequalhalolisttype = .false.
479 if (g1%donorBlock < g2%donorBlock)
then
480 lessequalhalolisttype = .true.
482 else if (g1%donorBlock > g2%donorBlock)
then
483 lessequalhalolisttype = .false.
490 if (g1%dK < g2%dK)
then
491 lessequalhalolisttype = .true.
493 else if (g1%dK > g2%dK)
then
494 lessequalhalolisttype = .false.
500 if (g1%dJ < g2%dJ)
then
501 lessequalhalolisttype = .true.
503 else if (g1%dJ > g2%dJ)
then
504 lessequalhalolisttype = .false.
510 if (g1%dI < g2%dI)
then
511 lessequalhalolisttype = .true.
513 else if (g1%dI > g2%dI)
then
514 lessequalhalolisttype = .false.
521 if (g1%myBlock < g2%myBlock)
then
522 lessequalhalolisttype = .true.
524 else if (g1%myBlock > g2%myBlock)
then
525 lessequalhalolisttype = .false.
532 if (g1%myK < g2%myK)
then
533 lessequalhalolisttype = .true.
535 else if (g1%myK > g2%myK)
then
536 lessequalhalolisttype = .false.
542 if (g1%myJ < g2%myJ)
then
543 lessequalhalolisttype = .true.
545 else if (g1%myJ > g2%myJ)
then
546 lessequalhalolisttype = .false.
552 if (g1%myI < g2%myI)
then
553 lessequalhalolisttype = .true.
555 else if (g1%myI > g2%myI)
then
556 lessequalhalolisttype = .false.
564 lessequalhalolisttype = .true.
566 end function lessequalhalolisttype
570 logical function lesshalolisttype(g1, g2)
586 if (g1%donorProc < g2%donorProc)
then
587 lesshalolisttype = .true.
589 else if (g1%donorProc > g2%donorProc)
then
590 lesshalolisttype = .false.
597 boundary:
if (g1%donorProc == -1)
then
603 if (g1%myBlock < g2%myBlock)
then
604 lesshalolisttype = .true.
606 else if (g1%myBlock > g2%myBlock)
then
607 lesshalolisttype = .false.
615 if (g1%donorBlock < g2%donorBlock)
then
616 lesshalolisttype = .true.
618 else if (g1%donorBlock > g2%donorBlock)
then
619 lesshalolisttype = .false.
627 if (g1%levOfInd < g2%levOfInd)
then
628 lesshalolisttype = .true.
630 else if (g1%levOfInd > g2%levOfInd)
then
631 lesshalolisttype = .false.
638 if (g1%myK < g2%myK)
then
639 lesshalolisttype = .true.
641 else if (g1%myK > g2%myK)
then
642 lesshalolisttype = .false.
646 if (g1%myJ < g2%myJ)
then
647 lesshalolisttype = .true.
649 else if (g1%myJ > g2%myJ)
then
650 lesshalolisttype = .false.
654 if (g1%myI < g2%myI)
then
655 lesshalolisttype = .true.
657 else if (g1%myI > g2%myI)
then
658 lesshalolisttype = .false.
669 if (g1%donorBlock < g2%donorBlock)
then
670 lesshalolisttype = .true.
672 else if (g1%donorBlock > g2%donorBlock)
then
673 lesshalolisttype = .false.
680 if (g1%dK < g2%dK)
then
681 lesshalolisttype = .true.
683 else if (g1%dK > g2%dK)
then
684 lesshalolisttype = .false.
690 if (g1%dJ < g2%dJ)
then
691 lesshalolisttype = .true.
693 else if (g1%dJ > g2%dJ)
then
694 lesshalolisttype = .false.
700 if (g1%dI < g2%dI)
then
701 lesshalolisttype = .true.
703 else if (g1%dI > g2%dI)
then
704 lesshalolisttype = .false.
711 if (g1%myBlock < g2%myBlock)
then
712 lesshalolisttype = .true.
714 else if (g1%myBlock > g2%myBlock)
then
715 lesshalolisttype = .false.
722 if (g1%myK < g2%myK)
then
723 lesshalolisttype = .true.
725 else if (g1%myK > g2%myK)
then
726 lesshalolisttype = .false.
732 if (g1%myJ < g2%myJ)
then
733 lesshalolisttype = .true.
735 else if (g1%myJ > g2%myJ)
then
736 lesshalolisttype = .false.
742 if (g1%myI < g2%myI)
then
743 lesshalolisttype = .true.
745 else if (g1%myI > g2%myI)
then
746 lesshalolisttype = .false.
755 lesshalolisttype = .false.
757 end function lesshalolisttype
776 logical :: blockhasnegvol
777 logical,
dimension(:, :, :),
pointer :: volumeisneg
778 logical :: blockhasskewedvol
779 logical,
dimension(:, :, :),
pointer :: volumeisskewed
795 private :: lesscgnsperiodictype
796 private :: equalcgnsperiodictype
797 private :: lessperiodicsubfaceshalot
798 private :: lessequalperiodicsubfaceshalot
799 private :: equalperiodicsubfaceshalot
809 integer(kind=intType) :: cgnsblock, cgnssubface
817 interface operator(<)
818 module procedure lesscgnsperiodictype
819 end interface operator(<)
821 interface operator(==)
822 module procedure equalcgnsperiodictype
823 end interface operator(==)
848 logical :: internalhalo
849 integer(kind=intType) :: indexinhalolist
850 integer(kind=intType) :: nperiodicsubfaces
851 integer(kind=intType),
dimension(:),
pointer :: periodicsubfaces
859 interface operator(<)
860 module procedure lessperiodicsubfaceshalot
861 end interface operator(<)
863 interface operator(<=)
864 module procedure lessequalperiodicsubfaceshalot
865 end interface operator(<=)
867 interface operator(==)
868 module procedure equalperiodicsubfaceshalot
869 end interface operator(==)
879 logical function lesscgnsperiodictype(g1, g2)
894 if (g1%cgnsBlock < g2%cgnsBlock)
then
895 lesscgnsperiodictype = .true.
897 else if (g1%cgnsBlock > g2%cgnsBlock)
then
898 lesscgnsperiodictype = .false.
904 if (g1%cgnsSubface < g2%cgnsSubface)
then
905 lesscgnsperiodictype = .true.
907 else if (g1%cgnsSubface > g2%cgnsSubface)
then
908 lesscgnsperiodictype = .false.
915 lesscgnsperiodictype = .false.
917 end function lesscgnsperiodictype
921 logical function equalcgnsperiodictype(g1, g2)
932 equalcgnsperiodictype = .false.
933 if (g1%cgnsBlock == g2%cgnsBlock .and. &
934 g1%cgnsSubface == g2%cgnsSubface) &
935 equalcgnsperiodictype = .true.
937 end function equalcgnsperiodictype
941 logical function lessperiodicsubfaceshalot(g1, g2)
954 integer(kind=intType) :: nn, i1, i2
960 i1 = 1;
if (g1%internalHalo) i1 = 0
961 i2 = 1;
if (g2%internalHalo) i2 = 0
964 lessperiodicsubfaceshalot = .true.
966 else if (i1 > i2)
then
967 lessperiodicsubfaceshalot = .false.
973 if (g1%nPeriodicSubfaces < g2%nPeriodicSubfaces)
then
974 lessperiodicsubfaceshalot = .true.
976 else if (g1%nPeriodicSubfaces > g2%nPeriodicSubfaces)
then
977 lessperiodicsubfaceshalot = .false.
986 do nn = 1, g1%nPeriodicSubfaces
987 if (g1%periodicSubfaces(nn) < g2%periodicSubfaces(nn))
then
988 lessperiodicsubfaceshalot = .true.
990 else if (g1%periodicSubfaces(nn) > g2%periodicSubfaces(nn))
then
991 lessperiodicsubfaceshalot = .false.
999 if (g1%indexInHaloList < g2%indexInHaloList)
then
1000 lessperiodicsubfaceshalot = .true.
1002 else if (g1%indexInHaloList > g2%indexInHaloList)
then
1003 lessperiodicsubfaceshalot = .false.
1009 lessperiodicsubfaceshalot = .false.
1011 end function lessperiodicsubfaceshalot
1015 logical function lessequalperiodicsubfaceshalot(g1, g2)
1028 integer(kind=intType) :: nn, i1, i2
1034 i1 = 1;
if (g1%internalHalo) i1 = 0
1035 i2 = 1;
if (g2%internalHalo) i2 = 0
1038 lessequalperiodicsubfaceshalot = .true.
1040 else if (i1 > i2)
then
1041 lessequalperiodicsubfaceshalot = .false.
1047 if (g1%nPeriodicSubfaces < g2%nPeriodicSubfaces)
then
1048 lessequalperiodicsubfaceshalot = .true.
1050 else if (g1%nPeriodicSubfaces > g2%nPeriodicSubfaces)
then
1051 lessequalperiodicsubfaceshalot = .false.
1060 do nn = 1, g1%nPeriodicSubfaces
1061 if (g1%periodicSubfaces(nn) < g2%periodicSubfaces(nn))
then
1062 lessequalperiodicsubfaceshalot = .true.
1064 else if (g1%periodicSubfaces(nn) > g2%periodicSubfaces(nn))
then
1065 lessequalperiodicsubfaceshalot = .false.
1073 if (g1%indexInHaloList < g2%indexInHaloList)
then
1074 lessequalperiodicsubfaceshalot = .true.
1076 else if (g1%indexInHaloList > g2%indexInHaloList)
then
1077 lessequalperiodicsubfaceshalot = .false.
1083 lessequalperiodicsubfaceshalot = .true.
1085 end function lessequalperiodicsubfaceshalot
1089 logical function equalperiodicsubfaceshalot(g1, g2)
1107 integer(kind=intType) :: nn
1109 if (g1%nPeriodicSubfaces /= g2%nPeriodicSubfaces)
then
1110 equalperiodicsubfaceshalot = .false.
1114 do nn = 1, g1%nPeriodicSubfaces
1115 if (g1%periodicSubfaces(nn) /= g2%periodicSubfaces(nn))
then
1116 equalperiodicsubfaceshalot = .false.
1121 equalperiodicsubfaceshalot = .true.
1123 end function equalperiodicsubfaceshalot
1138 private :: lessequalbchalotype
1148 integer(kind=intType) :: directhalo, bc
1157 interface operator(<=)
1158 module procedure lessequalbchalotype
1159 end interface operator(<=)
1163 logical function lessequalbchalotype(g1, g2)
1181 if (g1%BC < g2%BC)
then
1182 lessequalbchalotype = .true.
1184 else if (g1%BC > g2%BC)
then
1185 lessequalbchalotype = .false.
1191 if (g1%directHalo < g2%directHalo)
then
1192 lessequalbchalotype = .true.
1194 else if (g1%directHalo > g2%directHalo)
then
1195 lessequalbchalotype = .false.
1201 lessequalbchalotype = .true.
1203 end function lessequalbchalotype
1218 integer(kind=intType),
intent(in) :: nn
1219 type(
bchalotype),
dimension(*),
intent(inout) :: bcHaloArray
1223 integer(kind=intType) :: i, j
1229 do i = (j - 1), 1, -1
1230 if (bchaloarray(i) <= a)
exit
1231 bchaloarray(i + 1) = bchaloarray(i)
1233 bchaloarray(i + 1) = a
1257 integer(kind=intType) :: ibeg, jbeg, kbeg, iend, jend, kend
1261 integer(kind=intType) :: neighproc, neighblock
1266 integer(kind=intType) :: ndi, ndj, ndk
1271 integer(kind=intType),
dimension(:),
pointer :: idfine
1272 integer(kind=intType),
dimension(:),
pointer :: jdfine
1273 integer(kind=intType),
dimension(:),
pointer :: kdfine
1301 logical,
dimension(:),
pointer :: coarseis1to1
subroutine sortbchalotype(bcHaloArray, nn)
type(coarse1to1subfacetype), dimension(:), allocatable subface1to1
integer(kind=inttype) nsubface1to1
type(coarseninginfotype), dimension(:), allocatable coarseinfo
integer(kind=inttype) nnodehalo1st
type(halolisttype), dimension(:), allocatable cellhalo1st
type(halolisttype), dimension(:), allocatable cellhalo2nd
integer(kind=inttype), dimension(:, :), allocatable transformcell
type(halolisttype), dimension(:), allocatable nodehalo1st
integer(kind=inttype) ncellhalo2nd
integer(kind=inttype) iinode1st
integer(kind=inttype) iicell1st
integer(kind=inttype), dimension(:, :), allocatable transformnode
type(indexlisttype), dimension(:), allocatable nodeindex
integer(kind=inttype) ncellhalo1st
type(indexlisttype), dimension(:), allocatable cellindex
integer(kind=inttype) iicell2nd
integer(kind=inttype), dimension(:), allocatable nhaloperproc
integer(kind=inttype) nindhalo
integer(kind=inttype) nlevofind
integer(kind=inttype), dimension(:), allocatable nhaloperlev
type(indirecthalotype), dimension(:), allocatable indhalo
type(cgnsperiodictype), dimension(:), allocatable periodicglobal
integer(kind=inttype) nperiodicglobal
integer, parameter realtype