79 CHARACTER(CHRLEN) :: &
80 RCSIdentString =
'$RCSfile: RFLU_ModRenumberings.F90,v $ $Revision: 1.16 $'
123 TYPE(t_region
),
POINTER :: pregion,pregionserial
135 global => pregion%global
138 'RFLU_ModRenumberings.F90')
144 SELECT CASE ( pregionserial%mixtInput%dimens )
150 CALL
errorstop(global,err_reached_default,__line__)
197 TYPE(t_region
),
POINTER :: pregion
203 INTEGER :: errorflag,icg,icg2
204 TYPE(t_grid),
POINTER :: pgrid
211 global => pregion%global
214 'RFLU_ModRenumberings.F90')
216 IF ( global%verbLevel > verbose_none )
THEN
217 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building sbc2pc mapping...'
220 IF ( global%verbLevel > verbose_low )
THEN
221 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
222 pregion%iRegionGlobal
229 pgrid => pregion%grid
235 pgrid%nBCellsTot = pgrid%nCellsTot
237 ALLOCATE(pgrid%sbc2pc(2,pgrid%nBCellsTot),stat=errorflag)
238 global%error = errorflag
239 IF ( global%error /= err_none )
THEN
240 CALL
errorstop(global,err_allocate,__line__,
'pGrid%sbc2pc')
247 DO icg = 1,pgrid%nCellsTot
248 icg2 = pgrid%pc2sc(icg)
250 pgrid%sbc2pc(1,icg) = icg2
251 pgrid%sbc2pc(2,icg) = icg
259 pgrid%sbc2pc(2:2,1:pgrid%nBCellsTot), &
266 IF ( global%verbLevel > verbose_none )
THEN
267 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building sbc2pc mapping done.'
312 TYPE(t_region
),
POINTER :: pregion,pregionserial
318 INTEGER :: errorflag,ibcmmax,ibcmmaxloc,ibcmmin,ibcmminloc,icg,icg2,icl, &
319 iloc,ilocmax,ilocmin,ipc2scmax,ipc2scmaxloc,ipc2scmin, &
321 INTEGER,
DIMENSION(:,:),
ALLOCATABLE :: pc2scsorted,sbc2pc
322 TYPE(t_grid),
POINTER :: pgrid,pgridserial
329 global => pregion%global
332 'RFLU_ModRenumberings.F90')
334 IF ( global%verbLevel > verbose_none )
THEN
335 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building sbc2pc mapping...'
338 IF ( global%verbLevel > verbose_low )
THEN
339 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
340 pregion%iRegionGlobal
347 pgrid => pregion%grid
348 pgridserial => pregionserial%grid
358 ALLOCATE(sbc2pc(2,pgrid%nCellsTot),stat=errorflag)
359 global%error = errorflag
360 IF ( global%error /= err_none )
THEN
361 CALL
errorstop(global,err_allocate,__line__,
'sbc2pc')
377 ipc2scmin = minval(pgrid%pc2sc(1:pgrid%nCellsTot))
378 ipc2scmax = maxval(pgrid%pc2sc(1:pgrid%nCellsTot))
380 ibcmmin = pgridserial%bcm(1)
381 ibcmmax = pgridserial%bcm(pgridserial%nBCells)
392 IF ( ibcmmax - ibcmmin >= ipc2scmax - ipc2scmin )
THEN
394 pgridserial%nBCells,ipc2scmin,iloc,ilocmin)
396 IF ( iloc /= element_not_found )
THEN
399 ipc2scminloc = ilocmin
403 pgridserial%nBCells,ipc2scmax,iloc,ilocmax)
405 IF ( iloc /= element_not_found )
THEN
408 ipc2scmaxloc =
min(ilocmax,pgridserial%nBCells)
411 DO icg = 1,pgrid%nCellsTot
412 icg2 = pgrid%pc2sc(icg)
415 ipc2scmaxloc-ipc2scminloc+1,icg2,iloc)
417 IF ( iloc /= element_not_found )
THEN
418 pgrid%nBCellsTot = pgrid%nBCellsTot + 1
420 sbc2pc(1,pgrid%nBCellsTot) = icg2
421 sbc2pc(2,pgrid%nBCellsTot) = icg
432 ALLOCATE(pc2scsorted(2,pgrid%nCellsTot),stat=errorflag)
433 global%error = errorflag
434 IF ( global%error /= err_none )
THEN
435 CALL
errorstop(global,err_allocate,__line__,
'pc2scSorted')
438 DO icg = 1,pgrid%nCellsTot
439 pc2scsorted(1,icg) = pgrid%pc2sc(icg)
440 pc2scsorted(2,icg) = icg
444 pc2scsorted(2,1:pgrid%nCellsTot), &
448 pgrid%nCellsTot,ibcmmin,iloc,ilocmin)
450 IF ( iloc /= element_not_found )
THEN
457 pgrid%nCellsTot,ibcmmax,iloc,ilocmax)
459 IF ( iloc /= element_not_found )
THEN
462 ibcmmaxloc =
min(ilocmax,pgrid%nCellsTot)
465 DO icl = ibcmminloc,ibcmmaxloc
466 icg2 = pc2scsorted(1,icl)
467 icg = pc2scsorted(2,icl)
470 pgridserial%nBCells,icg2,iloc)
472 IF ( iloc /= element_not_found )
THEN
473 pgrid%nBCellsTot = pgrid%nBCellsTot + 1
475 sbc2pc(1,pgrid%nBCellsTot) = icg2
476 sbc2pc(2,pgrid%nBCellsTot) = icg
480 DEALLOCATE(pc2scsorted,stat=errorflag)
481 global%error = errorflag
482 IF ( global%error /= err_none )
THEN
483 CALL
errorstop(global,err_deallocate,__line__,
'pc2scSorted')
487 IF ( global%verbLevel > verbose_none )
THEN
488 WRITE(stdout,
'(A,3X,A,1X,I6)') solver_name,
'Number of boundary cells:', &
496 ALLOCATE(pgrid%sbc2pc(2,pgrid%nBCellsTot),stat=errorflag)
497 global%error = errorflag
498 IF ( global%error /= err_none )
THEN
499 CALL
errorstop(global,err_allocate,__line__,
'sbc2pc')
502 DO icg = 1,pgrid%nBCellsTot
503 pgrid%sbc2pc(1,icg) = sbc2pc(1,icg)
504 pgrid%sbc2pc(2,icg) = sbc2pc(2,icg)
507 DEALLOCATE(sbc2pc,stat=errorflag)
508 global%error = errorflag
509 IF ( global%error /= err_none )
THEN
510 CALL
errorstop(global,err_deallocate,__line__,
'sbc2pc')
513 IF ( pgrid%nBCellsTot > 0 )
THEN
515 pgrid%sbc2pc(2:2,1:pgrid%nBCellsTot), &
523 IF ( global%verbLevel > verbose_none )
THEN
524 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building sbc2pc mapping done.'
569 LOGICAL,
OPTIONAL,
INTENT(IN) :: sortflag
570 TYPE(t_region
),
POINTER :: pregion
576 INTEGER :: errorflag,icg
577 TYPE(t_grid),
POINTER :: pgrid
584 global => pregion%global
587 'RFLU_ModRenumberings.F90')
589 IF ( global%verbLevel > verbose_none )
THEN
590 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building sc2pc mapping...'
593 IF ( global%verbLevel > verbose_low )
THEN
594 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
595 pregion%iRegionGlobal
602 pgrid => pregion%grid
608 ALLOCATE(pgrid%sc2pc(2,pgrid%nCellsTot),stat=errorflag)
609 global%error = errorflag
610 IF ( global%error /= err_none )
THEN
611 CALL
errorstop(global,err_allocate,__line__,
'pGrid%sc2pc')
614 DO icg = 1,pgrid%nCellsTot
615 pgrid%sc2pc(1,icg) = pgrid%pc2sc(icg)
616 pgrid%sc2pc(2,icg) = icg
625 IF ( present(sortflag) )
THEN
626 IF ( sortflag .EQV. .true. )
THEN
628 pgrid%sc2pc(2:2,1:pgrid%nCellsTot), &
632 pgrid%sc2pc(2:2,1:pgrid%nCells), &
637 pgrid%sc2pc(2:2,1:pgrid%nCellsTot), &
645 IF ( global%verbLevel > verbose_none )
THEN
646 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building sc2pc mapping done.'
687 TYPE(t_region
),
POINTER :: pregion
693 INTEGER :: errorflag,ivg
694 TYPE(t_grid),
POINTER :: pgrid
701 global => pregion%global
704 'RFLU_ModRenumberings.F90')
706 IF ( global%verbLevel > verbose_none )
THEN
707 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building sv2pv mapping...'
710 IF ( global%verbLevel > verbose_low )
THEN
711 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
712 pregion%iRegionGlobal
719 pgrid => pregion%grid
725 ALLOCATE(pgrid%sv2pv(2,pgrid%nVertTot),stat=errorflag)
726 global%error = errorflag
727 IF ( global%error /= err_none )
THEN
728 CALL
errorstop(global,err_allocate,__line__,
'pGrid%sv2pv')
731 DO ivg = 1,pgrid%nVertTot
732 pgrid%sv2pv(1,ivg) = pgrid%pv2sv(ivg)
733 pgrid%sv2pv(2,ivg) = ivg
737 pgrid%sv2pv(2:2,1:pgrid%nVertTot), &
744 IF ( global%verbLevel > verbose_none )
THEN
745 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building sv2pv mapping done.'
786 TYPE(t_region
),
POINTER :: pregion
794 TYPE(t_grid),
POINTER :: pgrid
800 global => pregion%global
803 'RFLU_ModRenumberings.F90')
805 IF ( global%myProcid == masterproc .AND. &
806 global%verbLevel > verbose_none )
THEN
807 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating sc2r mapping...'
810 IF ( global%myProcid == masterproc .AND. &
811 global%verbLevel > verbose_low )
THEN
812 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
813 pregion%iRegionGlobal
820 pgrid => pregion%grid
826 ALLOCATE(pgrid%sc2r(pgrid%nCellsTot),stat=errorflag)
827 global%error = errorflag
828 IF ( global%error /= err_none )
THEN
829 CALL
errorstop(global,err_allocate,__line__,
'pGrid%sc2r')
836 IF ( global%myProcid == masterproc .AND. &
837 global%verbLevel > verbose_none )
THEN
838 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating sc2r mapping done.'
880 TYPE(t_region
),
POINTER :: pregion
888 TYPE(t_grid),
POINTER :: pgrid
894 global => pregion%global
897 'RFLU_ModRenumberings.F90')
899 IF ( global%myProcid == masterproc .AND. &
900 global%verbLevel > verbose_none )
THEN
901 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating pc2sc mapping...'
904 IF ( global%myProcid == masterproc .AND. &
905 global%verbLevel > verbose_low )
THEN
906 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
907 pregion%iRegionGlobal
914 pgrid => pregion%grid
920 ALLOCATE(pgrid%pc2sc(pgrid%nCellsMax),stat=errorflag)
921 global%error = errorflag
922 IF ( global%error /= err_none )
THEN
923 CALL
errorstop(global,err_allocate,__line__,
'pGrid%pc2sc')
930 IF ( global%myProcid == masterproc .AND. &
931 global%verbLevel > verbose_none )
THEN
932 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating pc2sc mapping done.'
980 TYPE(t_region
),
POINTER :: pregion
986 INTEGER :: errorflag,ipatch
988 TYPE(t_grid),
POINTER :: pgrid
989 TYPE(t_patch),
POINTER :: ppatch
995 global => pregion%global
998 'RFLU_ModRenumberings.F90')
1000 IF ( global%myProcid == masterproc .AND. &
1001 global%verbLevel > verbose_none )
THEN
1002 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating pbf2sbf mapping...'
1005 IF ( global%myProcid == masterproc .AND. &
1006 global%verbLevel > verbose_low )
THEN
1007 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1008 pregion%iRegionGlobal
1015 pgrid => pregion%grid
1021 IF ( pgrid%nBFacesTot > 0 )
THEN
1022 ALLOCATE(pgrid%pbf2sbfCSR(pgrid%nBFacesTot),stat=errorflag)
1023 global%error = errorflag
1024 IF ( global%error /= err_none )
THEN
1025 CALL
errorstop(global,err_allocate,__line__,
'pGrid%pbf2sbfCSR')
1028 IF (
ASSOCIATED(pregion%patches) .EQV. .true. )
THEN
1029 ALLOCATE(pgrid%pbf2sbfCSRInfo(pgrid%nPatches),stat=errorflag)
1030 global%error = errorflag
1031 IF ( global%error /= err_none )
THEN
1032 CALL
errorstop(global,err_allocate,__line__,
'pGrid%pbf2sbfCSRInfo')
1035 pgrid%pbf2sbfCSRInfo(1) = 1
1037 DO ipatch = 2,pgrid%nPatches
1038 ppatch => pregion%patches(ipatch-1)
1040 pgrid%pbf2sbfCSRInfo(ipatch) = pgrid%pbf2sbfCSRInfo(ipatch-1) &
1045 nullify(pgrid%pbf2sbfCSR)
1046 nullify(pgrid%pbf2sbfCSRInfo)
1053 IF ( global%myProcid == masterproc .AND. &
1054 global%verbLevel > verbose_none )
THEN
1055 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating pbf2sbf mapping done.'
1098 TYPE(t_region
),
POINTER :: pregion
1104 INTEGER :: errorflag
1106 TYPE(t_grid),
POINTER :: pgrid
1112 global => pregion%global
1115 'RFLU_ModRenumberings.F90')
1117 IF ( global%myProcid == masterproc .AND. &
1118 global%verbLevel > verbose_none )
THEN
1119 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating pv2sv mapping...'
1122 IF ( global%myProcid == masterproc .AND. &
1123 global%verbLevel > verbose_low )
THEN
1124 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1125 pregion%iRegionGlobal
1132 pgrid => pregion%grid
1138 ALLOCATE(pgrid%pv2sv(pgrid%nVertMax),stat=errorflag)
1139 global%error = errorflag
1140 IF ( global%error /= err_none )
THEN
1141 CALL
errorstop(global,err_allocate,__line__,
'pGrid%pv2sv')
1148 IF ( global%myProcid == masterproc .AND. &
1149 global%verbLevel > verbose_none )
THEN
1150 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating pv2sv mapping done.'
1191 TYPE(t_region
),
POINTER :: pregion
1197 INTEGER :: errorflag
1199 TYPE(t_grid),
POINTER :: pgrid
1205 global => pregion%global
1208 'RFLU_ModRenumberings.F90')
1210 IF ( global%myProcid == masterproc .AND. &
1211 global%verbLevel > verbose_none )
THEN
1212 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying pc2sc mapping...'
1215 IF ( global%myProcid == masterproc .AND. &
1216 global%verbLevel > verbose_low )
THEN
1217 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1218 pregion%iRegionGlobal
1225 pgrid => pregion%grid
1231 DEALLOCATE(pgrid%pc2sc,stat=errorflag)
1232 global%error = errorflag
1233 IF ( global%error /= err_none )
THEN
1234 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%pc2sc')
1241 IF ( global%myProcid == masterproc .AND. &
1242 global%verbLevel > verbose_none )
THEN
1243 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying pc2sc mapping done.'
1286 TYPE(t_region
),
POINTER :: pregion
1292 INTEGER :: errorflag,ipatch
1294 TYPE(t_grid),
POINTER :: pgrid
1295 TYPE(t_patch),
POINTER :: ppatch
1301 global => pregion%global
1304 'RFLU_ModRenumberings.F90')
1306 IF ( global%myProcid == masterproc .AND. &
1307 global%verbLevel > verbose_none )
THEN
1308 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying pbf2sbf mapping...'
1311 IF ( global%myProcid == masterproc .AND. &
1312 global%verbLevel > verbose_low )
THEN
1313 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1314 pregion%iRegionGlobal
1321 pgrid => pregion%grid
1327 IF ( pgrid%nPatches > 0 )
THEN
1328 DEALLOCATE(pgrid%pbf2sbfCSR,stat=errorflag)
1329 global%error = errorflag
1330 IF ( global%error /= err_none )
THEN
1331 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%pbf2sbfCSR')
1339 IF ( global%myProcid == masterproc .AND. &
1340 global%verbLevel > verbose_none )
THEN
1341 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying pbf2sbf mapping done.'
1382 TYPE(t_region
),
POINTER :: pregion
1388 INTEGER :: errorflag
1390 TYPE(t_grid),
POINTER :: pgrid
1396 global => pregion%global
1399 'RFLU_ModRenumberings.F90')
1401 IF ( global%myProcid == masterproc .AND. &
1402 global%verbLevel > verbose_none )
THEN
1403 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying pv2sv mapping...'
1406 IF ( global%myProcid == masterproc .AND. &
1407 global%verbLevel > verbose_low )
THEN
1408 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1409 pregion%iRegionGlobal
1416 pgrid => pregion%grid
1422 DEALLOCATE(pgrid%pv2sv,stat=errorflag)
1423 global%error = errorflag
1424 IF ( global%error /= err_none )
THEN
1425 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%pv2sv')
1432 IF ( global%myProcid == masterproc .AND. &
1433 global%verbLevel > verbose_none )
THEN
1434 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying pv2sv mapping done.'
1475 TYPE(t_region
),
POINTER :: pregion
1481 INTEGER :: errorflag
1482 TYPE(t_grid),
POINTER :: pgrid
1489 global => pregion%global
1492 'RFLU_ModRenumberings.F90')
1494 IF ( global%myProcid == masterproc .AND. &
1495 global%verbLevel > verbose_none )
THEN
1496 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying sbc2pc mapping...'
1499 IF ( global%myProcid == masterproc .AND. &
1500 global%verbLevel > verbose_low )
THEN
1501 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1502 pregion%iRegionGlobal
1509 pgrid => pregion%grid
1515 pgrid%nBCellsTot = 0
1517 DEALLOCATE(pgrid%sbc2pc,stat=errorflag)
1518 global%error = errorflag
1519 IF ( global%error /= err_none )
THEN
1520 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%sbc2pc')
1527 IF ( global%myProcid == masterproc .AND. &
1528 global%verbLevel > verbose_none )
THEN
1529 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying sbc2pc mapping done.'
1571 TYPE(t_region
),
POINTER :: pregion
1577 INTEGER :: errorflag
1578 TYPE(t_grid),
POINTER :: pgrid
1585 global => pregion%global
1588 'RFLU_ModRenumberings.F90')
1590 IF ( global%myProcid == masterproc .AND. &
1591 global%verbLevel > verbose_none )
THEN
1592 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying sc2pc mapping...'
1595 IF ( global%myProcid == masterproc .AND. &
1596 global%verbLevel > verbose_low )
THEN
1597 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1598 pregion%iRegionGlobal
1605 pgrid => pregion%grid
1611 DEALLOCATE(pgrid%sc2pc,stat=errorflag)
1612 global%error = errorflag
1613 IF ( global%error /= err_none )
THEN
1614 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%sc2pc')
1621 IF ( global%myProcid == masterproc .AND. &
1622 global%verbLevel > verbose_none )
THEN
1623 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying sc2pc mapping done.'
1664 TYPE(t_region
),
POINTER :: pregion
1670 INTEGER :: errorflag
1672 TYPE(t_grid),
POINTER :: pgrid
1678 global => pregion%global
1681 'RFLU_ModRenumberings.F90')
1683 IF ( global%myProcid == masterproc .AND. &
1684 global%verbLevel > verbose_none )
THEN
1685 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying sc2r mapping...'
1688 IF ( global%myProcid == masterproc .AND. &
1689 global%verbLevel > verbose_low )
THEN
1690 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1691 pregion%iRegionGlobal
1698 pgrid => pregion%grid
1704 DEALLOCATE(pgrid%sc2r,stat=errorflag)
1705 global%error = errorflag
1706 IF ( global%error /= err_none )
THEN
1707 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%sc2r')
1714 IF ( global%myProcid == masterproc .AND. &
1715 global%verbLevel > verbose_none )
THEN
1716 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying sc2r mapping done.'
1757 TYPE(t_region
),
POINTER :: pregion
1763 INTEGER :: errorflag
1764 TYPE(t_grid),
POINTER :: pgrid
1771 global => pregion%global
1774 'RFLU_ModRenumberings.F90')
1776 IF ( global%myProcid == masterproc .AND. &
1777 global%verbLevel > verbose_none )
THEN
1778 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying sv2pv mapping...'
1781 IF ( global%myProcid == masterproc .AND. &
1782 global%verbLevel > verbose_low )
THEN
1783 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1784 pregion%iRegionGlobal
1791 pgrid => pregion%grid
1797 DEALLOCATE(pgrid%sv2pv,stat=errorflag)
1798 global%error = errorflag
1799 IF ( global%error /= err_none )
THEN
1800 CALL
errorstop(global,err_deallocate,__line__,
'pGrid%sv2pv')
1807 IF ( global%myProcid == masterproc .AND. &
1808 global%verbLevel > verbose_none )
THEN
1809 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying sv2pv mapping done.'
1851 TYPE(t_region
),
POINTER :: pregion
1857 INTEGER :: errorflag,icg,ifile,ivg,loopcounter,ncellstot
1858 CHARACTER(CHRLEN) :: ifilename,sectionstring
1859 TYPE(t_grid),
POINTER :: pgrid
1866 global => pregion%global
1869 'RFLU_ModRenumberings.F90')
1871 IF ( global%myProcid == masterproc .AND. &
1872 global%verbLevel > verbose_none )
THEN
1873 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading sc2r map...'
1876 IF ( global%myProcid == masterproc .AND. &
1877 global%verbLevel > verbose_none )
THEN
1878 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1879 pregion%iRegionGlobal
1889 pregion%iRegionGlobal,ifilename)
1891 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"OLD",iostat=errorflag)
1892 global%error = errorflag
1893 IF ( global%error /= err_none )
THEN
1894 CALL
errorstop(global,err_file_open,__line__,ifilename)
1901 IF ( global%myProcid == masterproc .AND. &
1902 global%verbLevel > verbose_low )
THEN
1903 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
1906 READ(ifile,
'(A)') sectionstring
1907 IF ( trim(sectionstring) /=
'# ROCFLU renumbering file' )
THEN
1908 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
1915 pgrid => pregion%grid
1917 READ(ifile,
'(A)') sectionstring
1918 IF ( trim(sectionstring) /=
'# Dimensions' )
THEN
1919 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
1922 READ(ifile,
'(I8)') ncellstot
1928 IF ( ncellstot /= pgrid%nCellsTot )
THEN
1929 CALL
errorstop(global,err_dimens_invalid,__line__)
1939 loopcounter = loopcounter + 1
1941 READ(ifile,
'(A)') sectionstring
1943 SELECT CASE ( trim(sectionstring) )
1950 IF ( global%myProcid == masterproc .AND. &
1951 global%verbLevel > verbose_low )
THEN
1952 WRITE(stdout,
'(A,3X,A)') solver_name,
'Cells...'
1955 READ(ifile,
'(10(I8))') (pgrid%sc2r(icg),icg=1,pgrid%nCellsTot)
1962 IF ( global%myProcid == masterproc .AND. &
1963 global%verbLevel > verbose_low )
THEN
1964 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
1974 IF ( global%myProcid == masterproc .AND. &
1975 global%verbLevel > verbose_low )
THEN
1976 WRITE(stdout,
'(3X,A)') sectionstring
1979 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
1986 IF ( loopcounter >= limit_infinite_loop )
THEN
1987 CALL
errorstop(global,err_infinite_loop,__line__)
1995 CLOSE(ifile,iostat=errorflag)
1996 global%error = errorflag
1997 IF ( global%error /= err_none )
THEN
1998 CALL
errorstop(global,err_file_close,__line__,ifilename)
2005 IF ( global%myProcid == masterproc .AND. &
2006 global%verbLevel > verbose_none )
THEN
2007 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading sc2r map done.'
2051 TYPE(t_region
),
POINTER :: pregion
2057 INTEGER :: errorflag,icg,ifile,ifl,ivg,loopcounter,ncellstot,nverttot
2058 CHARACTER(CHRLEN) :: ifilename,sectionstring
2059 TYPE(t_grid),
POINTER :: pgrid
2066 global => pregion%global
2069 'RFLU_ModRenumberings.F90')
2071 IF ( global%myProcid == masterproc .AND. &
2072 global%verbLevel > verbose_none )
THEN
2073 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading Pxx2Sxx maps...'
2076 IF ( global%myProcid == masterproc .AND. &
2077 global%verbLevel > verbose_none )
THEN
2078 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
2079 pregion%iRegionGlobal
2089 pregion%iRegionGlobal,ifilename)
2091 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"OLD",iostat=errorflag)
2092 global%error = errorflag
2093 IF ( global%error /= err_none )
THEN
2094 CALL
errorstop(global,err_file_open,__line__,ifilename)
2101 IF ( global%myProcid == masterproc .AND. &
2102 global%verbLevel > verbose_low )
THEN
2103 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
2106 READ(ifile,
'(A)') sectionstring
2107 IF ( trim(sectionstring) /=
'# ROCFLU renumbering file' )
THEN
2108 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
2115 pgrid => pregion%grid
2117 READ(ifile,
'(A)') sectionstring
2118 IF ( trim(sectionstring) /=
'# Dimensions' )
THEN
2119 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
2122 READ(ifile,
'(2(I8))') nverttot,ncellstot
2128 IF ( nverttot /= pgrid%nVertTot )
THEN
2129 CALL
errorstop(global,err_dimens_invalid,__line__)
2132 IF ( ncellstot /= pgrid%nCellsTot )
THEN
2133 CALL
errorstop(global,err_dimens_invalid,__line__)
2143 loopcounter = loopcounter + 1
2145 READ(ifile,
'(A)') sectionstring
2147 SELECT CASE ( trim(sectionstring) )
2153 CASE (
'# Vertices' )
2154 IF ( global%myProcid == masterproc .AND. &
2155 global%verbLevel > verbose_low )
THEN
2156 WRITE(stdout,
'(A,3X,A)') solver_name,
'Vertices...'
2159 READ(ifile,
'(10(I8))') (pgrid%pv2sv(ivg),ivg=1,pgrid%nVertTot)
2166 IF ( global%myProcid == masterproc .AND. &
2167 global%verbLevel > verbose_low )
THEN
2168 WRITE(stdout,
'(A,3X,A)') solver_name,
'Cells...'
2171 READ(ifile,
'(10(I8))') (pgrid%pc2sc(icg),icg=1,pgrid%nCellsTot)
2177 CASE (
'# Boundary faces' )
2178 IF ( global%myProcid == masterproc .AND. &
2179 global%verbLevel > verbose_low )
THEN
2180 WRITE(stdout,
'(A,3X,A)') solver_name,
'Boundary faces...'
2183 READ(ifile,
'(10(I8))') (pgrid%pbf2sbfCSR(ifl),ifl=1,pgrid%nBFacesTot)
2190 IF ( global%myProcid == masterproc .AND. &
2191 global%verbLevel > verbose_low )
THEN
2192 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
2202 IF ( global%myProcid == masterproc .AND. &
2203 global%verbLevel > verbose_low )
THEN
2204 WRITE(stdout,
'(3X,A)') sectionstring
2207 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
2214 IF ( loopcounter >= limit_infinite_loop )
THEN
2215 CALL
errorstop(global,err_infinite_loop,__line__)
2223 CLOSE(ifile,iostat=errorflag)
2224 global%error = errorflag
2225 IF ( global%error /= err_none )
THEN
2226 CALL
errorstop(global,err_file_close,__line__,ifilename)
2233 IF ( global%myProcid == masterproc .AND. &
2234 global%verbLevel > verbose_none )
THEN
2235 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading Pxx2Sxx maps done.'
2278 TYPE(t_region
),
POINTER :: pregion
2284 INTEGER :: errorflag,icg,ifile,ivg
2285 CHARACTER(CHRLEN) :: ifilename,sectionstring
2286 TYPE(t_grid),
POINTER :: pgrid
2293 global => pregion%global
2296 'RFLU_ModRenumberings.F90')
2298 IF ( global%myProcid == masterproc .AND. &
2299 global%verbLevel > verbose_none )
THEN
2300 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing sc2r map...'
2303 IF ( global%myProcid == masterproc .AND. &
2304 global%verbLevel > verbose_none )
THEN
2305 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
2306 pregion%iRegionGlobal
2316 pregion%iRegionGlobal,ifilename)
2318 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"UNKNOWN", &
2320 global%error = errorflag
2321 IF ( global%error /= err_none )
THEN
2322 CALL
errorstop(global,err_file_open,__line__,ifilename)
2329 IF ( global%myProcid == masterproc .AND. &
2330 global%verbLevel > verbose_low )
THEN
2331 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
2334 sectionstring =
'# ROCFLU renumbering file'
2335 WRITE(ifile,
'(A)') trim(sectionstring)
2341 pgrid => pregion%grid
2343 IF ( global%myProcid == masterproc .AND. &
2344 global%verbLevel > verbose_low )
THEN
2345 WRITE(stdout,
'(A,3X,A)') solver_name,
'Dimensions...'
2348 sectionstring =
'# Dimensions'
2349 WRITE(ifile,
'(A)') trim(sectionstring)
2350 WRITE(ifile,
'(I8)') pgrid%nCellsTot
2356 IF ( global%myProcid == masterproc .AND. &
2357 global%verbLevel > verbose_low )
THEN
2358 WRITE(stdout,
'(A,3X,A)') solver_name,
'Cells...'
2361 sectionstring =
'# Cells'
2362 WRITE(ifile,
'(A)') trim(sectionstring)
2363 WRITE(ifile,
'(10(I8))') (pgrid%sc2r(icg),icg=1,pgrid%nCellsTot)
2369 IF ( global%myProcid == masterproc .AND. &
2370 global%verbLevel > verbose_low )
THEN
2371 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
2374 sectionstring =
'# End'
2375 WRITE(ifile,
'(A)') trim(sectionstring)
2381 CLOSE(ifile,iostat=errorflag)
2382 global%error = errorflag
2383 IF ( global%error /= err_none )
THEN
2384 CALL
errorstop(global,err_file_close,__line__,ifilename)
2391 IF ( global%myProcid == masterproc .AND. &
2392 global%verbLevel > verbose_none )
THEN
2393 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing sc2r map done.'
2436 TYPE(t_region
),
POINTER :: pregion
2442 INTEGER :: errorflag,icg,ifile,ifl,ivg
2443 CHARACTER(CHRLEN) :: ifilename,sectionstring
2444 TYPE(t_grid),
POINTER :: pgrid
2451 global => pregion%global
2454 'RFLU_ModRenumberings.F90')
2456 IF ( global%myProcid == masterproc .AND. &
2457 global%verbLevel > verbose_none )
THEN
2458 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing Pxx2Sxx maps...'
2461 IF ( global%myProcid == masterproc .AND. &
2462 global%verbLevel > verbose_none )
THEN
2463 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
2464 pregion%iRegionGlobal
2474 pregion%iRegionGlobal,ifilename)
2476 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"UNKNOWN", &
2478 global%error = errorflag
2479 IF ( global%error /= err_none )
THEN
2480 CALL
errorstop(global,err_file_open,__line__,ifilename)
2487 IF ( global%myProcid == masterproc .AND. &
2488 global%verbLevel > verbose_low )
THEN
2489 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
2492 sectionstring =
'# ROCFLU renumbering file'
2493 WRITE(ifile,
'(A)') trim(sectionstring)
2499 pgrid => pregion%grid
2501 IF ( global%myProcid == masterproc .AND. &
2502 global%verbLevel > verbose_low )
THEN
2503 WRITE(stdout,
'(A,3X,A)') solver_name,
'Dimensions...'
2506 sectionstring =
'# Dimensions'
2507 WRITE(ifile,
'(A)') trim(sectionstring)
2508 WRITE(ifile,
'(2(I8))') pgrid%nVertTot,pgrid%nCellsTot
2514 IF ( global%myProcid == masterproc .AND. &
2515 global%verbLevel > verbose_low )
THEN
2516 WRITE(stdout,
'(A,3X,A)') solver_name,
'Vertices...'
2519 sectionstring =
'# Vertices'
2520 WRITE(ifile,
'(A)') trim(sectionstring)
2521 WRITE(ifile,
'(10(I8))') (pgrid%pv2sv(ivg),ivg=1,pgrid%nVertTot)
2527 IF ( global%myProcid == masterproc .AND. &
2528 global%verbLevel > verbose_low )
THEN
2529 WRITE(stdout,
'(A,3X,A)') solver_name,
'Cells...'
2532 sectionstring =
'# Cells'
2533 WRITE(ifile,
'(A)') trim(sectionstring)
2534 WRITE(ifile,
'(10(I8))') (pgrid%pc2sc(icg),icg=1,pgrid%nCellsTot)
2540 IF ( global%myProcid == masterproc .AND. &
2541 global%verbLevel > verbose_low )
THEN
2542 WRITE(stdout,
'(A,3X,A)') solver_name,
'Boundary faces...'
2545 sectionstring =
'# Boundary faces'
2546 WRITE(ifile,
'(A)') trim(sectionstring)
2547 WRITE(ifile,
'(10(I8))') (pgrid%pbf2sbfCSR(ifl),ifl=1,pgrid%nBFacesTot)
2553 IF ( global%myProcid == masterproc .AND. &
2554 global%verbLevel > verbose_low )
THEN
2555 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
2558 sectionstring =
'# End'
2559 WRITE(ifile,
'(A)') trim(sectionstring)
2565 CLOSE(ifile,iostat=errorflag)
2566 global%error = errorflag
2567 IF ( global%error /= err_none )
THEN
2568 CALL
errorstop(global,err_file_close,__line__,ifilename)
2575 IF ( global%myProcid == masterproc .AND. &
2576 global%verbLevel > verbose_none )
THEN
2577 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing Pxx2Sxx maps done.'
subroutine, public rflu_rnmb_destroysv2pvmap(pRegion)
subroutine, public rflu_rnmb_readpxx2sxxmaps(pRegion)
subroutine buildfilenamebasic(global, dest, ext, id, fileName)
subroutine, public rflu_rnmb_readsc2rmap(pRegion)
subroutine, public rflu_rnmb_destroypbf2sbfmap(pRegion)
subroutine, public rflu_rnmb_buildsv2pvmap(pRegion)
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine rflu_rnmb_buildsbc2pcmap2d(pRegion)
subroutine, public rflu_rnmb_destroypc2scmap(pRegion)
subroutine binarysearchinteger(a, n, v, i, j)
subroutine, public rflu_rnmb_buildsc2pcmap(pRegion, sortFlag)
subroutine, public rflu_rnmb_destroysc2rmap(pRegion)
subroutine, public rflu_rnmb_buildsbc2pcmap(pRegion, pRegionSerial)
subroutine, public rflu_rnmb_destroysc2pcmap(pRegion)
subroutine quicksortintegerinteger(a, b, n)
subroutine, public rflu_rnmb_destroypv2svmap(pRegion)
subroutine, public rflu_rnmb_writesc2rmap(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, public rflu_rnmb_createsc2rmap(pRegion)
subroutine, public rflu_rnmb_createpc2scmap(pRegion)
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
subroutine rflu_rnmb_buildsbc2pcmap3d(pRegion, pRegionSerial)
subroutine, public rflu_rnmb_createpv2svmap(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine, public rflu_rnmb_destroysbc2pcmap(pRegion)
subroutine, public rflu_rnmb_createpbf2sbfmap(pRegion)
subroutine deregisterfunction(global)
subroutine, public rflu_rnmb_writepxx2sxxmaps(pRegion)