62 CHARACTER(CHRLEN) :: &
63 RCSIdentString =
'$RCSfile: RFLU_ModTopologyUtils.F90,v $ $Revision: 1.9 $'
112 INTEGER,
INTENT(IN) :: clistdim,vlistdimmax
113 INTEGER,
INTENT(OUT) :: vlistdim
114 INTEGER,
INTENT(IN) :: clist(clistdim)
115 INTEGER,
INTENT(OUT) :: vlist(vlistdimmax)
116 TYPE(t_grid),
POINTER :: pgrid
123 INTEGER ::
i,icg,icl,ict,ivl,
key,errorflag
130 'RFLU_ModTopologyUtils.F90')
155 ict = pgrid%cellGlob2Loc(1,icg)
156 icl = pgrid%cellGlob2Loc(2,icg)
159 CASE ( cell_type_tet )
165 CASE ( cell_type_hex )
171 CASE ( cell_type_pri )
177 CASE ( cell_type_pyr )
184 CALL
errorstop(global,err_reached_default,__line__)
237 vlist,vlistdimmax,vlistdim)
251 INTEGER,
INTENT(IN) :: connlistdim1,connlistdim2,vlistdimmax
252 INTEGER,
INTENT(OUT) :: vlistdim
253 INTEGER,
INTENT(IN) :: connlist(connlistdim1,connlistdim2)
254 INTEGER,
INTENT(OUT) :: vlist(vlistdimmax)
261 INTEGER ::
i,i1,i2,ivl,
key
268 'RFLU_ModTopologyUtils.F90')
290 DO i2 = 1,connlistdim2
291 DO i1 = 1,connlistdim1
348 vlistdimmax,vlistdim,errorflag)
362 INTEGER,
INTENT(IN) :: flistdim,vlistdimmax
363 INTEGER,
INTENT(OUT) :: errorflag,vlistdim
364 INTEGER,
INTENT(IN) :: flist(flistdim)
365 INTEGER,
INTENT(OUT) :: vlist(vlistdimmax)
366 TYPE(t_grid),
POINTER :: pgrid
380 'RFLU_ModTopologyUtils.F90')
402 iloop:
DO i = 1,flistdim
408 IF ( errorflag /= err_none )
THEN
415 IF ( errorflag /= err_none )
THEN
422 IF ( errorflag /= err_none )
THEN
426 IF ( pgrid%f2v(4,ifg) /= vert_none )
THEN
431 IF ( errorflag /= err_none )
THEN
447 IF ( errorflag == err_none )
THEN
501 nlayers,ireg,clist,clistdimmax,clistdim)
513 INTEGER,
INTENT(IN) :: clistdimmax,ireg,nlayers,vlistorigdim
514 INTEGER,
INTENT(OUT) :: clistdim
515 INTEGER,
INTENT(IN) :: vlistorig(vlistorigdim)
516 INTEGER,
INTENT(OUT) :: clist(clistdimmax)
517 TYPE(t_grid),
POINTER :: pgrid
524 LOGICAL :: check1,check2,check3
525 INTEGER :: clistdimnew,clisttempdim,clisttempdimmax,errorflag,icg,icl, &
526 ilayer,iloc,ivg,ivl,iv2c,vlistdim,vlisttempdim,vlisttempdim2, &
528 INTEGER,
DIMENSION(:),
ALLOCATABLE :: clisttemp,vlist,vlisttemp
535 'RFLU_ModTopologyUtils.F90')
541 clisttempdimmax = clistdimmax/nlayers
543 ALLOCATE(clisttemp(clisttempdimmax),stat=errorflag)
544 global%error = errorflag
545 IF ( global%error /= err_none )
THEN
546 CALL
errorstop(global,err_allocate,__line__,
'cListTemp')
549 vlistdim = vlistorigdim
551 ALLOCATE(vlist(vlistdim),stat=errorflag)
552 global%error = errorflag
553 IF ( global%error /= err_none )
THEN
554 CALL
errorstop(global,err_allocate,__line__,
'vList')
563 DO icl = 1,clistdimmax
568 vlist(ivl) = vlistorig(ivl)
575 DO ilayer = 1,nlayers
583 DO icl = 1,clisttempdimmax
598 DO iv2c = pgrid%v2cInfo(v2c_beg,ivg),pgrid%v2cInfo(v2c_end,ivg)
599 icg = pgrid%v2c(iv2c)
601 IF ( ireg == 0 )
THEN
607 IF (
ASSOCIATED(pgrid%sc2r) .EQV. .true. )
THEN
608 IF ( (ireg > 0) .AND. (pgrid%sc2r(icg) == ireg) )
THEN
614 IF ( (ireg < 0) .AND. (pgrid%sc2r(icg) /= abs(ireg)) )
THEN
626 IF ( (check1 .EQV. .true.) .OR. &
627 (check2 .EQV. .true.) .OR. &
628 (check3 .EQV. .true.) )
THEN
632 IF ( clistdim > 0 )
THEN
635 iloc = element_not_found
638 IF ( iloc == element_not_found )
THEN
639 IF ( clisttempdim > 0 )
THEN
641 clisttempdim,icg,iloc)
643 iloc = element_not_found
646 IF ( iloc == element_not_found )
THEN
647 IF ( clisttempdim < clisttempdimmax )
THEN
648 clisttempdim = clisttempdim + 1
650 clisttemp(clisttempdim) = icg
652 IF ( clisttempdim > 1 )
THEN
657 CALL
errorstop(global,err_exceed_dimens,__line__,
'cListTemp')
670 IF ( clistdim + clisttempdim <= clistdimmax )
THEN
671 DO icl = clistdim+1,clistdim+clisttempdim
672 clist(icl) = clisttemp(icl-clistdim)
675 clistdim = clistdim + clisttempdim
677 IF ( clistdim /= clisttempdim )
THEN
681 CALL
errorstop(global,err_exceed_dimens,__line__,
'cList')
688 IF( ilayer < nlayers )
THEN
694 vlisttempdimmax = 8*clisttempdim
696 ALLOCATE(vlisttemp(vlisttempdimmax),stat=errorflag)
697 global%error = errorflag
698 IF ( global%error /= err_none )
THEN
699 CALL
errorstop(global,err_allocate,__line__,
'vListTemp')
707 clisttempdim,vlisttemp,vlisttempdimmax, &
715 vlisttemp(1:vlisttempdim), &
716 vlisttempdim,vlisttempdim2)
722 DEALLOCATE(vlist,stat=errorflag)
723 global%error = errorflag
724 IF ( global%error /= err_none )
THEN
725 CALL
errorstop(global,err_deallocate,__line__,
'vList')
728 vlistdim = vlisttempdim2
730 ALLOCATE(vlist(vlistdim),stat=errorflag)
731 global%error = errorflag
732 IF ( global%error /= err_none )
THEN
733 CALL
errorstop(global,err_allocate,__line__,
'vList')
737 vlist(ivl) = vlisttemp(ivl)
744 DEALLOCATE(vlisttemp,stat=errorflag)
745 global%error = errorflag
746 IF ( global%error /= err_none )
THEN
747 CALL
errorstop(global,err_deallocate,__line__,
'vListTemp')
756 DEALLOCATE(vlist,stat=errorflag)
757 global%error = errorflag
758 IF ( global%error /= err_none )
THEN
759 CALL
errorstop(global,err_deallocate,__line__,
'vList')
762 DEALLOCATE(clisttemp,stat=errorflag)
763 global%error = errorflag
764 IF ( global%error /= err_none )
THEN
765 CALL
errorstop(global,err_deallocate,__line__,
'cListTemp')
subroutine, public rflu_buildconnvertlist(global, connList, connListDim1, connListDim2, vList, vListDimMax, vListDim)
subroutine, public rflu_createhashtable(global, size)
subroutine, public rflu_buildfacevertlist(global, pGrid, fList, fListDim, vList, vListDimMax, vListDim, errorFlag)
subroutine, public rflu_destroyhashtable(global)
subroutine, public rflu_buildcellvertlist(global, pGrid, cList, cListDim, vList, vListDimMax, vListDim)
subroutine registerfunction(global, funName, fileName)
subroutine, public rflu_hashbuildkey(a, aSize, key)
subroutine quicksortinteger(a, n)
subroutine binarysearchinteger(a, n, v, i, j)
subroutine removecommonsortedintegers(a, na, b, nb, nb2)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine, public rflu_buildvertcellnghblist(global, pGrid, vListOrig, vListOrigDim, nLayers, iReg, cList, cListDimMax, cListDim)
subroutine deregisterfunction(global)
subroutine, public rflu_hashvertex(global, key, ivg, nVert, vert, errorFlag)