70 INTEGER,
PARAMETER,
PUBLIC :: WRITE_DIMENS_MODE_FORCE = 0, &
71 WRITE_DIMENS_MODE_MAYBE = 1
77 CHARACTER(CHRLEN),
PRIVATE :: RCSIdentString = &
78 '$RCSfile: RFLU_ModDimensions.F90,v $ $Revision: 1.15 $'
80 INTEGER,
PARAMETER,
PRIVATE :: ratioMax2Tot = 4
125 TYPE(t_region
),
POINTER :: pregion
131 CHARACTER(CHRLEN) :: ifilename,sectionstring,timestring1,timestring2
132 INTEGER :: errorflag,dummy,iborder,ipatch,ifile,loopcounter
133 REAL(RFREAL) :: currenttime
135 TYPE(t_grid),
POINTER :: pgrid
136 TYPE(t_patch),
POINTER :: ppatch
143 global => pregion%global
146 'RFLU_ModDimensions.F90')
148 IF ( global%myProcid == masterproc .AND. &
149 global%verbLevel >= verbose_high )
THEN
150 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading dimensions...'
155 IF ( (global%flowType == flow_unsteady) .AND. &
156 (pregion%mixtInput%moveGrid .EQV. .true.) )
THEN
167 IF ( global%timeStamp > 0.0_rfreal )
THEN
168 global%warnCounter = global%warnCounter + 1
170 IF ( global%myProcid == masterproc .AND. &
171 global%verbLevel >= verbose_none )
THEN
172 WRITE(stdout,
'(A,3X,A,1X,A)') solver_name,
'*** WARNING ***', &
173 'Hard-code - read file from time zero.'
177 currenttime = 0.0_rfreal
181 pregion%iRegionGlobal,currenttime, &
184 IF ( global%myProcid == masterproc .AND. &
185 global%verbLevel >= verbose_high )
THEN
186 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
187 pregion%iRegionGlobal
188 WRITE(stdout,
'(A,3X,A,1X,1PE11.5)') solver_name,
'Current time:', &
193 pregion%iRegionGlobal,ifilename)
195 IF ( global%myProcid == masterproc .AND. &
196 global%verbLevel >= verbose_high )
THEN
197 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
198 pregion%iRegionGlobal
202 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"OLD", &
204 global%error = errorflag
205 IF ( global%error /= err_none )
THEN
206 CALL
errorstop(global,err_file_open,__line__,trim(ifilename))
213 IF ( global%myProcid == masterproc .AND. &
214 global%verbLevel >= verbose_high )
THEN
215 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
218 READ(ifile,
'(A)') sectionstring
219 IF ( trim(sectionstring) /=
'# ROCFLU dimensions file' )
THEN
220 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
227 pgrid => pregion%grid
232 loopcounter = loopcounter + 1
234 READ(ifile,
'(A)') sectionstring
236 SELECT CASE ( trim(sectionstring) )
242 CASE (
'# Vertices' )
243 IF ( global%myProcid == masterproc .AND. &
244 global%verbLevel >= verbose_high )
THEN
245 WRITE(stdout,
'(A,3X,A)') solver_name,
'Vertices...'
248 READ(ifile,
'(3(I8))') pgrid%nVert,pgrid%nVertTot,pgrid%nVertMax
255 IF ( global%myProcid == masterproc .AND. &
256 global%verbLevel >= verbose_high )
THEN
257 WRITE(stdout,
'(A,3X,A)') solver_name,
'Cells...'
260 READ(ifile,
'(3(I8))') pgrid%nCells,pgrid%nCellsTot,pgrid%nCellsMax
266 CASE (
'# Tetrahedra' )
267 IF ( global%myProcid == masterproc .AND. &
268 global%verbLevel >= verbose_high )
THEN
269 WRITE(stdout,
'(A,3X,A)') solver_name,
'Tetrahedra...'
272 READ(ifile,
'(3(I8))') pgrid%nTets,pgrid%nTetsTot,pgrid%nTetsMax
278 CASE (
'# Hexahedra' )
279 IF ( global%myProcid == masterproc .AND. &
280 global%verbLevel >= verbose_high )
THEN
281 WRITE(stdout,
'(A,3X,A)') solver_name,
'Hexahedra...'
284 READ(ifile,
'(3(I8))') pgrid%nHexs,pgrid%nHexsTot,pgrid%nHexsMax
291 IF ( global%myProcid == masterproc .AND. &
292 global%verbLevel >= verbose_high )
THEN
293 WRITE(stdout,
'(A,3X,A)') solver_name,
'Prisms...'
296 READ(ifile,
'(3(I8))') pgrid%nPris,pgrid%nPrisTot,pgrid%nPrisMax
302 CASE (
'# Pyramids' )
303 IF ( global%myProcid == masterproc .AND. &
304 global%verbLevel >= verbose_high )
THEN
305 WRITE(stdout,
'(A,3X,A)') solver_name,
'Pyramids...'
308 READ(ifile,
'(3(I8))') pgrid%nPyrs,pgrid%nPyrsTot,pgrid%nPyrsMax
317 IF ( global%myProcid == masterproc .AND. &
318 global%verbLevel >= verbose_high )
THEN
319 WRITE(stdout,
'(A,3X,A)') solver_name,
'Patches...'
322 READ(ifile,
'(2(I8))') pgrid%nPatches,global%nPatches
324 IF ( pgrid%nPatches > patch_dimens_npatchmax )
THEN
325 CALL
errorstop(global,err_patch_dimens,__line__)
328 DO ipatch = 1,pgrid%nPatches
329 READ(ifile,
'(5(I8))',iostat=errorflag) &
330 pgrid%patchDimens(patch_dimens_ipglobal ,ipatch), &
331 pgrid%patchDimens(patch_dimens_nbtris ,ipatch), &
332 pgrid%patchDimens(patch_dimens_nbtristot ,ipatch), &
333 pgrid%patchDimens(patch_dimens_nbquads ,ipatch), &
334 pgrid%patchDimens(patch_dimens_nbquadstot ,ipatch)
336 pgrid%patchDimens(patch_dimens_nbtrismax,ipatch) = &
337 pgrid%patchDimens(patch_dimens_nbtristot,ipatch)
338 pgrid%patchDimens(patch_dimens_nbquadsmax,ipatch) = &
339 pgrid%patchDimens(patch_dimens_nbquadstot,ipatch)
340 pgrid%patchDimens(patch_dimens_nbcellsvirt,ipatch) = 0
347 CASE (
'# Patches (v2)' )
348 IF ( global%myProcid == masterproc .AND. &
349 global%verbLevel >= verbose_high )
THEN
350 WRITE(stdout,
'(A,3X,A)') solver_name,
'Patches...'
353 READ(ifile,
'(2(I8))') pgrid%nPatches,global%nPatches
355 IF ( pgrid%nPatches > patch_dimens_npatchmax )
THEN
356 CALL
errorstop(global,err_patch_dimens,__line__)
359 DO ipatch = 1,pgrid%nPatches
360 READ(ifile,
'(8(I8))',iostat=errorflag) &
361 pgrid%patchDimens(patch_dimens_ipglobal ,ipatch), &
362 pgrid%patchDimens(patch_dimens_nbtris ,ipatch), &
363 pgrid%patchDimens(patch_dimens_nbtristot ,ipatch), &
364 pgrid%patchDimens(patch_dimens_nbtrismax ,ipatch), &
365 pgrid%patchDimens(patch_dimens_nbquads ,ipatch), &
366 pgrid%patchDimens(patch_dimens_nbquadstot ,ipatch), &
367 pgrid%patchDimens(patch_dimens_nbquadsmax ,ipatch), &
368 pgrid%patchDimens(patch_dimens_nbcellsvirt,ipatch)
376 IF ( global%myProcid == masterproc .AND. &
377 global%verbLevel >= verbose_high )
THEN
378 WRITE(stdout,
'(A,3X,A)') solver_name,
'Borders...'
381 READ(ifile,
'(I8)') pgrid%nBorders
383 DO iborder = 1,pgrid%nBorders
384 READ(ifile,
'(7(I8))') &
385 pgrid%borderInfo(border_info_irglob,iborder), &
386 pgrid%borderInfo(border_info_ibord ,iborder), &
387 pgrid%borderInfo(border_info_ncsend,iborder), &
388 pgrid%borderInfo(border_info_ncrecv,iborder), &
389 pgrid%borderInfo(border_info_nvsend,iborder), &
390 pgrid%borderInfo(border_info_nvrecv,iborder), &
391 pgrid%borderInfo(border_info_nvshar,iborder)
399 IF ( global%myProcid == masterproc .AND. &
400 global%verbLevel >= verbose_high )
THEN
401 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
411 IF ( global%verbLevel >= verbose_high )
THEN
412 WRITE(stdout,
'(A,3X,A)') solver_name,sectionstring
415 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
423 IF ( loopcounter >= limit_infinite_loop )
THEN
424 CALL
errorstop(global,err_infinite_loop,__line__)
433 CLOSE(ifile,iostat=errorflag)
434 global%error = errorflag
435 IF ( global%myProcid == masterproc .AND. &
436 global%error /= err_none )
THEN
437 CALL
errorstop(global,err_file_close,__line__,ifilename)
444 IF ( global%myProcid == masterproc .AND. &
445 global%verbLevel >= verbose_high )
THEN
446 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading dimensions done.'
494 TYPE(t_region
),
POINTER :: pregion
506 global => pregion%global
509 'RFLU_ModDimensions.F90')
524 IF ( global%plagUsed .EQV. .true. )
THEN
571 INTEGER,
INTENT(IN) :: nxyztot
578 IF ( (global%moduleType == module_type_part) .AND. &
579 (global%syPePatchesFlag .EQV. .true.) )
THEN
625 TYPE(t_region
),
POINTER :: pregion
633 TYPE(t_grid),
POINTER :: pgrid
634 TYPE(t_patch),
POINTER :: ppatch
640 global => pregion%global
643 'RFLU_ModDimensions.F90')
645 IF ( global%myProcid == masterproc .AND. &
646 global%verbLevel >= verbose_high )
THEN
647 WRITE(stdout,
'(A,1X,A)') solver_name,
'Setting maximum dimensions...'
654 pgrid => pregion%grid
660 IF ( global%myProcid == masterproc .AND. &
661 global%verbLevel >= verbose_high )
THEN
662 WRITE(stdout,
'(A,3X,A,1X,I2)') solver_name,
'Ratio:',ratiomax2tot
669 pgrid%nVertMax = ratiomax2tot*pgrid%nVertTot
671 pgrid%nTetsMax = ratiomax2tot*pgrid%nTetsTot
672 pgrid%nHexsMax = ratiomax2tot*pgrid%nHexsTot
673 pgrid%nPrisMax = ratiomax2tot*pgrid%nPrisTot
674 pgrid%nPyrsMax = ratiomax2tot*pgrid%nPyrsTot
676 pgrid%nCellsMax = pgrid%nTetsMax &
681 DO ipatch = 1,pgrid%nPatches
682 ppatch => pregion%patches(ipatch)
684 ppatch%nBTrisMax = ratiomax2tot*ppatch%nBTrisTot
685 ppatch%nBQuadsMax = ratiomax2tot*ppatch%nBQuadsTot
692 IF ( global%myProcid == masterproc .AND. &
693 global%verbLevel >= verbose_high)
THEN
694 WRITE(stdout,
'(A,1X,A)') solver_name,
'Setting maximum dimensions done.'
735 TYPE(t_region
),
POINTER :: pregion
741 CHARACTER(CHRLEN) :: ifilename,sectionstring
742 INTEGER :: errorflag,iborder,ipatch,ifile
744 TYPE(t_grid),
POINTER :: pgrid
745 TYPE(t_patch),
POINTER :: ppatch
751 global => pregion%global
754 'RFLU_ModDimensions.F90')
756 IF ( global%myProcid == masterproc .AND. &
757 global%verbLevel >= verbose_med )
THEN
758 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing dimensions...'
763 IF ( global%flowType == flow_unsteady .AND. &
764 (pregion%mixtInput%moveGrid .EQV. .true.) )
THEN
766 pregion%iRegionGlobal,global%currentTime, &
769 IF ( global%myProcid == masterproc .AND. &
770 global%verbLevel >= verbose_high )
THEN
771 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
772 pregion%iRegionGlobal
773 WRITE(stdout,
'(A,3X,A,1X,1PE11.5)') solver_name,
'Current time:', &
778 pregion%iRegionGlobal,ifilename)
780 IF ( global%myProcid == masterproc .AND. &
781 global%verbLevel >= verbose_high )
THEN
782 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
783 pregion%iRegionGlobal
787 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"UNKNOWN", &
789 global%error = errorflag
790 IF ( global%error /= err_none )
THEN
791 CALL
errorstop(global,err_file_open,__line__,ifilename)
798 IF ( global%myProcid == masterproc .AND. &
799 global%verbLevel >= verbose_high )
THEN
800 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
803 sectionstring =
'# ROCFLU dimensions file'
804 WRITE(ifile,
'(A)') trim(sectionstring)
810 pgrid => pregion%grid
812 sectionstring =
'# Vertices'
813 WRITE(ifile,
'(A)') trim(sectionstring)
814 WRITE(ifile,
'(3(I8))') pgrid%nVert,pgrid%nVertTot,pgrid%nVertMax
816 sectionstring =
'# Cells'
817 WRITE(ifile,
'(A)') trim(sectionstring)
818 WRITE(ifile,
'(3(I8))') pgrid%nCells,pgrid%nCellsTot,pgrid%nCellsMax
820 sectionstring =
'# Tetrahedra'
821 WRITE(ifile,
'(A)') trim(sectionstring)
822 WRITE(ifile,
'(3(I8))') pgrid%nTets,pgrid%nTetsTot,pgrid%nTetsMax
824 sectionstring =
'# Hexahedra'
825 WRITE(ifile,
'(A)') trim(sectionstring)
826 WRITE(ifile,
'(3(I8))') pgrid%nHexs,pgrid%nHexsTot,pgrid%nHexsMax
828 sectionstring =
'# Prisms'
829 WRITE(ifile,
'(A)') trim(sectionstring)
830 WRITE(ifile,
'(3(I8))') pgrid%nPris,pgrid%nPrisTot,pgrid%nPrisMax
832 sectionstring =
'# Pyramids'
833 WRITE(ifile,
'(A)') trim(sectionstring)
834 WRITE(ifile,
'(3(I8))') pgrid%nPyrs,pgrid%nPyrsTot,pgrid%nPyrsMax
836 sectionstring =
'# Patches (v2)'
837 WRITE(ifile,
'(A)') trim(sectionstring)
838 WRITE(ifile,
'(2(I8))') pgrid%nPatches,global%nPatches
840 DO ipatch = 1,pgrid%nPatches
841 ppatch => pregion%patches(ipatch)
843 WRITE(ifile,
'(8(I8))') ppatch%iPatchGlobal, &
844 ppatch%nBTris,ppatch%nBTrisTot, &
845 ppatch%nBTrisMax,ppatch%nBQuads, &
846 ppatch%nBQuadsTot,ppatch%nBQuadsMax, &
851 sectionstring =
'# Borders'
852 WRITE(ifile,
'(A)') trim(sectionstring)
853 WRITE(ifile,
'(I8)') pgrid%nBorders
855 DO iborder = 1,pgrid%nBorders
856 pborder => pgrid%borders(iborder)
858 WRITE(ifile,
'(7(I8))') pborder%iRegionGlobal,pborder%iBorder, &
859 pborder%nCellsSend,pborder%nCellsRecv, &
860 pborder%nVertSend,pborder%nVertRecv, &
868 IF ( global%myProcid == masterproc .AND. &
869 global%verbLevel >= verbose_high )
THEN
870 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
873 sectionstring =
'# End'
874 WRITE(ifile,
'(A)') trim(sectionstring)
880 CLOSE(ifile,iostat=errorflag)
881 global%error = errorflag
882 IF ( global%myProcid == masterproc .AND. &
883 global%error /= err_none )
THEN
884 CALL
errorstop(global,err_file_close,__line__,ifilename)
890 IF ( global%myProcid == masterproc .AND. &
891 global%verbLevel >= verbose_high )
THEN
892 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing dimensions done.'
941 TYPE(t_region
),
POINTER :: pregion
947 CHARACTER(CHRLEN) :: dummystring,ifilename,sectionstring
948 INTEGER :: errorflag,iborder,ipatch,ifile,loopcounter
950 TYPE(t_grid),
POINTER :: pgrid
951 TYPE(t_patch),
POINTER :: ppatch
958 global => pregion%global
961 'RFLU_ModDimensions.F90')
963 IF ( global%myProcid == masterproc .AND. &
964 global%verbLevel >= verbose_med )
THEN
965 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing border dimensions...'
970 IF ( global%flowType == flow_unsteady .AND. &
971 (pregion%mixtInput%moveGrid .EQV. .true.) )
THEN
973 pregion%iRegionGlobal,global%currentTime, &
976 IF ( global%myProcid == masterproc .AND. &
977 global%verbLevel >= verbose_high )
THEN
978 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
979 pregion%iRegionGlobal
980 WRITE(stdout,
'(A,3X,A,1X,1PE11.5)') solver_name,
'Current time:', &
985 pregion%iRegionGlobal,ifilename)
987 IF ( global%myProcid == masterproc .AND. &
988 global%verbLevel >= verbose_high )
THEN
989 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
990 pregion%iRegionGlobal
994 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"OLD", &
996 global%error = errorflag
997 IF ( global%error /= err_none )
THEN
998 CALL
errorstop(global,err_file_open,__line__,ifilename)
1005 pgrid => pregion%grid
1010 loopcounter = loopcounter + 1
1012 READ(ifile,
'(A)') dummystring
1014 SELECT CASE ( trim(dummystring) )
1021 CASE (
'# Borders' )
1022 WRITE(ifile,
'(I8)') pgrid%nBorders
1024 DO iborder = 1,pgrid%nBorders
1025 pborder => pgrid%borders(iborder)
1027 WRITE(ifile,
'(7(I8))') pborder%iRegionGlobal,pborder%iBorder, &
1028 pborder%nCellsSend,pborder%nCellsRecv, &
1029 pborder%nVertSend,pborder%nVertRecv, &
1033 sectionstring =
'# End'
1034 WRITE(ifile,
'(A)') trim(sectionstring)
1044 IF ( global%myProcid == masterproc .AND. &
1045 global%verbLevel >= verbose_high )
THEN
1046 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
1049 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
1056 IF ( loopcounter >= limit_infinite_loop )
THEN
1057 CALL
errorstop(global,err_infinite_loop,__line__)
1065 CLOSE(ifile,iostat=errorflag)
1066 global%error = errorflag
1067 IF ( global%myProcid == masterproc .AND. &
1068 global%error /= err_none )
THEN
1069 CALL
errorstop(global,err_file_close,__line__,ifilename)
1076 IF ( global%myProcid == masterproc .AND. &
1077 global%verbLevel >= verbose_high )
THEN
1078 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing border dimensions done.'
1130 INTEGER,
INTENT(IN) :: writemode
1131 TYPE(t_region
),
POINTER :: pregion
1143 global => pregion%global
1146 'RFLU_ModDimensions.F90')
1155 IF ( writemode == write_dimens_mode_force )
THEN
1158 IF ( pregion%mixtInput%moveGrid .EQV. .true. )
THEN
1167 IF ( global%plagUsed .EQV. .true. )
THEN
subroutine buildfilenamebasic(global, dest, ext, id, fileName)
subroutine, public rflu_readdimensionswrapper(pRegion)
subroutine, public rflu_writedimensionswrapper(pRegion, writeMode)
subroutine, public rflu_genx_getdimensions(pRegion)
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine, public rflu_setmaxdimensions(pRegion)
subroutine, public plag_rflu_readdimensions(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_readdimensions(pRegion)
subroutine, public rflu_writedimensions(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine, public rflu_writedimensionsborders(pRegion)
subroutine, public plag_rflu_writedimensions(pRegion)
subroutine deregisterfunction(global)
LOGICAL function, public rflu_genx_decidewritefile(global)
subroutine buildfilenameunsteady(global, dest, ext, id, tm, fileName)