75 CHARACTER(CHRLEN) :: &
76 RCSIdentString =
'$RCSfile: RFLU_ModPartitionRegion.F90,v $ $Revision: 1.17 $'
124 TYPE(t_region
),
POINTER :: pregion,pregionserial
130 INTEGER :: errorflag,
i,icg,icg2,icl,ict,ilayer,iloc,ireg,
j,
key, &
131 ncellsvirt,ncellsvirtmax,nlayers
132 INTEGER,
DIMENSION(:),
ALLOCATABLE :: vc
133 TYPE(t_grid),
POINTER :: pgrid,pgridserial
140 global => pregionserial%global
143 'RFLU_ModPartitionRegion.F90')
145 IF ( global%verbLevel > verbose_none )
THEN
146 WRITE(stdout,
'(A,1X,A)') solver_name,
'Adding virtual cells...'
149 IF ( global%verbLevel > verbose_low )
THEN
150 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
151 pregion%iRegionGlobal
158 pgrid => pregion%grid
159 pgridserial => pregionserial%grid
165 ncellsvirtmax = pgrid%nCellsMax - pgrid%nCells
167 ALLOCATE(vc(ncellsvirtmax),stat=errorflag)
168 global%error = errorflag
169 IF ( global%error /= err_none )
THEN
170 CALL
errorstop(global,err_allocate,__line__,
'vc')
173 IF ( pregionserial%mixtInput%spaceOrder > 1 )
THEN
175 ncellsvirtmax,ncellsvirt)
178 ncellsvirtmax,ncellsvirt)
189 ict = pgridserial%cellGlob2Loc(1,icg)
190 icl = pgridserial%cellGlob2Loc(2,icg)
202 CASE ( cell_type_tet )
203 IF ( pgrid%nTetsTot == pgrid%nTetsMax )
THEN
204 global%warnCounter = global%warnCounter + 1
206 IF ( global%verbLevel > verbose_low )
THEN
207 WRITE(stdout,
'(A,3X,A)') solver_name, &
208 '*** WARNING *** About to exceed tetrahedra list dimensions.'
209 WRITE(stdout,
'(A,3X,A)') solver_name, &
210 ' Increasing list dimensions and continuing.'
214 pgrid%tet2v,pgrid%tet2CellGlob)
217 pgrid%nCellsTot = pgrid%nCellsTot + 1
218 pgrid%nTetsTot = pgrid%nTetsTot + 1
220 pgrid%tet2v(1,pgrid%nTetsTot) = pgridserial%tet2v(1,icl)
221 pgrid%tet2v(2,pgrid%nTetsTot) = pgridserial%tet2v(2,icl)
222 pgrid%tet2v(3,pgrid%nTetsTot) = pgridserial%tet2v(3,icl)
223 pgrid%tet2v(4,pgrid%nTetsTot) = pgridserial%tet2v(4,icl)
225 pgrid%cellGlob2Loc(1,pgrid%nCellsTot) = cell_type_tet
226 pgrid%cellGlob2Loc(2,pgrid%nCellsTot) = pgrid%nTetsTot
228 pgrid%tet2CellGlob(pgrid%nTetsTot) = pgrid%nCellsTot
234 CASE ( cell_type_hex )
235 IF ( pgrid%nHexsTot == pgrid%nHexsMax )
THEN
236 global%warnCounter = global%warnCounter + 1
238 IF ( global%verbLevel > verbose_low )
THEN
239 WRITE(stdout,
'(A,3X,A)') solver_name, &
240 '*** WARNING *** About to exceed hexahedra list dimensions.'
241 WRITE(stdout,
'(A,3X,A)') solver_name, &
242 ' Increasing list dimensions and continuing.'
246 pgrid%hex2v,pgrid%hex2CellGlob)
249 pgrid%nCellsTot = pgrid%nCellsTot + 1
250 pgrid%nHexsTot = pgrid%nHexsTot + 1
252 pgrid%hex2v(1,pgrid%nHexsTot) = pgridserial%hex2v(1,icl)
253 pgrid%hex2v(2,pgrid%nHexsTot) = pgridserial%hex2v(2,icl)
254 pgrid%hex2v(3,pgrid%nHexsTot) = pgridserial%hex2v(3,icl)
255 pgrid%hex2v(4,pgrid%nHexsTot) = pgridserial%hex2v(4,icl)
256 pgrid%hex2v(5,pgrid%nHexsTot) = pgridserial%hex2v(5,icl)
257 pgrid%hex2v(6,pgrid%nHexsTot) = pgridserial%hex2v(6,icl)
258 pgrid%hex2v(7,pgrid%nHexsTot) = pgridserial%hex2v(7,icl)
259 pgrid%hex2v(8,pgrid%nHexsTot) = pgridserial%hex2v(8,icl)
261 pgrid%cellGlob2Loc(1,pgrid%nCellsTot) = cell_type_hex
262 pgrid%cellGlob2Loc(2,pgrid%nCellsTot) = pgrid%nHexsTot
264 pgrid%hex2CellGlob(pgrid%nHexsTot) = pgrid%nCellsTot
270 CASE ( cell_type_pri )
271 IF ( pgrid%nPrisTot == pgrid%nPrisMax )
THEN
272 global%warnCounter = global%warnCounter + 1
274 IF ( global%verbLevel > verbose_low )
THEN
275 WRITE(stdout,
'(A,3X,A)') solver_name, &
276 '*** WARNING *** About to exceed prism list dimensions.'
277 WRITE(stdout,
'(A,3X,A)') solver_name, &
278 ' Increasing list dimensions and continuing.'
282 pgrid%pri2v,pgrid%pri2CellGlob)
285 pgrid%nCellsTot = pgrid%nCellsTot + 1
286 pgrid%nPrisTot = pgrid%nPrisTot + 1
288 pgrid%pri2v(1,pgrid%nPrisTot) = pgridserial%pri2v(1,icl)
289 pgrid%pri2v(2,pgrid%nPrisTot) = pgridserial%pri2v(2,icl)
290 pgrid%pri2v(3,pgrid%nPrisTot) = pgridserial%pri2v(3,icl)
291 pgrid%pri2v(4,pgrid%nPrisTot) = pgridserial%pri2v(4,icl)
292 pgrid%pri2v(5,pgrid%nPrisTot) = pgridserial%pri2v(5,icl)
293 pgrid%pri2v(6,pgrid%nPrisTot) = pgridserial%pri2v(6,icl)
295 pgrid%cellGlob2Loc(1,pgrid%nCellsTot) = cell_type_pri
296 pgrid%cellGlob2Loc(2,pgrid%nCellsTot) = pgrid%nPrisTot
298 pgrid%pri2CellGlob(pgrid%nPrisTot) = pgrid%nCellsTot
304 CASE ( cell_type_pyr )
305 IF ( pgrid%nPyrsTot == pgrid%nPyrsMax )
THEN
306 global%warnCounter = global%warnCounter + 1
308 IF ( global%verbLevel > verbose_low )
THEN
309 WRITE(stdout,
'(A,3X,A)') solver_name, &
310 '*** WARNING *** About to exceed pyramid list dimensions.'
311 WRITE(stdout,
'(A,3X,A)') solver_name, &
312 ' Increasing list dimensions and continuing.'
316 pgrid%pyr2v,pgrid%pyr2CellGlob)
319 pgrid%nCellsTot = pgrid%nCellsTot + 1
320 pgrid%nPyrsTot = pgrid%nPyrsTot + 1
322 pgrid%pyr2v(1,pgrid%nPyrsTot) = pgridserial%pyr2v(1,icl)
323 pgrid%pyr2v(2,pgrid%nPyrsTot) = pgridserial%pyr2v(2,icl)
324 pgrid%pyr2v(3,pgrid%nPyrsTot) = pgridserial%pyr2v(3,icl)
325 pgrid%pyr2v(4,pgrid%nPyrsTot) = pgridserial%pyr2v(4,icl)
326 pgrid%pyr2v(5,pgrid%nPyrsTot) = pgridserial%pyr2v(5,icl)
328 pgrid%cellGlob2Loc(1,pgrid%nCellsTot) = cell_type_pyr
329 pgrid%cellGlob2Loc(2,pgrid%nCellsTot) = pgrid%nPyrsTot
331 pgrid%pyr2CellGlob(pgrid%nPyrsTot) = pgrid%nCellsTot
338 CALL
errorstop(global,err_reached_default,__line__)
345 pgrid%pc2sc(pgrid%nCellsTot) = icg
352 DEALLOCATE(vc,stat=errorflag)
353 global%error = errorflag
354 IF ( global%error /= err_none )
THEN
355 CALL
errorstop(global,err_deallocate,__line__,
'virtCells')
362 IF ( global%verbLevel > verbose_low )
THEN
363 WRITE(stdout,
'(A,3X,A)') solver_name,
'Virtual cell statistics:'
364 WRITE(stdout,
'(A,5X,A,1X,I6)') solver_name,
'Tetrahedra:', &
365 pgrid%nTetsTot-pgrid%nTets
366 WRITE(stdout,
'(A,5X,A,1X,I6)') solver_name,
'Hexahedra: ', &
367 pgrid%nHexsTot-pgrid%nHexs
368 WRITE(stdout,
'(A,5X,A,1X,I6)') solver_name,
'Prisms: ', &
369 pgrid%nPrisTot-pgrid%nPris
370 WRITE(stdout,
'(A,5X,A,1X,I6)') solver_name,
'Pyramids: ', &
371 pgrid%nPyrsTot-pgrid%nPyrs
378 IF ( global%verbLevel > verbose_none )
THEN
379 WRITE(stdout,
'(A,1X,A)') solver_name,
'Adding virtual cells done.'
419 TYPE(t_region
),
POINTER :: pregion
425 CHARACTER(CHRLEN) :: errorstring
426 INTEGER :: c1,c2,errorflag,ifg,ifl,ireg,ireg1,ireg2,nfacescut
427 INTEGER,
DIMENSION(:,:),
ALLOCATABLE :: avf
428 TYPE(t_grid),
POINTER :: pgrid
435 global => pregion%global
438 'RFLU_ModPartitionRegion.F90')
440 IF ( global%verbLevel > verbose_none )
THEN
441 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building border face lists...'
444 IF ( global%verbLevel > verbose_low )
THEN
445 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
446 pregion%iRegionGlobal
453 pgrid => pregion%grid
460 ALLOCATE(pgrid%avf(3,pgrid%nFacesCut),stat=errorflag)
461 global%error = errorflag
462 IF ( global%error /= err_none )
THEN
463 CALL
errorstop(global,err_allocate,__line__,
'pGrid%avf')
468 DO ifg = 1,pgrid%nFaces + pgrid%nFacesVV
469 c1 = pgrid%f2c(1,ifg)
470 c2 = pgrid%f2c(2,ifg)
472 IF ( pgrid%sc2r(c1) /= pgrid%sc2r(c2) )
THEN
473 nfacescut = nfacescut + 1
475 pgrid%avf(1,nfacescut) = ifg
476 pgrid%avf(2,nfacescut) = pgrid%sc2r(c1)
477 pgrid%avf(3,nfacescut) = pgrid%sc2r(c2)
481 IF ( nfacescut /= pgrid%nFacesCut )
THEN
482 WRITE(errorstring,
'(2(1X,I6))') nfacescut,pgrid%nFacesCut
483 CALL
errorstop(global,err_nfacescut_invalid,__line__,trim(errorstring))
497 ALLOCATE(pgrid%avfCSRInfo(global%nRegionsLocal),stat=errorflag)
498 global%error = errorflag
499 IF ( global%error /= err_none )
THEN
500 CALL
errorstop(global,err_allocate,__line__,
'pGrid%avfCSRInfo')
503 DO ireg = 1,global%nRegionsLocal
504 pgrid%avfCSRInfo(ireg) = 0
507 DO ifl = 1,pgrid%nFacesCut
508 ireg1 = pgrid%avf(2,ifl)
509 ireg2 = pgrid%avf(3,ifl)
511 pgrid%avfCSRInfo(ireg1) = pgrid%avfCSRInfo(ireg1) + 1
512 pgrid%avfCSRInfo(ireg2) = pgrid%avfCSRInfo(ireg2) + 1
521 pgrid%avfCSRInfo(1) = pgrid%avfCSRInfo(1) + 1
523 DO ireg = 2,global%nRegionsLocal
524 pgrid%avfCSRInfo(ireg) = pgrid%avfCSRInfo(ireg ) &
525 + pgrid%avfCSRInfo(ireg-1)
532 ALLOCATE(pgrid%avfCSR(2*pgrid%nFacesCut),stat=errorflag)
533 global%error = errorflag
534 IF ( global%error /= err_none )
THEN
535 CALL
errorstop(global,err_allocate,__line__,
'pGrid%avfCSR')
538 DO ifl = 1,pgrid%nFacesCut
539 ifg = pgrid%avf(1,ifl)
540 ireg1 = pgrid%avf(2,ifl)
541 ireg2 = pgrid%avf(3,ifl)
543 pgrid%avfCSRInfo(ireg1) = pgrid%avfCSRInfo(ireg1) - 1
544 pgrid%avfCSRInfo(ireg2) = pgrid%avfCSRInfo(ireg2) - 1
546 pgrid%avfCSR(pgrid%avfCSRInfo(ireg1)) = ifg
547 pgrid%avfCSR(pgrid%avfCSRInfo(ireg2)) = ifg
554 DEALLOCATE(pgrid%avf,stat=errorflag)
555 global%error = errorflag
556 IF ( global%error /= err_none )
THEN
557 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%avf')
564 IF ( global%verbLevel > verbose_none )
THEN
565 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building border face lists done.'
607 TYPE(t_region
),
POINTER :: pregion,pregionserial
613 INTEGER :: errorflag,
i,
ibeg,icg,icg2,icl,icl2,ict,
iend,ireg,nhexsact, &
614 nhexsvir,nprisact,nprisvir,npyrsact,npyrsvir,ntetsact,ntetsvir
615 TYPE(t_grid),
POINTER :: pgrid,pgridserial
622 global => pregion%global
625 'RFLU_ModPartitionRegion.F90')
627 IF ( global%verbLevel > verbose_none )
THEN
628 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building cell lists...'
631 IF ( global%verbLevel > verbose_low )
THEN
632 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
633 pregion%iRegionGlobal
640 pgrid => pregion%grid
641 pgridserial => pregionserial%grid
660 ireg = pregion%iRegionGlobal
661 ibeg = pgridserial%r2pcCSRInfo(ireg)
663 IF ( ireg /= global%nRegionsLocal )
THEN
664 iend = pgridserial%r2pcCSRInfo(ireg+1)-1
666 iend = pgridserial%nCellsTot
670 icg = pgridserial%r2pcCSR(
i)
672 ict = pgridserial%cellGlob2Loc(1,icg)
673 icl = pgridserial%cellGlob2Loc(2,icg)
681 CASE ( cell_type_tet )
682 IF ( icl <= pgridserial%nTets )
THEN
683 ntetsact = ntetsact + 1
686 ntetsvir = ntetsvir + 1
687 icl2 = ntetsvir + pgrid%nTets
690 pgrid%tet2v(1,icl2) = pgridserial%tet2v(1,icl)
691 pgrid%tet2v(2,icl2) = pgridserial%tet2v(2,icl)
692 pgrid%tet2v(3,icl2) = pgridserial%tet2v(3,icl)
693 pgrid%tet2v(4,icl2) = pgridserial%tet2v(4,icl)
695 icg2 = pgrid%tet2CellGlob(icl2)
697 pgrid%pc2sc(icg2) = icg
703 CASE ( cell_type_hex )
704 IF ( icl <= pgridserial%nHexs )
THEN
705 nhexsact = nhexsact + 1
708 nhexsvir = nhexsvir + 1
709 icl2 = nhexsvir + pgrid%nHexs
712 pgrid%hex2v(1,icl2) = pgridserial%hex2v(1,icl)
713 pgrid%hex2v(2,icl2) = pgridserial%hex2v(2,icl)
714 pgrid%hex2v(3,icl2) = pgridserial%hex2v(3,icl)
715 pgrid%hex2v(4,icl2) = pgridserial%hex2v(4,icl)
716 pgrid%hex2v(5,icl2) = pgridserial%hex2v(5,icl)
717 pgrid%hex2v(6,icl2) = pgridserial%hex2v(6,icl)
718 pgrid%hex2v(7,icl2) = pgridserial%hex2v(7,icl)
719 pgrid%hex2v(8,icl2) = pgridserial%hex2v(8,icl)
721 icg2 = pgrid%hex2CellGlob(icl2)
723 pgrid%pc2sc(icg2) = icg
729 CASE ( cell_type_pri )
730 IF ( icl <= pgridserial%nPris )
THEN
731 nprisact = nprisact + 1
734 nprisvir = nprisvir + 1
735 icl2 = nprisvir + pgrid%nPris
738 pgrid%pri2v(1,icl2) = pgridserial%pri2v(1,icl)
739 pgrid%pri2v(2,icl2) = pgridserial%pri2v(2,icl)
740 pgrid%pri2v(3,icl2) = pgridserial%pri2v(3,icl)
741 pgrid%pri2v(4,icl2) = pgridserial%pri2v(4,icl)
742 pgrid%pri2v(5,icl2) = pgridserial%pri2v(5,icl)
743 pgrid%pri2v(6,icl2) = pgridserial%pri2v(6,icl)
745 icg2 = pgrid%pri2CellGlob(icl2)
747 pgrid%pc2sc(icg2) = icg
753 CASE ( cell_type_pyr )
754 IF ( icl <= pgridserial%nPyrs )
THEN
755 npyrsact = npyrsact + 1
758 npyrsvir = npyrsvir + 1
759 icl2 = npyrsvir + pgrid%nPyrs
762 pgrid%pyr2v(1,icl2) = pgridserial%pyr2v(1,icl)
763 pgrid%pyr2v(2,icl2) = pgridserial%pyr2v(2,icl)
764 pgrid%pyr2v(3,icl2) = pgridserial%pyr2v(3,icl)
765 pgrid%pyr2v(4,icl2) = pgridserial%pyr2v(4,icl)
766 pgrid%pyr2v(5,icl2) = pgridserial%pyr2v(5,icl)
768 icg2 = pgrid%pyr2CellGlob(icl2)
770 pgrid%pc2sc(icg2) = icg
777 CALL
errorstop(global,err_reached_default,__line__)
785 IF ( global%verbLevel > verbose_none )
THEN
786 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building cell lists done.'
835 TYPE(t_region
),
POINTER :: pregion,pregionserial
841 INTEGER :: errorflag,icg,icgmax,icgmin,icg2,icl,ict,ifl,ifl2,iloc,ipatch, &
842 ireg,nbquadsact,nbquadsvir,nbtrisact,nbtrisvir,offs,v1g,v2g, &
844 TYPE(t_grid),
POINTER :: pgrid,pgridserial
846 TYPE(t_patch),
POINTER :: ppatch,ppatchserial
852 global => pregion%global
855 'RFLU_ModPartitionRegion.F90')
857 IF ( global%verbLevel > verbose_none )
THEN
858 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building patch lists...'
861 IF ( global%verbLevel > verbose_low )
THEN
862 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
863 pregion%iRegionGlobal
870 pgrid => pregion%grid
871 pgridserial => pregionserial%grid
878 icgmin = minval(pgrid%sbc2pc(1:1,1:pgrid%nBCellsTot))
879 icgmax = maxval(pgrid%sbc2pc(1:1,1:pgrid%nBCellsTot))
881 DO ipatch = 1,pgrid%nPatches
882 ppatch => pregion%patches(ipatch)
884 ppatchserial => pregionserial%patches(ppatch%iPatchGlobal)
886 ppatch%bcType = ppatchserial%bcType
894 offs = pgrid%pbf2sbfCSRInfo(ipatch) - 1
903 IF ( ppatchserial%bcType /= bc_virtual )
THEN
904 DO ifl = 1,ppatchserial%nBFacesTot
905 icg = ppatchserial%bf2c(ifl)
906 ireg = pgridserial%sc2r(icg)
912 IF ( icg >= icgmin .AND. icg <= icgmax )
THEN
914 pgrid%nBCellsTot,icg,iloc)
916 iloc = element_not_found
921 IF ( iloc /= element_not_found )
THEN
922 icg2 = pgrid%sbc2pc(2,iloc)
924 IF ( icg2 <= pgrid%nCells )
THEN
925 IF ( ppatchserial%bf2v(4,ifl) == vert_none )
THEN
926 nbtrisact = nbtrisact + 1
928 v1g = ppatchserial%bv(ppatchserial%bf2v(1,ifl))
929 v2g = ppatchserial%bv(ppatchserial%bf2v(2,ifl))
930 v3g = ppatchserial%bv(ppatchserial%bf2v(3,ifl))
932 ppatch%bTri2v(1,nbtrisact) = v1g
933 ppatch%bTri2v(2,nbtrisact) = v2g
934 ppatch%bTri2v(3,nbtrisact) = v3g
938 pgrid%pbf2sbfCSR(offs+ifl2) = ifl
940 nbquadsact = nbquadsact + 1
942 v1g = ppatchserial%bv(ppatchserial%bf2v(1,ifl))
943 v2g = ppatchserial%bv(ppatchserial%bf2v(2,ifl))
944 v3g = ppatchserial%bv(ppatchserial%bf2v(3,ifl))
945 v4g = ppatchserial%bv(ppatchserial%bf2v(4,ifl))
947 ppatch%bQuad2v(1,nbquadsact) = v1g
948 ppatch%bQuad2v(2,nbquadsact) = v2g
949 ppatch%bQuad2v(3,nbquadsact) = v3g
950 ppatch%bQuad2v(4,nbquadsact) = v4g
952 ifl2 = ppatch%nBTrisTot + nbquadsact
954 pgrid%pbf2sbfCSR(offs + ifl2) = ifl
957 IF ( ppatchserial%bf2v(4,ifl) == vert_none )
THEN
958 nbtrisvir = nbtrisvir + 1
960 v1g = ppatchserial%bv(ppatchserial%bf2v(1,ifl))
961 v2g = ppatchserial%bv(ppatchserial%bf2v(2,ifl))
962 v3g = ppatchserial%bv(ppatchserial%bf2v(3,ifl))
964 ppatch%bTri2v(1,ppatch%nBTris+nbtrisvir) = v1g
965 ppatch%bTri2v(2,ppatch%nBTris+nbtrisvir) = v2g
966 ppatch%bTri2v(3,ppatch%nBTris+nbtrisvir) = v3g
968 ifl2 = ppatch%nBTris + nbtrisvir
970 pgrid%pbf2sbfCSR(offs+ifl2) = ifl
972 nbquadsvir = nbquadsvir + 1
974 v1g = ppatchserial%bv(ppatchserial%bf2v(1,ifl))
975 v2g = ppatchserial%bv(ppatchserial%bf2v(2,ifl))
976 v3g = ppatchserial%bv(ppatchserial%bf2v(3,ifl))
977 v4g = ppatchserial%bv(ppatchserial%bf2v(4,ifl))
979 ppatch%bQuad2v(1,ppatch%nBQuads+nbquadsvir) = v1g
980 ppatch%bQuad2v(2,ppatch%nBQuads+nbquadsvir) = v2g
981 ppatch%bQuad2v(3,ppatch%nBQuads+nbquadsvir) = v3g
982 ppatch%bQuad2v(4,ppatch%nBQuads+nbquadsvir) = v4g
984 ifl2 = ppatch%nBTrisTot + ppatch%nBQuads + nbquadsvir
986 pgrid%pbf2sbfCSR(offs+ifl2) = ifl
993 IF ( ireg == pregion%iRegionGlobal )
THEN
994 CALL
errorstop(global,err_cell_not_found,__line__)
1010 ALLOCATE(ppatchserial%bf2cSorted(ppatchserial%nBFacesTot), &
1012 global%error = errorflag
1013 IF ( global%error /= err_none )
THEN
1014 CALL
errorstop(global,err_allocate,__line__, &
1015 'pPatchSerial%bf2cSorted')
1018 ALLOCATE(ppatchserial%bf2cSortedKeys(ppatchserial%nBFacesTot), &
1020 global%error = errorflag
1021 IF ( global%error /= err_none )
THEN
1022 CALL
errorstop(global,err_allocate,__line__, &
1023 'pPatchSerial%bf2cSortedKeys')
1026 DO ifl = 1,ppatchserial%nBFacesTot
1027 ppatchserial%bf2cSorted(ifl) = ppatchserial%bf2c(ifl)
1028 ppatchserial%bf2cSortedKeys(ifl) = ifl
1032 ppatchserial%bf2cSortedKeys, &
1033 ppatchserial%nBFacesTot)
1040 DO icg = 1,pgrid%nCellsTot
1041 icg2 = pgrid%pc2sc(icg)
1045 IF ( ppatchserial%bf2cSorted(icg2) == icg2 )
THEN
1046 ifl = ppatchserial%bf2cSortedKeys(icg2)
1048 ict = pgrid%cellGlob2Loc(1,icg)
1049 icl = pgrid%cellGlob2Loc(2,icg)
1052 CASE ( cell_type_hex )
1053 IF ( icl <= pgrid%nHexs )
THEN
1054 nbquadsact = nbquadsact + 1
1056 v1g = ppatchserial%bv(ppatchserial%bf2v(1,ifl))
1057 v2g = ppatchserial%bv(ppatchserial%bf2v(2,ifl))
1058 v3g = ppatchserial%bv(ppatchserial%bf2v(3,ifl))
1059 v4g = ppatchserial%bv(ppatchserial%bf2v(4,ifl))
1061 ppatch%bQuad2v(1,nbquadsact) = v1g
1062 ppatch%bQuad2v(2,nbquadsact) = v2g
1063 ppatch%bQuad2v(3,nbquadsact) = v3g
1064 ppatch%bQuad2v(4,nbquadsact) = v4g
1066 ifl2 = ppatch%nBTrisTot + nbquadsact
1068 pgrid%pbf2sbfCSR(offs + ifl2) = ifl
1070 nbquadsvir = nbquadsvir + 1
1072 v1g = ppatchserial%bv(ppatchserial%bf2v(1,ifl))
1073 v2g = ppatchserial%bv(ppatchserial%bf2v(2,ifl))
1074 v3g = ppatchserial%bv(ppatchserial%bf2v(3,ifl))
1075 v4g = ppatchserial%bv(ppatchserial%bf2v(4,ifl))
1077 ppatch%bQuad2v(1,ppatch%nBQuads+nbquadsvir) = v1g
1078 ppatch%bQuad2v(2,ppatch%nBQuads+nbquadsvir) = v2g
1079 ppatch%bQuad2v(3,ppatch%nBQuads+nbquadsvir) = v3g
1080 ppatch%bQuad2v(4,ppatch%nBQuads+nbquadsvir) = v4g
1082 ifl2 = ppatch%nBTrisTot + ppatch%nBQuads + nbquadsvir
1084 pgrid%pbf2sbfCSR(offs+ifl2) = ifl
1086 CASE ( cell_type_pri )
1087 IF ( icl <= pgrid%nPris )
THEN
1088 nbtrisact = nbtrisact + 1
1090 v1g = ppatchserial%bv(ppatchserial%bf2v(1,ifl))
1091 v2g = ppatchserial%bv(ppatchserial%bf2v(2,ifl))
1092 v3g = ppatchserial%bv(ppatchserial%bf2v(3,ifl))
1094 ppatch%bTri2v(1,nbtrisact) = v1g
1095 ppatch%bTri2v(2,nbtrisact) = v2g
1096 ppatch%bTri2v(3,nbtrisact) = v3g
1100 pgrid%pbf2sbfCSR(offs+ifl2) = ifl
1102 nbtrisvir = nbtrisvir + 1
1104 v1g = ppatchserial%bv(ppatchserial%bf2v(1,ifl))
1105 v2g = ppatchserial%bv(ppatchserial%bf2v(2,ifl))
1106 v3g = ppatchserial%bv(ppatchserial%bf2v(3,ifl))
1108 ppatch%bTri2v(1,ppatch%nBTris+nbtrisvir) = v1g
1109 ppatch%bTri2v(2,ppatch%nBTris+nbtrisvir) = v2g
1110 ppatch%bTri2v(3,ppatch%nBTris+nbtrisvir) = v3g
1112 ifl2 = ppatch%nBTris + nbtrisvir
1114 pgrid%pbf2sbfCSR(offs+ifl2) = ifl
1117 CALL
errorstop(global,err_reached_default,__line__)
1123 CALL
errorstop(global,err_bf2csorted_invalid,__line__)
1127 DEALLOCATE(ppatchserial%bf2cSorted,stat=errorflag)
1128 global%error = errorflag
1129 IF ( global%error /= err_none )
THEN
1130 CALL
errorstop(global,err_deallocate,__line__, &
1131 'pPatchSerial%bf2cSorted')
1134 DEALLOCATE(ppatchserial%bf2cSortedKeys,stat=errorflag)
1135 global%error = errorflag
1136 IF ( global%error /= err_none )
THEN
1137 CALL
errorstop(global,err_deallocate,__line__, &
1138 'pPatchSerial%bf2cSortedKeys')
1147 IF ( global%verbLevel > verbose_none )
THEN
1148 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building patch lists done.'
1188 TYPE(t_region
),
POINTER :: pregion
1194 INTEGER :: errorflag,icg,ireg
1195 TYPE(t_grid),
POINTER :: pgrid
1202 global => pregion%global
1205 'RFLU_ModPartitionRegion.F90')
1207 IF ( global%verbLevel > verbose_none )
THEN
1208 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building region-to-cell map...'
1211 IF ( global%verbLevel > verbose_low )
THEN
1212 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1213 pregion%iRegionGlobal
1220 pgrid => pregion%grid
1226 DO icg = 1,pgrid%nCellsTot
1227 ireg = pgrid%sc2r(icg)
1229 pgrid%r2pcCSRInfo(ireg) = pgrid%r2pcCSRInfo(ireg) + 1
1232 pgrid%r2pcCSRInfo(0) = pgrid%r2pcCSRInfo(0) + 1
1234 DO ireg = 1,global%nRegionsLocal
1235 pgrid%r2pcCSRInfo(ireg) = pgrid%r2pcCSRInfo(ireg ) &
1236 + pgrid%r2pcCSRInfo(ireg-1)
1245 DO icg = pgrid%nCellsTot,1,-1
1246 ireg = pgrid%sc2r(icg)
1248 pgrid%r2pcCSRInfo(ireg) = pgrid%r2pcCSRInfo(ireg) - 1
1250 pgrid%r2pcCSR(pgrid%r2pcCSRInfo(ireg)) = icg
1257 IF ( global%verbLevel > verbose_none )
THEN
1258 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building region-to-cell map done.'
1300 TYPE(t_region
),
POINTER :: pregion,pregionserial
1306 INTEGER :: errorflag,ivg,ivg2
1308 TYPE(t_grid),
POINTER :: pgrid,pgridserial
1314 global => pregion%global
1317 'RFLU_ModPartitionRegion.F90')
1319 IF ( global%verbLevel > verbose_none )
THEN
1320 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building vertex data...'
1323 IF ( global%verbLevel > verbose_low )
THEN
1324 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1325 pregion%iRegionGlobal
1332 pgrid => pregion%grid
1333 pgridserial => pregionserial%grid
1339 ALLOCATE(pgrid%xyz(xcoord:zcoord,pgrid%nVertTot),stat=errorflag)
1340 global%error = errorflag
1341 IF ( global%error /= err_none )
THEN
1342 CALL
errorstop(global,err_allocate,__line__,
'pGrid%xyz')
1345 DO ivg = 1,pgrid%nVertTot
1346 ivg2 = pgrid%pv2sv(ivg)
1348 pgrid%xyz(xcoord,ivg) = pgridserial%xyz(xcoord,ivg2)
1349 pgrid%xyz(ycoord,ivg) = pgridserial%xyz(ycoord,ivg2)
1350 pgrid%xyz(zcoord,ivg) = pgridserial%xyz(zcoord,ivg2)
1357 IF ( global%verbLevel > verbose_none )
THEN
1358 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building vertex data done.'
1405 TYPE(t_region
),
POINTER :: pregion,pregionserial
1411 INTEGER :: errorflag,icl,iloc,ivg,ivgindx,ivgstat,ivl,
key,nvertact,nvertint, &
1413 INTEGER,
DIMENSION(:),
ALLOCATABLE :: indx,templist
1414 TYPE(t_grid),
POINTER :: pgrid,pgridserial
1421 global => pregion%global
1424 'RFLU_ModPartitionRegion.F90')
1426 IF ( global%verbLevel > verbose_none )
THEN
1427 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building vertex lists...'
1430 IF ( global%verbLevel > verbose_low )
THEN
1431 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1432 pregion%iRegionGlobal
1439 pgrid => pregion%grid
1440 pgridserial => pregionserial%grid
1453 pgrid%nVertMax = 1.5_rfreal*8*pgrid%nCellsTot
1457 ALLOCATE(indx(hashtablesize),stat=errorflag)
1458 global%error = errorflag
1459 IF ( global%error /= err_none )
THEN
1460 CALL
errorstop(global,err_allocate,__line__,
'indx')
1465 ALLOCATE(pgrid%vertKind(pgrid%nVertMax),stat=errorflag)
1466 global%error = errorflag
1467 IF ( global%error /= err_none )
THEN
1468 CALL
errorstop(global,err_allocate,__line__,
'pGrid%vertKind')
1471 DO ivg = 1,pgrid%nVertMax
1472 pgrid%vertKind(ivg) = vert_none
1485 DO icl = 1,pgrid%nTets
1489 pgrid%nVertTot,pgrid%pv2sv, &
1490 indx,ivgstat,ivgindx)
1494 DO icl = 1,pgrid%nHexs
1498 pgrid%nVertTot,pgrid%pv2sv, &
1499 indx,ivgstat,ivgindx)
1503 DO icl = 1,pgrid%nPris
1507 pgrid%nVertTot,pgrid%pv2sv, &
1508 indx,ivgstat,ivgindx)
1512 DO icl = 1,pgrid%nPyrs
1516 pgrid%nVertTot,pgrid%pv2sv, &
1517 indx,ivgstat,ivgindx)
1521 DO ivg = 1,pgrid%nVertTot
1522 pgrid%vertKind(ivg) = vert_kind_a
1529 DO icl = pgrid%nTets+1,pgrid%nTetsTot
1533 pgrid%nVertTot,pgrid%pv2sv, &
1534 indx,ivgstat,ivgindx)
1536 IF ( ivgstat == hashtable_entrystatus_new )
THEN
1537 pgrid%vertKind(pgrid%nVertTot) = vert_kind_v
1539 IF ( pgrid%vertKind(ivgindx) == vert_kind_a )
THEN
1540 pgrid%vertKind(ivgindx) = vert_kind_av
1546 DO icl = pgrid%nHexs+1,pgrid%nHexsTot
1550 pgrid%nVertTot,pgrid%pv2sv, &
1551 indx,ivgstat,ivgindx)
1553 IF ( ivgstat == hashtable_entrystatus_new )
THEN
1554 pgrid%vertKind(pgrid%nVertTot) = vert_kind_v
1556 IF ( pgrid%vertKind(ivgindx) == vert_kind_a )
THEN
1557 pgrid%vertKind(ivgindx) = vert_kind_av
1563 DO icl = pgrid%nPris+1,pgrid%nPrisTot
1567 pgrid%nVertTot,pgrid%pv2sv, &
1568 indx,ivgstat,ivgindx)
1570 IF ( ivgstat == hashtable_entrystatus_new )
THEN
1571 pgrid%vertKind(pgrid%nVertTot) = vert_kind_v
1573 IF ( pgrid%vertKind(ivgindx) == vert_kind_a )
THEN
1574 pgrid%vertKind(ivgindx) = vert_kind_av
1580 DO icl = pgrid%nPyrs+1,pgrid%nPyrsTot
1584 pgrid%nVertTot,pgrid%pv2sv, &
1585 indx,ivgstat,ivgindx)
1587 IF ( ivgstat == hashtable_entrystatus_new )
THEN
1588 pgrid%vertKind(pgrid%nVertTot) = vert_kind_v
1590 IF ( pgrid%vertKind(ivgindx) == vert_kind_a )
THEN
1591 pgrid%vertKind(ivgindx) = vert_kind_av
1603 DEALLOCATE(indx,stat=errorflag)
1604 global%error = errorflag
1605 IF ( global%error /= err_none )
THEN
1606 CALL
errorstop(global,err_deallocate,__line__,
'indx')
1618 DO ivg = 1,pgrid%nVertTot
1619 SELECT CASE ( pgrid%vertKind(ivg) )
1620 CASE ( vert_kind_a )
1621 pgrid%nVert = pgrid%nVert + 1
1622 CASE ( vert_kind_v )
1624 CASE ( vert_kind_av )
1625 pgrid%nVertInt = pgrid%nVertInt + 1
1627 CALL
errorstop(global,err_reached_default,__line__)
1636 ALLOCATE(templist(pgrid%nVertTot),stat=errorflag)
1637 global%error = errorflag
1638 IF ( global%error /= err_none )
THEN
1639 CALL
errorstop(global,err_allocate,__line__,
'tempList')
1646 DO ivg = 1,pgrid%nVertTot
1647 SELECT CASE ( pgrid%vertKind(ivg) )
1648 CASE ( vert_kind_a )
1649 nvertact = nvertact + 1
1651 templist(nvertact) = pgrid%pv2sv(ivg)
1652 CASE ( vert_kind_v )
1653 nvertvir = nvertvir + 1
1654 ivl = pgrid%nVert + pgrid%nVertInt + nvertvir
1655 templist(ivl) = pgrid%pv2sv(ivg)
1656 CASE ( vert_kind_av )
1657 nvertint = nvertint + 1
1658 ivl = pgrid%nVert + nvertint
1659 templist(ivl) = pgrid%pv2sv(ivg)
1661 CALL
errorstop(global,err_reached_default,__line__)
1670 DO ivg = 1,pgrid%nVertTot
1671 pgrid%pv2sv(ivg) = templist(ivg)
1674 DEALLOCATE(templist,stat=errorflag)
1675 global%error = errorflag
1676 IF ( global%error /= err_none )
THEN
1677 CALL
errorstop(global,err_deallocate,__line__,
'tempList')
1684 pgrid%nVert = pgrid%nVert + pgrid%nVertInt
1690 IF ( global%verbLevel > verbose_none )
THEN
1691 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building vertex lists done.'
1734 TYPE(t_region
),
POINTER :: pregion,pregionserial
1740 INTEGER :: errorflag,
i,
ibeg,icg,icg2,icl,icl2,ict,
iend,ireg
1741 TYPE(t_grid),
POINTER :: pgrid,pgridserial
1748 global => pregion%global
1751 'RFLU_ModPartitionRegion.F90')
1753 IF ( global%verbLevel > verbose_none )
THEN
1754 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating cell lists...'
1757 IF ( global%verbLevel > verbose_low )
THEN
1758 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1759 pregion%iRegionGlobal
1766 pgrid => pregion%grid
1767 pgridserial => pregionserial%grid
1773 ireg = pregion%iRegionGlobal
1774 ibeg = pgridserial%r2pcCSRInfo(ireg)
1776 IF ( ireg /= global%nRegionsLocal )
THEN
1777 iend = pgridserial%r2pcCSRInfo(ireg+1)-1
1779 iend = pgridserial%nCellsTot
1783 icg = pgridserial%r2pcCSR(
i)
1785 ict = pgridserial%cellGlob2Loc(1,icg)
1786 icl = pgridserial%cellGlob2Loc(2,icg)
1789 CASE ( cell_type_tet )
1790 IF ( icl <= pgridserial%nTets )
THEN
1791 pgrid%nTets = pgrid%nTets + 1
1792 pgrid%nTetsTot = pgrid%nTetsTot + 1
1794 pgrid%nTetsTot = pgrid%nTetsTot + 1
1796 CASE ( cell_type_hex )
1797 IF ( icl <= pgridserial%nHexs )
THEN
1798 pgrid%nHexs = pgrid%nHexs + 1
1799 pgrid%nHexsTot = pgrid%nHexsTot + 1
1801 pgrid%nHexsTot = pgrid%nHexsTot + 1
1803 CASE ( cell_type_pri )
1804 IF ( icl <= pgridserial%nPris )
THEN
1805 pgrid%nPris = pgrid%nPris + 1
1806 pgrid%nPrisTot = pgrid%nPrisTot + 1
1808 pgrid%nPrisTot = pgrid%nPrisTot + 1
1810 CASE ( cell_type_pyr )
1811 IF ( icl <= pgridserial%nPyrs )
THEN
1812 pgrid%nPyrs = pgrid%nPyrs + 1
1813 pgrid%nPyrsTot = pgrid%nPyrsTot + 1
1815 pgrid%nPyrsTot = pgrid%nPyrsTot + 1
1818 CALL
errorstop(global,err_reached_default,__line__)
1829 pgrid%nTetsMax = 4*pgrid%nTetsTot
1830 pgrid%nHexsMax = 4*pgrid%nHexsTot
1831 pgrid%nPrisMax = 4*pgrid%nPrisTot
1832 pgrid%nPyrsMax = 4*pgrid%nPyrsTot
1834 IF ( pgrid%nTetsMax < 100 )
THEN
1835 pgrid%nTetsMax = 10*pgridserial%nTetsTot/global%nRegions
1838 IF ( pgrid%nHexsMax < 100 )
THEN
1839 pgrid%nHexsMax = 10*pgridserial%nHexsTot/global%nRegions
1842 IF ( pgrid%nPrisMax < 100 )
THEN
1843 pgrid%nPrisMax = 10*pgridserial%nPrisTot/global%nRegions
1846 IF ( pgrid%nPyrsMax < 100 )
THEN
1847 pgrid%nPyrsMax = 10*pgridserial%nPyrsTot/global%nRegions
1854 pgrid%nCells = pgrid%nTets + pgrid%nHexs &
1855 + pgrid%nPris + pgrid%nPyrs
1856 pgrid%nCellsTot = pgrid%nTetsTot + pgrid%nHexsTot &
1857 + pgrid%nPrisTot + pgrid%nPyrsTot
1858 pgrid%nCellsMax = pgrid%nTetsMax + pgrid%nHexsMax &
1859 + pgrid%nPrisMax + pgrid%nPyrsMax
1861 IF ( global%verbLevel > verbose_none )
THEN
1862 WRITE(stdout,
'(A,3X,A)') solver_name,
'Cell statistics:'
1863 WRITE(stdout,
'(A,5X,A,3X,3(1X,I8))') solver_name,
'Cells: ', &
1867 WRITE(stdout,
'(A,7X,A,1X,3(1X,I8))') solver_name,
'Tetrahedra:', &
1871 WRITE(stdout,
'(A,7X,A,1X,3(1X,I8))') solver_name,
'Hexahedra: ', &
1875 WRITE(stdout,
'(A,7X,A,1X,3(1X,I8))') solver_name,
'Prisms: ', &
1879 WRITE(stdout,
'(A,7X,A,1X,3(1X,I8))') solver_name,
'Pyramids: ', &
1893 IF ( pgrid%nTetsMax > 0 )
THEN
1894 ALLOCATE(pgrid%tet2v(4,pgrid%nTetsMax),stat=errorflag)
1895 global%error = errorflag
1896 IF ( global%error /= err_none )
THEN
1897 CALL
errorstop(global,err_allocate,__line__,
'pGrid%tet2v')
1900 nullify(pgrid%tet2v)
1903 IF ( pgrid%nHexsMax > 0 )
THEN
1904 ALLOCATE(pgrid%hex2v(8,pgrid%nHexsMax),stat=errorflag)
1905 global%error = errorflag
1906 IF ( global%error /= err_none )
THEN
1907 CALL
errorstop(global,err_allocate,__line__,
'pGrid%hex2v')
1910 nullify(pgrid%hex2v)
1913 IF ( pgrid%nPrisMax > 0 )
THEN
1914 ALLOCATE(pgrid%pri2v(6,pgrid%nPrisMax),stat=errorflag)
1915 global%error = errorflag
1916 IF ( global%error /= err_none )
THEN
1917 CALL
errorstop(global,err_allocate,__line__,
'pGrid%pri2v')
1920 nullify(pgrid%pri2v)
1923 IF ( pgrid%nPyrsMax > 0 )
THEN
1924 ALLOCATE(pgrid%pyr2v(5,pgrid%nPyrsMax),stat=errorflag)
1925 global%error = errorflag
1926 IF ( global%error /= err_none )
THEN
1927 CALL
errorstop(global,err_allocate,__line__,
'pGrid%pyr2v')
1930 nullify(pgrid%pyr2v)
1937 IF ( global%verbLevel > verbose_none )
THEN
1938 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating cell lists done.'
1982 TYPE(t_region
),
POINTER :: pregion,pregionserial
1988 INTEGER :: errorflag,icg,icgmax,icgmin,icg2,ifl,iloc,ipatch,ireg
1989 TYPE(t_grid),
POINTER :: pgrid,pgridserial
1991 TYPE(t_patch),
POINTER :: ppatch,ppatchserial
1997 global => pregion%global
2000 'RFLU_ModPartitionRegion.F90')
2002 IF ( global%verbLevel > verbose_none )
THEN
2003 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating patch lists...'
2006 IF ( global%verbLevel > verbose_low )
THEN
2007 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
2008 pregion%iRegionGlobal
2015 pgrid => pregion%grid
2016 pgridserial => pregionserial%grid
2022 ALLOCATE(pgrid%patchCounter(2,face_type_tri:face_type_quad, &
2023 pgridserial%nPatches),stat=errorflag)
2024 global%error = errorflag
2025 IF ( global%error /= err_none )
THEN
2026 CALL
errorstop(global,err_allocate,__line__,
'pGrid%patchCounter')
2029 DO ipatch = 1,pgridserial%nPatches
2030 pgrid%patchCounter(1,face_type_tri ,ipatch) = 0
2031 pgrid%patchCounter(2,face_type_tri ,ipatch) = 0
2032 pgrid%patchCounter(1,face_type_quad,ipatch) = 0
2033 pgrid%patchCounter(2,face_type_quad,ipatch) = 0
2040 IF ( global%verbLevel > verbose_low )
THEN
2041 WRITE(stdout,
'(A,3X,A)') solver_name,
'Determining number of patches...'
2052 icgmin = minval(pgrid%sbc2pc(1:1,1:pgrid%nBCellsTot))
2053 icgmax = maxval(pgrid%sbc2pc(1:1,1:pgrid%nBCellsTot))
2055 DO ipatch = 1,pgridserial%nPatches
2056 ppatchserial => pregionserial%patches(ipatch)
2069 IF ( ppatchserial%bcType /= bc_virtual )
THEN
2070 DO ifl = 1,ppatchserial%nBFacesTot
2071 icg = ppatchserial%bf2c(ifl)
2072 ireg = pgridserial%sc2r(icg)
2074 IF ( icg >= icgmin .AND. icg <= icgmax )
THEN
2076 pgrid%nBCellsTot,icg,iloc)
2078 iloc = element_not_found
2081 IF ( iloc /= element_not_found )
THEN
2082 icg2 = pgrid%sbc2pc(2,iloc)
2084 IF ( icg2 <= pgrid%nCells )
THEN
2085 IF ( ppatchserial%bf2v(4,ifl) == vert_none )
THEN
2086 pgrid%patchCounter(1,face_type_tri,ipatch) = &
2087 pgrid%patchCounter(1,face_type_tri,ipatch) + 1
2089 pgrid%patchCounter(1,face_type_quad,ipatch) = &
2090 pgrid%patchCounter(1,face_type_quad,ipatch) + 1
2093 IF ( ppatchserial%bf2v(4,ifl) == vert_none )
THEN
2094 pgrid%patchCounter(2,face_type_tri,ipatch) = &
2095 pgrid%patchCounter(2,face_type_tri,ipatch) + 1
2097 pgrid%patchCounter(2,face_type_quad,ipatch) = &
2098 pgrid%patchCounter(2,face_type_quad,ipatch) + 1
2102 IF ( ireg == pregion%iRegionGlobal )
THEN
2103 CALL
errorstop(global,err_cell_not_found,__line__)
2114 pgrid%patchCounter(1,face_type_tri,ipatch) = pgrid%nPris
2115 pgrid%patchCounter(1,face_type_quad,ipatch) = pgrid%nHexs
2117 pgrid%patchCounter(2,face_type_tri,ipatch) = pgrid%nPrisTot &
2119 pgrid%patchCounter(2,face_type_quad,ipatch) = pgrid%nHexsTot &
2131 DO ipatch = 1,pgridserial%nPatches
2132 IF ( (pgrid%patchCounter(1,face_type_tri ,ipatch) > 0) .OR. &
2133 (pgrid%patchCounter(2,face_type_tri ,ipatch) > 0) .OR. &
2134 (pgrid%patchCounter(1,face_type_quad,ipatch) > 0) .OR. &
2135 (pgrid%patchCounter(2,face_type_quad,ipatch) > 0) )
THEN
2136 pgrid%nPatches = pgrid%nPatches + 1
2140 IF ( global%verbLevel > verbose_low )
THEN
2141 WRITE(stdout,
'(A,3X,A)') solver_name,
'Determining number of patches done.'
2148 ALLOCATE(pregion%patches(pgrid%nPatches),stat=errorflag)
2149 global%error = errorflag
2150 IF ( global%error /= err_none )
THEN
2151 CALL
errorstop(global,err_allocate,__line__,
'pRegion%patches')
2159 IF ( global%verbLevel > verbose_low )
THEN
2160 WRITE(stdout,
'(A,3X,A)') solver_name,
'Determining patch dimensions...'
2166 pgrid%nBFacesTot = 0
2168 DO ipatch = 1,pgridserial%nPatches
2169 ppatchserial => pregionserial%patches(ipatch)
2175 IF ( (pgrid%patchCounter(1,face_type_tri ,ipatch) > 0) .OR. &
2176 (pgrid%patchCounter(2,face_type_tri ,ipatch) > 0) .OR. &
2177 (pgrid%patchCounter(1,face_type_quad,ipatch) > 0) .OR. &
2178 (pgrid%patchCounter(2,face_type_quad,ipatch) > 0) )
THEN
2179 pgrid%nPatches = pgrid%nPatches + 1
2181 ppatch => pregion%patches(pgrid%nPatches)
2187 ppatch%iPatchGlobal = ipatch
2189 ppatch%nBTris = pgrid%patchCounter(1,face_type_tri,ipatch)
2190 ppatch%nBTrisTot = pgrid%patchCounter(1,face_type_tri,ipatch) &
2191 + pgrid%patchCounter(2,face_type_tri,ipatch)
2193 ppatch%nBQuads = pgrid%patchCounter(1,face_type_quad,ipatch)
2194 ppatch%nBQuadsTot = pgrid%patchCounter(1,face_type_quad,ipatch) &
2195 + pgrid%patchCounter(2,face_type_quad,ipatch)
2198 ppatch%nBVertTot = 0
2200 ppatch%nBFaces = ppatch%nBTris + ppatch%nBQuads
2201 ppatch%nBFacesTot = ppatch%nBTrisTot + ppatch%nBQuadsTot
2203 pgrid%nBFaces = pgrid%nBFaces + ppatch%nBFaces
2204 pgrid%nBFacesTot = pgrid%nBFacesTot + ppatch%nBFacesTot
2206 ppatch%nBCellsVirt = 0
2208 ppatch%bcCoupled = ppatchserial%bcCoupled
2209 ppatch%movePatchDir = ppatchserial%movePatchDir
2210 ppatch%flatFlag = ppatchserial%flatFlag
2216 IF ( ppatch%nBTrisTot > 0 )
THEN
2217 ALLOCATE(ppatch%bTri2v(3,ppatch%nBTrisTot),stat=errorflag)
2218 global%error = errorflag
2219 IF ( global%error /= err_none )
THEN
2220 CALL
errorstop(global,err_allocate,__line__,
'pPatch%bTri2v')
2223 nullify(ppatch%bTri2v)
2226 IF ( ppatch%nBQuadsTot > 0 )
THEN
2227 ALLOCATE(ppatch%bQuad2v(4,ppatch%nBQuadsTot),stat=errorflag)
2228 global%error = errorflag
2229 IF ( global%error /= err_none )
THEN
2230 CALL
errorstop(global,err_allocate,__line__,
'pPatch%bQuad2v')
2233 nullify(ppatch%bQuad2v)
2238 IF ( global%verbLevel > verbose_low )
THEN
2239 WRITE(stdout,
'(A,3X,A)') solver_name,
'Determining patch dimensions done.'
2246 DEALLOCATE(pgrid%patchCounter,stat=errorflag)
2247 global%error = errorflag
2248 IF ( global%error /= err_none )
THEN
2249 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%patchCounter')
2256 IF ( global%verbLevel > verbose_none )
THEN
2257 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating patch lists done.'
2300 TYPE(t_region
),
POINTER :: pregion
2306 INTEGER :: errorflag,ireg
2308 TYPE(t_grid),
POINTER :: pgrid
2314 global => pregion%global
2317 'RFLU_ModPartitionRegion.F90')
2319 IF ( global%verbLevel > verbose_none )
THEN
2320 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating region-to-cell mapping...'
2323 IF ( global%verbLevel > verbose_low )
THEN
2324 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
2325 pregion%iRegionGlobal
2332 pgrid => pregion%grid
2338 ALLOCATE(pgrid%r2pcCSR(pgrid%nCellsTot),stat=errorflag)
2339 global%error = errorflag
2340 IF ( global%error /= err_none )
THEN
2341 CALL
errorstop(global,err_allocate,__line__,
'pGrid%r2pcCSR')
2344 ALLOCATE(pgrid%r2pcCSRInfo(0:global%nRegionsLocal),stat=errorflag)
2345 global%error = errorflag
2346 IF ( global%error /= err_none )
THEN
2347 CALL
errorstop(global,err_allocate,__line__,
'pGrid%r2pcCSRInfo')
2350 DO ireg = 0,global%nRegionsLocal
2351 pgrid%r2pcCSRInfo(ireg) = 0
2358 IF ( global%verbLevel > verbose_none )
THEN
2359 WRITE(stdout,
'(A,1X,A)') solver_name, &
2360 'Creating region-to-cell mapping done.'
2401 TYPE(t_region
),
POINTER :: pregion
2407 INTEGER :: errorflag
2408 TYPE(t_grid),
POINTER :: pgrid
2415 global => pregion%global
2418 'RFLU_ModPartitionRegion.F90')
2420 IF ( global%verbLevel > verbose_none )
THEN
2421 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying border face lists...'
2424 IF ( global%verbLevel > verbose_low )
THEN
2425 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
2426 pregion%iRegionGlobal
2433 pgrid => pregion%grid
2439 DEALLOCATE(pgrid%avfCSRInfo,stat=errorflag)
2440 global%error = errorflag
2441 IF ( global%error /= err_none )
THEN
2442 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%avfCSRInfo')
2445 DEALLOCATE(pgrid%avfCSR,stat=errorflag)
2446 global%error = errorflag
2447 IF ( global%error /= err_none )
THEN
2448 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%avfCSR')
2455 IF ( global%verbLevel > verbose_none )
THEN
2456 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying border face lists done.'
2496 TYPE(t_region
),
POINTER :: pregion
2502 INTEGER :: errorflag
2504 TYPE(t_grid),
POINTER :: pgrid
2510 global => pregion%global
2513 'RFLU_ModPartitionRegion.F90')
2515 IF ( global%verbLevel > verbose_none )
THEN
2516 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying cell data...'
2519 IF ( global%verbLevel > verbose_low )
THEN
2520 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
2521 pregion%iRegionGlobal
2528 pgrid => pregion%grid
2538 DEALLOCATE(pregion%mixt%cv,stat=errorflag)
2539 global%error = errorflag
2540 IF ( global%error /= err_none )
THEN
2541 CALL
errorstop(global,err_deallocate,__line__,
'pRegion%mixt%cv')
2548 IF ( global%verbLevel > verbose_none )
THEN
2549 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying cell data done.'
2590 TYPE(t_region
),
POINTER :: pregion
2596 INTEGER :: errorflag
2597 TYPE(t_grid),
POINTER :: pgrid
2604 global => pregion%global
2607 'RFLU_ModPartitionRegion.F90')
2609 IF ( global%verbLevel > verbose_none )
THEN
2610 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying cell lists...'
2613 IF ( global%verbLevel > verbose_low )
THEN
2614 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
2615 pregion%iRegionGlobal
2622 pgrid => pregion%grid
2628 IF ( pgrid%nTetsMax > 0 )
THEN
2629 DEALLOCATE(pgrid%tet2v,stat=errorflag)
2630 global%error = errorflag
2631 IF ( global%error /= err_none )
THEN
2632 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%tet2v')
2636 IF ( pgrid%nHexsMax > 0 )
THEN
2637 DEALLOCATE(pgrid%hex2v,stat=errorflag)
2638 global%error = errorflag
2639 IF ( global%error /= err_none )
THEN
2640 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%hex2v')
2644 IF ( pgrid%nPrisMax > 0 )
THEN
2645 DEALLOCATE(pgrid%pri2v,stat=errorflag)
2646 global%error = errorflag
2647 IF ( global%error /= err_none )
THEN
2648 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%pri2v')
2652 IF ( pgrid%nPyrsMax > 0 )
THEN
2653 DEALLOCATE(pgrid%pyr2v,stat=errorflag)
2654 global%error = errorflag
2655 IF ( global%error /= err_none )
THEN
2656 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%pyr2v')
2664 IF ( global%verbLevel > verbose_none )
THEN
2665 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying cell lists done.'
2708 TYPE(t_region
),
POINTER :: pregion
2714 INTEGER :: errorflag,ipatch
2715 TYPE(t_grid),
POINTER :: pgrid
2717 TYPE(t_patch),
POINTER :: ppatch
2723 global => pregion%global
2726 'RFLU_ModPartitionRegion.F90')
2728 IF ( global%verbLevel > verbose_none )
THEN
2729 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying patch lists...'
2732 IF ( global%verbLevel > verbose_low )
THEN
2733 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
2734 pregion%iRegionGlobal
2741 pgrid => pregion%grid
2747 DO ipatch = 1,pgrid%nPatches
2748 ppatch => pregion%patches(ipatch)
2750 IF ( ppatch%nBTrisTot > 0 )
THEN
2751 DEALLOCATE(ppatch%bTri2v,stat=errorflag)
2752 global%error = errorflag
2753 IF ( global%error /= err_none )
THEN
2754 CALL
errorstop(global,err_deallocate,__line__,
'pPatch%bTri2v')
2758 IF ( ppatch%nBQuadsTot > 0 )
THEN
2759 DEALLOCATE(ppatch%bQuad2v,stat=errorflag)
2760 global%error = errorflag
2761 IF ( global%error /= err_none )
THEN
2762 CALL
errorstop(global,err_deallocate,__line__,
'pPatch%bQuad2v')
2771 DEALLOCATE(pregion%patches,stat=errorflag)
2772 global%error = errorflag
2773 IF ( global%error /= err_none )
THEN
2774 CALL
errorstop(global,err_deallocate,__line__,
'pRegion%patches')
2781 IF ( global%verbLevel > verbose_none )
THEN
2782 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying patch lists done.'
2823 TYPE(t_region
),
POINTER :: pregion
2829 INTEGER :: errorflag
2831 TYPE(t_grid),
POINTER :: pgrid
2837 global => pregion%global
2840 'RFLU_ModPartitionRegion.F90')
2842 IF ( global%verbLevel > verbose_none )
THEN
2843 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying vertex data...'
2846 IF ( global%verbLevel > verbose_low )
THEN
2847 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
2848 pregion%iRegionGlobal
2855 pgrid => pregion%grid
2861 DEALLOCATE(pgrid%xyz,stat=errorflag)
2862 global%error = errorflag
2863 IF ( global%error /= err_none )
THEN
2864 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%xyz')
2871 IF ( global%verbLevel > verbose_none )
THEN
2872 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying vertex data done.'
2917 TYPE(t_region
),
POINTER :: pregion
2923 INTEGER :: c1,c2,errorflag,icg,icgbeg,icgend,ifg,ifl,ipatch,ireg, &
2924 ncellsperreg,ncellsv2,
nfaces,wgtflag
2925 INTEGER,
DIMENSION(5) :: options
2926 INTEGER,
DIMENSION(:),
ALLOCATABLE :: f2ccsr,f2ccsrinfo,vwgt,adjwgt
2927 TYPE(t_grid),
POINTER :: pgrid
2929 TYPE(t_patch),
POINTER :: ppatch
2935 global => pregion%global
2938 'RFLU_ModPartitionRegion.F90')
2940 IF ( global%verbLevel > verbose_none )
THEN
2941 WRITE(stdout,
'(A,1X,A)') solver_name,
'Partitioning region...'
2944 IF ( global%verbLevel > verbose_low )
THEN
2945 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
2946 pregion%iRegionGlobal
2953 pgrid => pregion%grid
2959 IF ( global%verbLevel > verbose_low )
THEN
2960 WRITE(stdout,
'(A,3X,A)') solver_name, &
2961 'Converting face list to CSR format...'
2970 nfaces = pgrid%nFaces + pgrid%nFacesVV
2972 ALLOCATE(f2ccsr(2*
nfaces),stat=errorflag)
2973 global%error = errorflag
2974 IF ( global%error /= err_none )
THEN
2975 CALL
errorstop(global,err_allocate,__line__,
'f2cCSR')
2978 ALLOCATE(f2ccsrinfo(pgrid%nCellsTot+1),stat=errorflag)
2979 global%error = errorflag
2980 IF ( global%error /= err_none )
THEN
2981 CALL
errorstop(global,err_allocate,__line__,
'f2cCSRInfo')
2984 DO icg = 1,pgrid%nCellsTot+1
2997 DO ifg = 1,pgrid%nFaces + pgrid%nFacesVV
2998 c1 = pgrid%f2c(1,ifg)
2999 c2 = pgrid%f2c(2,ifg)
3001 f2ccsrinfo(c1) = f2ccsrinfo(c1) + 1
3002 f2ccsrinfo(c2) = f2ccsrinfo(c2) + 1
3005 f2ccsrinfo(1) = f2ccsrinfo(1) + 1
3007 DO icg = 2,pgrid%nCellsTot
3008 f2ccsrinfo(icg) = f2ccsrinfo(icg) + f2ccsrinfo(icg-1)
3015 DO ifg = 1,pgrid%nFaces + pgrid%nFacesVV
3016 c1 = pgrid%f2c(1,ifg)
3017 c2 = pgrid%f2c(2,ifg)
3019 f2ccsrinfo(c1) = f2ccsrinfo(c1) - 1
3020 f2ccsrinfo(c2) = f2ccsrinfo(c2) - 1
3022 f2ccsr(f2ccsrinfo(c1)) = c2
3023 f2ccsr(f2ccsrinfo(c2)) = c1
3026 f2ccsrinfo(pgrid%nCellsTot+1) = 2*
nfaces + 1
3028 IF ( global%verbLevel > verbose_low )
THEN
3029 WRITE(stdout,
'(A,3X,A)') solver_name, &
3030 'Converting face list to CSR format done.'
3037 IF ( global%verbLevel > verbose_low )
THEN
3038 WRITE(stdout,
'(A,3X,A)') solver_name,
'Calling partitioner...'
3046 IF ( global%prepPartMode == partition_mode_proper )
THEN
3047 ALLOCATE(vwgt(1),stat=errorflag)
3048 global%error = errorflag
3049 IF ( global%error /= err_none )
THEN
3050 CALL
errorstop(global,err_allocate,__line__,
'vwgt')
3053 ALLOCATE(adjwgt(1),stat=errorflag)
3054 global%error = errorflag
3055 IF ( global%error /= err_none )
THEN
3056 CALL
errorstop(global,err_allocate,__line__,
'adjwgt')
3062 IF ( global%nRegionsLocal < 8 )
THEN
3063 CALL metis_partgraphrecursive(pgrid%nCellsTot,f2ccsrinfo,f2ccsr,vwgt, &
3064 adjwgt,wgtflag,1,global%nRegionsLocal, &
3065 options,pgrid%nFacesCut,pgrid%sc2r)
3067 CALL metis_partgraphkway(pgrid%nCellsTot,f2ccsrinfo,f2ccsr,vwgt, &
3068 adjwgt,wgtflag,1,global%nRegionsLocal, &
3069 options,pgrid%nFacesCut,pgrid%sc2r)
3072 DEALLOCATE(vwgt,stat=errorflag)
3073 global%error = errorflag
3074 IF ( global%error /= err_none )
THEN
3075 CALL
errorstop(global,err_deallocate,__line__,
'vwgt')
3078 DEALLOCATE(adjwgt,stat=errorflag)
3079 global%error = errorflag
3080 IF ( global%error /= err_none )
THEN
3081 CALL
errorstop(global,err_deallocate,__line__,
'adjwgt')
3092 ELSE IF ( global%prepPartMode == partition_mode_imposed )
THEN
3098 ncellsperreg = pgrid%nCells/global%nRegionsLocal
3100 DO ireg = 1,global%nRegionsLocal
3101 icgbeg = ncellsperreg*(ireg - 1) + 1
3102 icgend = ncellsperreg* ireg
3104 IF ( global%verbLevel > verbose_low )
THEN
3105 WRITE(stdout,
'(A,5X,I4,2(1X,I9))') solver_name,ireg,icgbeg,icgend
3108 DO icg = icgbeg,icgend
3109 pgrid%sc2r(icg) = ireg
3122 IF ( pgrid%nCells /= pgrid%nCellsTot )
THEN
3124 IF ( mod(pgrid%nCellsTot-pgrid%nCells,2) == 0 )
THEN
3125 ncellsv2 = (pgrid%nCellsTot-pgrid%nCells)/2
3127 DO icg = pgrid%nCells+1,pgrid%nCells+ncellsv2
3131 DO icg = pgrid%nCells+ncellsv2+1,pgrid%nCellsTot
3132 pgrid%sc2r(icg) = global%nRegionsLocal
3135 CALL
errorstop(global,err_virtualcells_notdb2,__line__)
3138 CALL
errorstop(global,err_reached_default,__line__)
3144 DO ifg = 1,pgrid%nFaces
3145 c1 = pgrid%f2c(1,ifg)
3146 c2 = pgrid%f2c(2,ifg)
3148 IF ( pgrid%sc2r(c1) /= pgrid%sc2r(c2) )
THEN
3149 pgrid%nFacesCut = pgrid%nFacesCut + 1
3158 CALL
errorstop(global,err_reached_default,__line__)
3161 IF ( global%verbLevel > verbose_low )
THEN
3162 WRITE(stdout,
'(A,3X,A,1X,I6)') solver_name,
'Number of cut faces:', &
3164 WRITE(stdout,
'(A,3X,A)') solver_name,
'Calling partitioner done.'
3171 DEALLOCATE(f2ccsrinfo,stat=errorflag)
3172 global%error = errorflag
3173 IF ( global%error /= err_none )
THEN
3174 CALL
errorstop(global,err_deallocate,__line__,
'f2cCSRInfo')
3177 DEALLOCATE(f2ccsr,stat=errorflag)
3178 global%error = errorflag
3179 IF ( global%error /= err_none )
THEN
3180 CALL
errorstop(global,err_deallocate,__line__,
'f2cCSR')
3187 IF ( global%verbLevel > verbose_none )
THEN
3188 WRITE(stdout,
'(A,1X,A)') solver_name,
'Partitioning region done.'
3236 INTEGER,
INTENT(IN) :: nvertpercell
3237 INTEGER,
INTENT(INOUT) :: ncellsmax
3238 INTEGER,
DIMENSION(:),
POINTER :: x2cg
3239 INTEGER,
DIMENSION(:,:),
POINTER :: x2v
3246 INTEGER :: errorflag,icl,ivl,ncellsmaxold
3247 INTEGER,
DIMENSION(:),
ALLOCATABLE:: x2cgtemp
3248 INTEGER,
DIMENSION(:,:),
ALLOCATABLE :: x2vtemp
3255 'RFLU_ModPartitionRegion.F90')
3261 ncellsmaxold = ncellsmax
3262 ncellsmax = 2*ncellsmax
3272 ALLOCATE(x2vtemp(nvertpercell,ncellsmaxold),stat=errorflag)
3273 global%error = errorflag
3274 IF ( global%error /= err_none )
THEN
3275 CALL
errorstop(global,err_allocate,__line__,
'x2vTemp')
3278 DO icl = 1,ncellsmaxold
3279 DO ivl = 1,nvertpercell
3280 x2vtemp(ivl,icl) = x2v(ivl,icl)
3284 DEALLOCATE(x2v,stat=errorflag)
3285 global%error = errorflag
3286 IF ( global%error /= err_none )
THEN
3287 CALL
errorstop(global,err_deallocate,__line__,
'x2v')
3290 ALLOCATE(x2v(nvertpercell,ncellsmax),stat=errorflag)
3291 global%error = errorflag
3292 IF ( global%error /= err_none )
THEN
3293 CALL
errorstop(global,err_allocate,__line__,
'x2v')
3296 DO icl = 1,ncellsmaxold
3297 DO ivl = 1,nvertpercell
3298 x2v(ivl,icl) = x2vtemp(ivl,icl)
3302 DEALLOCATE(x2vtemp,stat=errorflag)
3303 global%error = errorflag
3304 IF ( global%error /= err_none )
THEN
3305 CALL
errorstop(global,err_deallocate,__line__,
'x2vTemp')
3312 ALLOCATE(x2cgtemp(ncellsmaxold),stat=errorflag)
3313 global%error = errorflag
3314 IF ( global%error /= err_none )
THEN
3315 CALL
errorstop(global,err_allocate,__line__,
'x2cgTemp')
3318 DO icl = 1,ncellsmaxold
3319 x2cgtemp(icl) = x2cg(icl)
3322 DEALLOCATE(x2cg,stat=errorflag)
3323 global%error = errorflag
3324 IF ( global%error /= err_none )
THEN
3325 CALL
errorstop(global,err_deallocate,__line__,
'x2cg')
3328 ALLOCATE(x2cg(ncellsmax),stat=errorflag)
3329 global%error = errorflag
3330 IF ( global%error /= err_none )
THEN
3331 CALL
errorstop(global,err_allocate,__line__,
'x2cg')
3334 DO icl = 1,ncellsmaxold
3335 x2cg(icl) = x2cgtemp(icl)
3338 DEALLOCATE(x2cgtemp,stat=errorflag)
3339 global%error = errorflag
3340 IF ( global%error /= err_none )
THEN
3341 CALL
errorstop(global,err_deallocate,__line__,
'x2cgTemp')
3348 IF ( global%verbLevel > verbose_none )
THEN
3349 WRITE(stdout,
'(A,1X,A)') solver_name,
'Renumbering vertex lists done.'
3393 TYPE(t_region
),
POINTER :: pregion
3399 INTEGER :: errorflag,icl,ipatch
3400 TYPE(t_grid),
POINTER :: pgrid
3401 TYPE(t_patch),
POINTER :: ppatch
3408 global => pregion%global
3411 'RFLU_ModPartitionRegion.F90')
3413 IF ( global%verbLevel > verbose_none )
THEN
3414 WRITE(stdout,
'(A,1X,A)') solver_name,
'Renumbering vertex lists...'
3417 IF ( global%verbLevel > verbose_low )
THEN
3418 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
3419 pregion%iRegionGlobal
3426 pgrid => pregion%grid
3436 IF ( pgrid%nTetsTot > 0 )
THEN
3438 pgrid%tet2v(1:4,1:pgrid%nTetsTot), &
3440 pgrid%sv2pv(1:1,1:pgrid%nVertTot), &
3441 pgrid%sv2pv(2:2,1:pgrid%nVertTot))
3448 IF ( pgrid%nHexsTot > 0 )
THEN
3450 pgrid%hex2v(1:8,1:pgrid%nHexsTot), &
3452 pgrid%sv2pv(1:1,1:pgrid%nVertTot), &
3453 pgrid%sv2pv(2:2,1:pgrid%nVertTot))
3460 IF ( pgrid%nPrisTot > 0 )
THEN
3462 pgrid%pri2v(1:6,1:pgrid%nPrisTot), &
3464 pgrid%sv2pv(1:1,1:pgrid%nVertTot), &
3465 pgrid%sv2pv(2:2,1:pgrid%nVertTot))
3472 IF ( pgrid%nPyrsTot > 0 )
THEN
3474 pgrid%pyr2v(1:5,1:pgrid%nPyrsTot), &
3476 pgrid%sv2pv(1:1,1:pgrid%nVertTot), &
3477 pgrid%sv2pv(2:2,1:pgrid%nVertTot))
3484 DO ipatch = 1,pgrid%nPatches
3485 ppatch => pregion%patches(ipatch)
3487 IF ( ppatch%nBTrisTot > 0 )
THEN
3489 ppatch%bTri2v(1:3,1:ppatch%nBTrisTot), &
3491 pgrid%sv2pv(1:1,1:pgrid%nVertTot), &
3492 pgrid%sv2pv(2:2,1:pgrid%nVertTot))
3495 IF ( ppatch%nBQuadsTot > 0 )
THEN
3497 ppatch%bQuad2v(1:4,1:ppatch%nBQuadsTot), &
3499 pgrid%sv2pv(1:1,1:pgrid%nVertTot), &
3500 pgrid%sv2pv(2:2,1:pgrid%nVertTot))
3508 IF ( global%verbLevel > verbose_none )
THEN
3509 WRITE(stdout,
'(A,1X,A)') solver_name,
'Renumbering vertex lists done.'
**********************************************************************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, public rflu_part_destroyborderfacelist(pRegion)
subroutine, public rflu_createhashtable(global, size)
subroutine, public rflu_part_buildvertexlists(pRegion, pRegionSerial)
subroutine, public rflu_part_addvirtualcellsinv2(pRegion, pRegionSerial, vc, nCellsVirtMax, nCellsVirt)
subroutine, public rflu_destroyhashtable(global)
subroutine, public rflu_part_buildcelllists(pRegion, pRegionSerial)
subroutine, public rflu_part_destroypatchlists(pRegion)
subroutine registerfunction(global, funName, fileName)
subroutine, public rflu_hashbuildkey(a, aSize, key)
subroutine, public rflu_part_buildpatchlists(pRegion, pRegionSerial)
subroutine binarysearchinteger(a, n, v, i, j)
subroutine, public rflu_part_renumbervertexlists(pRegion)
subroutine, public rflu_hashvertexfancy(global, key, ivg, nVert, vert, indx, ivgStat, ivgIndx)
subroutine, public rflu_part_addvirtualcells(pRegion, pRegionSerial)
subroutine, public rflu_part_destroycelldata(pRegion)
subroutine, public rflu_part_destroycelllists(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 knode iend
subroutine, public rflu_part_destroyvertexdata(pRegion)
subroutine, public rflu_part_partitionregion(pRegion)
subroutine, public rflu_part_addvirtualcellsinv1(pRegion, pRegionSerial, vc, nCellsVirtMax, nCellsVirt)
subroutine quicksortintegerinteger(a, b, n)
subroutine, public rflu_renumberlist2(global, listDim1, listDim2, list, keyDim, key1, key2)
subroutine, public rflu_part_createreg2cellmap(pRegion)
subroutine, public rflu_rnmb_createpv2svmap(pRegion)
subroutine, public rflu_part_buildborderfacelist(pRegion)
subroutine, public rflu_part_buildvertexdata(pRegion, pRegionSerial)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine, public rflu_part_buildreg2cellmap(pRegion)
subroutine rflu_part_recreatecelllist(global, nVertPerCell, nCellsMax, x2v, x2cg)
subroutine, public rflu_part_createpatchlists(pRegion, pRegionSerial)
subroutine deregisterfunction(global)
subroutine, public rflu_part_createcelllists(pRegion, pRegionSerial)
LOGICAL function, public rflu_sype_havesypepatches(pRegion)