64 CHARACTER(CHRLEN) :: &
65 RCSIdentString =
'$RCSfile: RFLU_ModCENTAUR.F90,v $ $Revision: 1.4 $'
68 INTEGER :: nBQuads,nBTris
69 INTEGER,
DIMENSION(:,:),
POINTER :: bInfo,bTri2v,bQuad2v
70 CHARACTER(CHRLEN) :: title
71 CHARACTER(CHRLEN),
DIMENSION(:),
POINTER :: bName
122 TYPE(t_region
),
POINTER :: pregion
128 INTEGER :: errorflag,cvmax,cvmin
129 TYPE(t_grid),
POINTER :: pgrid
136 global => pregion%global
139 'RFLU_ModCENTAUR.F90')
141 IF ( global%verbLevel > verbose_none )
THEN
142 WRITE(stdout,
'(A,3X,A)') solver_name, &
143 'Checking connectivity arrays...'
150 pgrid => pregion%grid
156 IF ( global%verbLevel > verbose_none )
THEN
157 WRITE(stdout,
'(A,5X,A)') solver_name, &
165 IF ( pgrid%nTetsTot > 0 )
THEN
166 cvmin = minval(pgrid%tet2v(1:4,1:pgrid%nTetsTot))
167 cvmax = maxval(pgrid%tet2v(1:4,1:pgrid%nTetsTot))
169 IF ( pgrid%nTetsTot == pgrid%nCellsTot )
THEN
170 IF ( cvmin /= 1 .OR. cvmax /= pgrid%nVertTot )
THEN
171 global%error = err_vertex_number
174 IF ( cvmin < 1 .OR. cvmax > pgrid%nVertTot )
THEN
175 global%error = err_vertex_number
179 IF ( global%error /= err_none )
THEN
180 IF ( global%verbLevel > verbose_none )
THEN
181 WRITE(stdout,
'(A,5X,A)') solver_name,
'Check failed.'
183 CALL
errorstop(global,global%error,__line__)
191 IF ( pgrid%nHexsTot > 0 )
THEN
192 cvmin = minval(pgrid%hex2v(1:8,1:pgrid%nHexsTot))
193 cvmax = maxval(pgrid%hex2v(1:8,1:pgrid%nHexsTot))
195 IF ( pgrid%nHexsTot == pgrid%nCellsTot )
THEN
196 IF ( cvmin /= 1 .OR. cvmax /= pgrid%nVertTot )
THEN
197 global%error = err_vertex_number
200 IF ( cvmin < 1 .OR. cvmax > pgrid%nVertTot )
THEN
201 global%error = err_vertex_number
205 IF ( global%error /= err_none )
THEN
206 IF ( global%verbLevel > verbose_none )
THEN
207 WRITE(stdout,
'(A,5X,A)') solver_name,
'Check failed.'
209 CALL
errorstop(global,global%error,__line__)
217 IF ( pgrid%nPrisTot > 0 )
THEN
218 cvmin = minval(pgrid%pri2v(1:6,1:pgrid%nPrisTot))
219 cvmax = maxval(pgrid%pri2v(1:6,1:pgrid%nPrisTot))
221 IF ( pgrid%nPrisTot == pgrid%nCellsTot )
THEN
222 IF ( cvmin /= 1 .OR. cvmax /= pgrid%nVertTot )
THEN
223 global%error = err_vertex_number
226 IF ( cvmin < 1 .OR. cvmax > pgrid%nVertTot )
THEN
227 global%error = err_vertex_number
231 IF ( global%error /= err_none )
THEN
232 IF ( global%verbLevel > verbose_none )
THEN
233 WRITE(stdout,
'(A,5X,A)') solver_name,
'Check failed.'
235 CALL
errorstop(global,global%error,__line__)
243 IF ( pgrid%nPyrsTot > 0 )
THEN
244 cvmin = minval(pgrid%pyr2v(1:5,1:pgrid%nPyrsTot))
245 cvmax = maxval(pgrid%pyr2v(1:5,1:pgrid%nPyrsTot))
247 IF ( pgrid%nPyrsTot == pgrid%nCellsTot )
THEN
248 IF ( cvmin /= 1 .OR. cvmax /= pgrid%nVertTot )
THEN
249 global%error = err_vertex_number
252 IF ( cvmin < 1 .OR. cvmax > pgrid%nVertTot )
THEN
253 global%error = err_vertex_number
257 IF ( global%error /= err_none )
THEN
258 IF ( global%verbLevel > verbose_none )
THEN
259 WRITE(stdout,
'(A,5X,A)') solver_name,
'Check failed.'
261 CALL
errorstop(global,global%error,__line__)
269 IF ( global%verbLevel > verbose_none )
THEN
270 WRITE(stdout,
'(A,5X,A)') solver_name,
'Surface grid...'
273 IF ( gridcentaur%nBTris > 0 )
THEN
274 cvmin = minval(gridcentaur%bTri2v(:,:))
275 cvmax = maxval(gridcentaur%bTri2v(:,:))
277 IF ( cvmin < 1 .OR. cvmax > pgrid%nVertTot )
THEN
278 global%error = err_vertex_number
281 IF ( global%error /= err_none )
THEN
282 IF ( global%verbLevel > verbose_none )
THEN
283 WRITE(stdout,
'(A,5X,A)') solver_name,
'Check failed.'
285 CALL
errorstop(global,global%error,__line__)
289 IF ( gridcentaur%nBQuads > 0 )
THEN
290 cvmin = minval(gridcentaur%bQuad2v(:,:))
291 cvmax = maxval(gridcentaur%bQuad2v(:,:))
293 IF ( cvmin < 1 .OR. cvmax > pgrid%nVertTot )
THEN
294 global%error = err_vertex_number
297 IF ( global%error /= err_none )
THEN
298 IF ( global%verbLevel > verbose_none )
THEN
299 WRITE(stdout,
'(A,5X,A)') solver_name,
'Check failed.'
301 CALL
errorstop(global,global%error,__line__)
309 IF ( global%verbLevel > verbose_none )
THEN
310 WRITE(stdout,
'(A,3X,A)') solver_name, &
311 'Checking connectivity arrays done.'
357 TYPE(t_region
),
POINTER :: pregion
363 INTEGER :: errorflag,ifl,ipatch,ipatch2,iqbeg,iqend,itbeg,itend,nbquads, &
365 TYPE(t_grid),
POINTER :: pgrid
366 TYPE(t_patch),
POINTER :: ppatch
373 global => pregion%global
376 'RFLU_ModCENTAUR.F90')
378 IF ( global%verbLevel > verbose_none )
THEN
379 WRITE(stdout,
'(A,1X,A)') solver_name, &
380 'Converting from CENTAUR to ROCFLU format...'
387 pgrid => pregion%grid
401 npatchesold = pgrid%nPatches
405 IF ( pgrid%nPatches > 0 )
THEN
408 DO ipatch2 = 1,npatchesold
409 IF ( ipatch2 /= 1 )
THEN
410 itbeg = gridcentaur%bInfo(2,ipatch2-1) + 1
411 iqbeg = gridcentaur%bInfo(3,ipatch2-1) + 1
417 itend = gridcentaur%bInfo(2,ipatch2)
418 iqend = gridcentaur%bInfo(3,ipatch2)
420 nbtris = itend - itbeg + 1
421 nbquads = iqend - iqbeg + 1
423 IF ( (nbtris + nbquads) /= 0 )
THEN
424 gridcentaur%bInfo(1,ipatch) = gridcentaur%bInfo(1,ipatch2)
425 gridcentaur%bInfo(2,ipatch) = gridcentaur%bInfo(2,ipatch2)
426 gridcentaur%bInfo(3,ipatch) = gridcentaur%bInfo(3,ipatch2)
430 WRITE(stdout,
'(A,3X,A,1X,I3,1X,A)') solver_name, &
431 '*** WARNING *** Patch',ipatch2,
'is empty and will be deleted!'
433 pgrid%nPatches = pgrid%nPatches - 1
442 global%nPatches = pgrid%nPatches
444 IF ( pgrid%nPatches > 0 )
THEN
445 ALLOCATE(pregion%patches(pgrid%nPatches),stat=errorflag)
446 global%error = errorflag
447 IF ( global%error /= err_none )
THEN
448 CALL
errorstop(global,err_allocate,__line__,
'pRegion%patches')
451 DO ipatch = 1,pgrid%nPatches
452 ppatch => pregion%patches(ipatch)
454 ppatch%bcType = gridcentaur%bInfo(1,ipatch)
456 ppatch%iPatchGlobal = ipatch
457 ppatch%iBorder = patch_iborder_default
458 ppatch%renumFlag = .false.
460 IF ( ipatch /= 1 )
THEN
461 itbeg = gridcentaur%bInfo(2,ipatch-1) + 1
462 iqbeg = gridcentaur%bInfo(3,ipatch-1) + 1
468 itend = gridcentaur%bInfo(2,ipatch)
469 iqend = gridcentaur%bInfo(3,ipatch)
471 ppatch%nBTrisTot = itend - itbeg + 1
472 ppatch%nBQuadsTot = iqend - iqbeg + 1
475 ppatch%nBTris = ppatch%nBTrisTot
476 ppatch%nBQuads = ppatch%nBQuadsTot
477 ppatch%nBVert = ppatch%nBVertTot
479 ppatch%nBFacesTot = ppatch%nBTrisTot + ppatch%nBQuadsTot
480 ppatch%nBFaces = ppatch%nBFacesTot
488 ppatch%nBCellsVirt = 0
490 IF ( ppatch%nBTrisMax > 0 )
THEN
491 ALLOCATE(ppatch%bTri2v(3,ppatch%nBTrisMax),stat=errorflag)
492 global%error = errorflag
493 IF ( global%error /= err_none )
THEN
494 CALL
errorstop(global,err_allocate,__line__,
'pPatch%bTri2v')
497 nullify(ppatch%bTri2v)
500 IF ( ppatch%nBTrisTot > 0 )
THEN
501 ppatch%bTri2v(1:3,1:ppatch%nBTrisTot) = &
502 gridcentaur%bTri2v(1:3,itbeg:itend)
505 IF ( ppatch%nBQuadsMax > 0 )
THEN
506 ALLOCATE(ppatch%bQuad2v(4,ppatch%nBQuadsMax),stat=errorflag)
507 global%error = errorflag
508 IF ( global%error /= err_none )
THEN
509 CALL
errorstop(global,err_allocate,__line__,
'pPatch%bQuad2v')
512 nullify(ppatch%bQuad2v)
515 IF ( ppatch%nBQuadsTot > 0 )
THEN
516 ppatch%bQuad2v(1:4,1:ppatch%nBQuadsTot) = &
517 gridcentaur%bQuad2v(1:4,iqbeg:iqend)
526 DO ipatch = 1,pgrid%nPatches
527 ppatch => pregion%patches(ipatch)
529 ppatch%nBFacesTot = ppatch%nBTrisTot + ppatch%nBQuadsTot
531 ppatch%nBFaces = ppatch%nBFacesTot
532 ppatch%nBQuads = ppatch%nBQuadsTot
533 ppatch%nBTris = ppatch%nBTrisTot
534 ppatch%nBVert = ppatch%nBVertTot
547 DO ipatch = 1,pgrid%nPatches
548 ppatch => pregion%patches(ipatch)
550 nbtris = nbtris + ppatch%nBTris
551 nbquads = nbquads + ppatch%nBQuads
554 IF ( nbtris /= gridcentaur%nBTris .OR. &
555 nbquads /= gridcentaur%nBQuads )
THEN
556 CALL
errorstop(global,err_nbfaces_wrong,__line__)
559 pgrid%nBFaces = nbtris + nbquads
560 pgrid%nBFacesTot = pgrid%nBFaces
566 IF ( pgrid%nPatches > 0 )
THEN
567 IF ( gridcentaur%nBTris > 0 )
THEN
568 DEALLOCATE(gridcentaur%bTri2v,stat=errorflag)
569 global%error = errorflag
570 IF ( global%error /= err_none )
THEN
571 CALL
errorstop(global,err_deallocate,__line__,
'gridCENTAUR%bTri2v')
575 IF ( gridcentaur%nBQuads > 0 )
THEN
576 DEALLOCATE(gridcentaur%bQuad2v,stat=errorflag)
577 global%error = errorflag
578 IF ( global%error /= err_none )
THEN
579 CALL
errorstop(global,err_deallocate,__line__,
'gridCENTAUR%bQuad2v')
583 DEALLOCATE(gridcentaur%bInfo,stat=errorflag)
584 global%error = errorflag
585 IF ( global%error /= err_none )
THEN
586 CALL
errorstop(global,err_deallocate,__line__,
'gridCENTAUR%bInfo')
589 DEALLOCATE(gridcentaur%bName,stat=errorflag)
590 global%error = errorflag
591 IF ( global%error /= err_none )
THEN
592 CALL
errorstop(global,err_deallocate,__line__,
'gridCENTAUR%bName')
600 DO ipatch = 1,pgrid%nPatches
601 ppatch => pregion%patches(ipatch)
603 ALLOCATE(ppatch%bf2c(ppatch%nBFacesMax),stat=errorflag)
604 global%error = errorflag
605 IF ( global%error /= err_none )
THEN
606 CALL
errorstop(global,err_allocate,__line__,
'pPatch%bf2c')
609 ALLOCATE(ppatch%bf2v(4,ppatch%nBFacesMax),stat=errorflag)
610 global%error = errorflag
611 IF ( global%error /= err_none )
THEN
612 CALL
errorstop(global,err_allocate,__line__,
'pPatch%bf2v')
615 DO ifl = 1,ppatch%nBFacesMax
616 ppatch%bf2v(1,ifl) = vert_none
617 ppatch%bf2v(2,ifl) = vert_none
618 ppatch%bf2v(3,ifl) = vert_none
619 ppatch%bf2v(4,ifl) = vert_none
627 IF ( global%verbLevel > verbose_none )
THEN
628 WRITE(stdout,
'(A,1X,A)') solver_name, &
629 'Converting from CENTAUR to ROCFLU format done.'
669 TYPE(t_region
),
POINTER :: pregion
675 TYPE(t_grid),
POINTER :: pgrid
681 pgrid => pregion%grid
687 WRITE(stdout,
'(A,3X,A)') solver_name,
'Grid Statistics:'
688 WRITE(stdout,
'(A,5X,A,2X,I9)') solver_name,
'Vertices: ', &
690 WRITE(stdout,
'(A,5X,A,2X,I9)') solver_name,
'Cells: ', &
692 WRITE(stdout,
'(A,7X,A,I9)') solver_name,
'Tetrahedra: ', &
694 WRITE(stdout,
'(A,7X,A,I9)') solver_name,
'Hexahedra: ', &
696 WRITE(stdout,
'(A,7X,A,I9)') solver_name,
'Prisms: ', &
698 WRITE(stdout,
'(A,7X,A,I9)') solver_name,
'Pyramids: ', &
700 WRITE(stdout,
'(A,5X,A,2X,I9)') solver_name,
'Patches: ', &
703 IF ( pgrid%nPatches > 0 )
THEN
704 WRITE(stdout,
'(A,5X,A,2X,I9)') solver_name,
'Patch faces: ', &
705 gridcentaur%bInfo(2,pgrid%nPatches) &
706 + gridcentaur%bInfo(3,pgrid%nPatches)
707 WRITE(stdout,
'(A,7X,A,I9)') solver_name,
'Triangles: ', &
708 gridcentaur%bInfo(2,pgrid%nPatches)
709 WRITE(stdout,
'(A,7X,A,I9)') solver_name,
'Quadrilaterals: ', &
710 gridcentaur%bInfo(3,pgrid%nPatches)
757 TYPE(t_region
),
POINTER :: pregion
763 CHARACTER(CHRLEN) :: ifilename
764 INTEGER :: dummyinteger,errorflag,
i,ifile,
j
765 TYPE(t_grid),
POINTER :: pgrid
772 global => pregion%global
775 'RFLU_ModCENTAUR.F90')
777 IF ( global%verbLevel > verbose_none )
THEN
778 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading ASCII CENTAUR grid file...'
785 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"OLD",iostat=errorflag)
786 global%error = errorflag
787 IF ( global%error /= err_none )
THEN
788 CALL
errorstop(global,err_file_open,__line__,ifilename)
791 READ(ifile,
'(A80)') gridcentaur%title
797 pgrid => pregion%grid
799 READ(ifile,
'(I8)') pgrid%nVertTot
803 ALLOCATE(pgrid%xyz(3,pgrid%nVertMax),stat=errorflag)
804 global%error = errorflag
805 IF ( global%error /= err_none )
THEN
806 CALL
errorstop(global,err_allocate,__line__,
'grid%xyz')
809 IF ( global%verbLevel > verbose_none )
THEN
810 WRITE(stdout,
'(A,3X,A)') solver_name,
'Coordinates...'
814 READ(ifile,
'(5E16.9)') (pgrid%xyz(
i,
j),
j=1,pgrid%nVertTot)
817 READ(ifile,
'(10I8)') (dummyinteger,
i=1,pgrid%nVertTot)
823 READ(ifile,
'(I8)') pgrid%nTetsTot
827 IF ( pgrid%nTetsMax > 0 )
THEN
828 ALLOCATE(pgrid%tet2v(4,pgrid%nTetsMax),stat=errorflag)
829 global%error = errorflag
830 IF ( global%error /= err_none )
THEN
831 CALL
errorstop(global,err_allocate,__line__,
'pGrid%tet2v')
837 IF ( pgrid%nTetsTot > 0 )
THEN
838 IF ( global%verbLevel > verbose_none )
THEN
839 WRITE(stdout,
'(A,3X,A)') solver_name,
'Tetrahedra...'
843 READ(ifile,
'(10I8)') (pgrid%tet2v(
i,
j),
j=1,pgrid%nTetsTot)
846 READ(ifile,
'(10I8)') (dummyinteger,
i=1,pgrid%nTetsTot)
850 READ(ifile,
'(I8)') pgrid%nHexsTot
854 IF ( pgrid%nHexsMax > 0 )
THEN
855 ALLOCATE(pgrid%hex2v(8,pgrid%nHexsMax),stat=errorflag)
856 global%error = errorflag
857 IF ( global%error /= err_none )
THEN
858 CALL
errorstop(global,err_allocate,__line__,
'pGrid%hex2v')
864 IF ( pgrid%nHexsTot > 0 )
THEN
865 IF ( global%verbLevel > verbose_none )
THEN
866 WRITE(stdout,
'(A,3X,A)') solver_name,
'Hexahedra...'
870 READ(ifile,
'(10I8)') (pgrid%hex2v(
i,
j),
j=1,pgrid%nHexsTot)
873 READ(ifile,
'(10I8)') (dummyinteger,
i=1,pgrid%nHexsTot)
877 READ(ifile,
'(I8)') pgrid%nPrisTot
881 IF ( pgrid%nPrisMax > 0 )
THEN
882 ALLOCATE(pgrid%pri2v(6,pgrid%nPrisMax),stat=errorflag)
883 global%error = errorflag
884 IF ( global%error /= err_none )
THEN
885 CALL
errorstop(global,err_allocate,__line__,
'pGrid%pri2v')
891 IF ( pgrid%nPrisTot > 0 )
THEN
892 IF ( global%verbLevel > verbose_none )
THEN
893 WRITE(stdout,
'(A,3X,A)') solver_name,
'Prisms...'
897 READ(ifile,
'(10I8)') (pgrid%pri2v(
i,
j),
j=1,pgrid%nPrisTot)
900 READ(ifile,
'(10I8)') (dummyinteger,
i=1,pgrid%nPrisTot)
904 READ(ifile,
'(I8)') pgrid%nPyrsTot
908 IF ( pgrid%nPyrsMax > 0 )
THEN
909 ALLOCATE(pgrid%pyr2v(5,pgrid%nPyrsMax),stat=errorflag)
910 global%error = errorflag
911 IF ( global%error /= err_none )
THEN
912 CALL
errorstop(global,err_allocate,__line__,
'pGrid%pyr2v')
918 IF ( pgrid%nPyrsTot > 0 )
THEN
919 IF ( global%verbLevel > verbose_none )
THEN
920 WRITE(stdout,
'(A,3X,A)') solver_name,
'Pyramids...'
924 READ(ifile,
'(10I8)') (pgrid%pyr2v(
i,
j),
j=1,pgrid%nPyrsTot)
927 READ(ifile,
'(10I8)') (dummyinteger,
i=1,pgrid%nPyrsTot)
934 pgrid%nCellsTot = pgrid%nTetsTot + pgrid%nHexsTot + pgrid%nPrisTot &
938 pgrid%nVert = pgrid%nVertTot
939 pgrid%nCells = pgrid%nCellsTot
940 pgrid%nTets = pgrid%nTetsTot
941 pgrid%nHexs = pgrid%nHexsTot
942 pgrid%nPris = pgrid%nPrisTot
943 pgrid%nPyrs = pgrid%nPyrsTot
949 IF ( global%verbLevel > verbose_none )
THEN
950 WRITE(stdout,
'(A,3X,A)') solver_name,
'Boundary information...'
953 READ(ifile,
'(I8)') pgrid%nPatches
955 IF ( pgrid%nPatches > 0 )
THEN
956 ALLOCATE(gridcentaur%bInfo(3,pgrid%nPatches),stat=errorflag)
957 global%error = errorflag
958 IF ( global%error /= err_none )
THEN
959 CALL
errorstop(global,err_allocate,__line__,
'gridCENTAUR%bInfo')
963 READ(ifile,
'(10I8)') (gridcentaur%bInfo(
i,
j),
j=1,pgrid%nPatches)
966 ALLOCATE(gridcentaur%bName(pgrid%nPatches),stat=errorflag)
967 global%error = errorflag
968 IF ( global%error /= err_none )
THEN
969 CALL
errorstop(global,err_allocate,__line__,
'gridCENTAUR%bName')
972 READ(ifile,
'(A80)') (gridcentaur%bName(
i),
i=1,pgrid%nPatches)
979 IF ( pgrid%nPatches > 0 )
THEN
980 READ(ifile,
'(I8)') gridcentaur%nBTris
982 IF ( gridcentaur%nBTris > 0 )
THEN
983 ALLOCATE(gridcentaur%bTri2v(3,gridcentaur%nBTris),stat=errorflag)
984 global%error = errorflag
985 IF ( global%error /= err_none )
THEN
986 CALL
errorstop(global,err_allocate,__line__,
'gridCENTAUR%bTri2v')
989 IF ( global%verbLevel > verbose_none )
THEN
990 WRITE(stdout,
'(A,3X,A)') solver_name,
'Boundary triangles...'
994 READ(ifile,
'(10I8)') (gridcentaur%bTri2v(
i,
j), &
995 j=1,gridcentaur%nBTris)
999 READ(ifile,
'(I8)') gridcentaur%nBQuads
1001 IF ( gridcentaur%nBQuads > 0 )
THEN
1002 ALLOCATE(gridcentaur%bQuad2v(4,gridcentaur%nBQuads),stat=errorflag)
1003 global%error = errorflag
1004 IF ( global%error /= err_none )
THEN
1005 CALL
errorstop(global,err_allocate,__line__,
'gridCENTAUR%bQuad2v')
1008 IF ( global%verbLevel > verbose_none )
THEN
1009 WRITE(stdout,
'(A,3X,A)') solver_name,
'Boundary quadrilaterals...'
1013 READ(ifile,
'(10I8)') (gridcentaur%bQuad2v(
i,
j), &
1014 j=1,gridcentaur%nBQuads)
1018 gridcentaur%nBTris = 0
1019 gridcentaur%nBQuads = 0
1026 IF ( global%checkLevel > check_none )
THEN
1034 IF ( global%verbLevel > verbose_none )
THEN
1042 CLOSE(ifile, iostat=errorflag)
1043 global%error = errorflag
1044 IF ( global%error /= err_none )
THEN
1045 CALL
errorstop(global,err_file_close,__line__,ifilename)
1052 IF ( global%verbLevel > verbose_none )
THEN
1053 WRITE(stdout,
'(A,1X,A)') solver_name, &
1054 'Reading ASCII CENTAUR grid file done.'
1096 TYPE(t_region
),
POINTER :: pregion
1102 CHARACTER(CHRLEN) :: ifilename
1103 INTEGER :: dummyinteger,errorflag,
i,ifile,
j
1104 TYPE(t_grid),
POINTER :: pgrid
1111 global => pregion%global
1114 'RFLU_ModCENTAUR.F90')
1116 IF ( global%verbLevel > verbose_none )
THEN
1117 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading binary CENTAUR grid file...'
1124 OPEN(ifile,file=ifilename,
form=
"UNFORMATTED",
status=
"OLD",iostat=errorflag)
1125 global%error = errorflag
1126 IF ( global%error /= err_none )
THEN
1127 CALL
errorstop(global,err_file_open,__line__,ifilename)
1130 READ(ifile) gridcentaur%title
1136 pgrid => pregion%grid
1138 READ(ifile) pgrid%nVertTot
1142 ALLOCATE(pgrid%xyz(3,pgrid%nVertMax),stat=errorflag)
1143 global%error = errorflag
1144 IF ( global%error /= err_none )
THEN
1145 CALL
errorstop(global,err_allocate,__line__,
'grid%xyz')
1148 IF ( global%verbLevel > verbose_none )
THEN
1149 WRITE(stdout,
'(A,3X,A)') solver_name,
'Coordinates...'
1152 READ(ifile) ((pgrid%xyz(
i,
j),
j=1,pgrid%nVertTot),
i=1,3)
1153 READ(ifile) (dummyinteger,
i=1,pgrid%nVertTot)
1159 READ(ifile) pgrid%nTetsTot
1163 IF ( pgrid%nTetsMax > 0 )
THEN
1164 ALLOCATE(pgrid%tet2v(4,pgrid%nTetsMax),stat=errorflag)
1165 global%error = errorflag
1166 IF ( global%error /= err_none )
THEN
1167 CALL
errorstop(global,err_allocate,__line__,
'pGrid%tet2v')
1170 nullify(pgrid%tet2v)
1173 IF ( pgrid%nTetsTot > 0 )
THEN
1174 IF ( global%verbLevel > verbose_none )
THEN
1175 WRITE(stdout,
'(A,3X,A)') solver_name,
'Tetrahedra...'
1178 READ(ifile) ((pgrid%tet2v(
i,
j),
j=1,pgrid%nTetsTot),
i=1,4)
1180 READ(ifile) (dummyinteger,
i=1,pgrid%nTetsTot)
1184 READ(ifile) pgrid%nHexsTot
1188 IF ( pgrid%nHexsMax > 0 )
THEN
1189 ALLOCATE(pgrid%hex2v(8,pgrid%nHexsMax),stat=errorflag)
1190 global%error = errorflag
1191 IF ( global%error /= err_none )
THEN
1192 CALL
errorstop(global,err_allocate,__line__,
'pGrid%hex2v')
1195 nullify(pgrid%hex2v)
1198 IF ( pgrid%nHexsTot > 0 )
THEN
1199 IF ( global%verbLevel > verbose_none )
THEN
1200 WRITE(stdout,
'(A,3X,A)') solver_name,
'Hexahedra...'
1203 READ(ifile) ((pgrid%hex2v(
i,
j),
j=1,pgrid%nHexsTot),
i=1,8)
1205 READ(ifile) (dummyinteger,
i=1,pgrid%nHexsTot)
1209 READ(ifile) pgrid%nPrisTot
1213 IF ( pgrid%nPrisMax > 0 )
THEN
1214 ALLOCATE(pgrid%pri2v(6,pgrid%nPrisMax),stat=errorflag)
1215 global%error = errorflag
1216 IF ( global%error /= err_none )
THEN
1217 CALL
errorstop(global,err_allocate,__line__,
'pGrid%pri2v')
1220 nullify(pgrid%pri2v)
1223 IF ( pgrid%nPrisTot > 0 )
THEN
1224 IF ( global%verbLevel > verbose_none )
THEN
1225 WRITE(stdout,
'(A,3X,A)') solver_name,
'Prisms...'
1228 READ(ifile) ((pgrid%pri2v(
i,
j),
j=1,pgrid%nPrisTot),
i=1,6)
1230 READ(ifile) (dummyinteger,
i=1,pgrid%nPrisTot)
1234 READ(ifile) pgrid%nPyrsTot
1238 IF ( pgrid%nPyrsMax > 0 )
THEN
1239 ALLOCATE(pgrid%pyr2v(5,pgrid%nPyrsMax),stat=errorflag)
1240 global%error = errorflag
1241 IF ( global%error /= err_none )
THEN
1242 CALL
errorstop(global,err_allocate,__line__,
'pGrid%pyr2v')
1245 nullify(pgrid%pyr2v)
1248 IF ( pgrid%nPyrsTot > 0 )
THEN
1249 IF ( global%verbLevel > verbose_none )
THEN
1250 WRITE(stdout,
'(A,3X,A)') solver_name,
'Pyramids...'
1253 READ(ifile) ((pgrid%pyr2v(
i,
j),
j=1,pgrid%nPyrsTot),
i=1,5)
1255 READ(ifile) (dummyinteger,
i=1,pgrid%nPyrsTot)
1262 pgrid%nCellsTot = pgrid%nTetsTot + pgrid%nHexsTot + pgrid%nPrisTot &
1265 pgrid%nVert = pgrid%nVertTot
1266 pgrid%nCells = pgrid%nCellsTot
1267 pgrid%nTets = pgrid%nTetsTot
1268 pgrid%nHexs = pgrid%nHexsTot
1269 pgrid%nPris = pgrid%nPrisTot
1270 pgrid%nPyrs = pgrid%nPyrsTot
1276 IF ( global%verbLevel > verbose_none )
THEN
1277 WRITE(stdout,
'(A,3X,A)') solver_name,
'Boundary information...'
1280 READ(ifile) pgrid%nPatches
1282 IF ( pgrid%nPatches > 0 )
THEN
1283 ALLOCATE(gridcentaur%bInfo(3,pgrid%nPatches),stat=errorflag)
1284 global%error = errorflag
1285 IF ( global%error /= err_none )
THEN
1286 CALL
errorstop(global,err_allocate,__line__,
'gridCENTAUR%bInfo')
1289 READ(ifile) ((gridcentaur%bInfo(
i,
j),
j=1,pgrid%nPatches),
i=1,3)
1291 ALLOCATE(gridcentaur%bName(pgrid%nPatches),stat=errorflag)
1292 global%error = errorflag
1293 IF ( global%error /= err_none )
THEN
1294 CALL
errorstop(global,err_allocate,__line__,
'gridCENTAUR%bName')
1297 READ(ifile) (gridcentaur%bName(
i),
i=1,pgrid%nPatches)
1304 IF ( pgrid%nPatches > 0 )
THEN
1305 READ(ifile) gridcentaur%nBTris
1307 IF ( gridcentaur%nBTris > 0 )
THEN
1308 ALLOCATE(gridcentaur%bTri2v(3,gridcentaur%nBTris),stat=errorflag)
1309 global%error = errorflag
1310 IF ( global%error /= err_none )
THEN
1311 CALL
errorstop(global,err_allocate,__line__,
'gridCENTAUR%bTri2v')
1314 IF ( global%verbLevel > verbose_none )
THEN
1315 WRITE(stdout,
'(A,3X,A)') solver_name,
'Boundary triangles...'
1318 READ(ifile) ((gridcentaur%bTri2v(
i,
j),
j=1,gridcentaur%nBTris),
i=1,3)
1321 READ(ifile) gridcentaur%nBQuads
1323 IF ( gridcentaur%nBQuads > 0 )
THEN
1324 ALLOCATE(gridcentaur%bQuad2v(4,gridcentaur%nBQuads),stat=errorflag)
1325 global%error = errorflag
1326 IF ( global%error /= err_none )
THEN
1327 CALL
errorstop(global,err_allocate,__line__,
'gridCENTAUR%bQuad2v')
1330 IF ( global%verbLevel > verbose_none )
THEN
1331 WRITE(stdout,
'(A,3X,A)') solver_name,
'Boundary quadrilaterals...'
1334 READ(ifile) ((gridcentaur%bQuad2v(
i,
j),
j=1,gridcentaur%nBQuads),
i=1,4)
1337 gridcentaur%nBTris = 0
1338 gridcentaur%nBQuads = 0
1345 IF ( global%checkLevel > check_none )
THEN
1353 IF ( global%verbLevel > verbose_none )
THEN
1361 CLOSE(ifile, iostat=errorflag)
1362 global%error = errorflag
1363 IF ( global%error /= err_none )
THEN
1364 CALL
errorstop(global,err_file_close,__line__,ifilename)
1371 IF ( global%verbLevel > verbose_none )
THEN
1372 WRITE(stdout,
'(A,1X,A)') solver_name, &
1373 'Reading binary CENTAUR grid file done.'
subroutine, public rflu_sype_setsypepatchesflag(global)
subroutine rflu_checkgridcentaur(pRegion)
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine, public rflu_convcentaur2rocflu(pRegion)
subroutine buildfilenameplain(global, dest, ext, fileName)
subroutine, public rflu_readgridcentaurascii(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
INTEGER function, public rflu_setmaxdimension(global, nXyzTot)
subroutine, public rflu_readgridcentaurbinary(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine rflu_printgridcentaurinfo(pRegion)
subroutine deregisterfunction(global)