60 CHARACTER(CHRLEN) :: RCSIdentString = &
61 '$RCSfile: RFLU_ModReadWriteGridSpeeds.F90,v $ $Revision: 1.3 $'
106 TYPE(t_region
),
POINTER :: pregion
112 CHARACTER(CHRLEN) :: ifilename,sectionstring,timestring1,timestring2
113 INTEGER :: errorflag,ifile,ifg,ifl,ipatch,loopcounter,
nfaces,p,
r
114 REAL(RFREAL) :: currenttime
115 TYPE(t_grid),
POINTER :: pgrid
116 TYPE(t_patch),
POINTER :: ppatch
123 global => pregion%global
126 'RFLU_ModReadWriteGridSpeeds.F90')
128 IF ( global%myProcid == masterproc .AND. &
129 global%verbLevel >= verbose_high )
THEN
130 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading ASCII grid speeds file...'
135 IF ( global%flowType == flow_unsteady .AND. &
136 (pregion%mixtInput%moveGrid .EQV. .true.) )
THEN
138 pregion%iRegionGlobal,global%currentTime, &
141 IF ( global%myProcid == masterproc .AND. &
142 global%verbLevel >= verbose_high )
THEN
143 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
144 pregion%iRegionGlobal
145 WRITE(stdout,
'(A,3X,A,1X,1PE11.5)') solver_name,
'Current time:', &
150 pregion%iRegionGlobal,ifilename)
152 IF ( global%myProcid == masterproc .AND. &
153 global%verbLevel >= verbose_high )
THEN
154 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
155 pregion%iRegionGlobal
159 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"OLD",iostat=errorflag)
160 global%error = errorflag
161 IF ( global%error /= err_none )
THEN
162 CALL
errorstop(global,err_file_open,__line__,ifilename)
169 IF ( global%myProcid == masterproc .AND. &
170 global%verbLevel >= verbose_high)
THEN
171 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
174 READ(ifile,
'(A)') sectionstring
175 IF ( trim(sectionstring) /=
'# ROCFLU grid speeds file' )
THEN
176 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
183 READ(ifile,
'(A)') sectionstring
184 IF ( trim(sectionstring) /=
'# Precision and range' )
THEN
185 CALL
errorstop(global,err_invalid_marker,__line__,ifilename)
188 READ(ifile,
'(2(I8))') p,
r
189 IF ( p <
precision(1.0_rfreal) .OR.
r < range(1.0_rfreal) )
THEN
190 CALL
errorstop(global,err_prec_range,__line__)
197 READ(ifile,
'(A)') sectionstring
198 IF ( trim(sectionstring) /=
'# Physical time' )
THEN
199 CALL
errorstop(global,err_invalid_marker,__line__,ifilename)
202 READ(ifile,
'(E23.16)') currenttime
204 IF ( global%flowType == flow_unsteady .AND. &
205 (pregion%mixtInput%moveGrid .EQV. .true.) )
THEN
206 IF ( global%currentTime < 0.0_rfreal )
THEN
207 global%currentTime = currenttime
209 WRITE(timestring1,
'(1PE11.5)') global%currentTime
210 WRITE(timestring2,
'(1PE11.5)') currenttime
211 IF ( trim(timestring1) /= trim(timestring2) )
THEN
212 CALL
errorstop(global,err_time_solution,__line__,trim(ifilename))
221 READ(ifile,
'(A)') sectionstring
222 IF ( trim(sectionstring) /=
'# Dimensions' )
THEN
223 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
226 pgrid => pregion%grid
234 IF (
nfaces /= pgrid%nFaces )
THEN
235 CALL
errorstop(global,err_dimens_invalid,__line__)
245 loopcounter = loopcounter + 1
247 READ(ifile,
'(A)') sectionstring
249 SELECT CASE ( trim(sectionstring) )
255 CASE (
'# Grid speeds' )
256 IF ( global%myProcid == masterproc .AND. &
257 global%verbLevel >= verbose_high)
THEN
258 WRITE(stdout,
'(A,3X,A)') solver_name,
'Grid speeds...'
261 IF ( pgrid%nFaces > 0 )
THEN
262 READ(ifile,
'(5(E23.16))') (pgrid%gs(ifg),ifg=1,pgrid%nFaces)
265 DO ipatch = 1,pgrid%nPatches
266 ppatch => pregion%patches(ipatch)
268 IF ( ppatch%nBFaces > 0 )
THEN
269 READ(ifile,
'(5(E23.16))') (ppatch%gs(ifl),ifl=1,ppatch%nBFaces)
278 IF ( global%myProcid == masterproc .AND. &
279 global%verbLevel >= verbose_high)
THEN
280 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
290 IF ( global%verbLevel >= verbose_high)
THEN
291 WRITE(stdout,
'(3X,A)') sectionstring
294 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
302 IF ( loopcounter >= limit_infinite_loop )
THEN
303 CALL
errorstop(global,err_infinite_loop,__line__)
312 CLOSE(ifile,iostat=errorflag)
313 global%error = errorflag
314 IF ( global%error /= err_none )
THEN
315 CALL
errorstop(global,err_file_close,__line__,ifilename)
322 IF ( global%myProcid == masterproc .AND. &
323 global%verbLevel >= verbose_high )
THEN
324 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading ASCII grid speeds file done.'
367 TYPE(t_region
),
POINTER :: pregion
373 CHARACTER(CHRLEN) :: ifilename,sectionstring,timestring1,timestring2
374 INTEGER :: errorflag,ifile,ifg,ifl,ipatch,loopcounter,
nfaces,p,
r
375 REAL(RFREAL) :: currenttime
376 TYPE(t_grid),
POINTER :: pgrid
377 TYPE(t_patch),
POINTER :: ppatch
384 global => pregion%global
387 'RFLU_ModReadWriteGridSpeeds.F90')
389 IF ( global%myProcid == masterproc .AND. &
390 global%verbLevel >= verbose_high )
THEN
391 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading binary grid speeds file...'
396 IF ( global%flowType == flow_unsteady .AND. &
397 (pregion%mixtInput%moveGrid .EQV. .true.) )
THEN
399 pregion%iRegionGlobal,global%currentTime, &
402 IF ( global%myProcid == masterproc .AND. &
403 global%verbLevel >= verbose_high )
THEN
404 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
405 pregion%iRegionGlobal
406 WRITE(stdout,
'(A,3X,A,1X,1PE11.5)') solver_name,
'Current time:', &
411 pregion%iRegionGlobal,ifilename)
413 IF ( global%myProcid == masterproc .AND. &
414 global%verbLevel >= verbose_high )
THEN
415 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
416 pregion%iRegionGlobal
420 OPEN(ifile,file=ifilename,
form=
"UNFORMATTED",
status=
"OLD",iostat=errorflag)
421 global%error = errorflag
422 IF ( global%error /= err_none )
THEN
423 CALL
errorstop(global,err_file_open,__line__,ifilename)
430 IF ( global%myProcid == masterproc .AND. &
431 global%verbLevel >= verbose_high)
THEN
432 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
435 READ(ifile) sectionstring
436 IF ( trim(sectionstring) /=
'# ROCFLU grid speeds file' )
THEN
437 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
444 READ(ifile) sectionstring
445 IF ( trim(sectionstring) /=
'# Precision and range' )
THEN
446 CALL
errorstop(global,err_invalid_marker,__line__,ifilename)
450 IF ( p <
precision(1.0_rfreal) .OR.
r < range(1.0_rfreal) )
THEN
451 CALL
errorstop(global,err_prec_range,__line__)
458 READ(ifile) sectionstring
459 IF ( trim(sectionstring) /=
'# Physical time' )
THEN
460 CALL
errorstop(global,err_invalid_marker,__line__,ifilename)
463 READ(ifile) currenttime
465 IF ( global%flowType == flow_unsteady .AND. &
466 (pregion%mixtInput%moveGrid .EQV. .true.) )
THEN
467 IF ( global%currentTime < 0.0_rfreal )
THEN
468 global%currentTime = currenttime
470 WRITE(timestring1,
'(1PE11.5)') global%currentTime
471 WRITE(timestring2,
'(1PE11.5)') currenttime
472 IF ( trim(timestring1) /= trim(timestring2) )
THEN
473 CALL
errorstop(global,err_time_solution,__line__,trim(ifilename))
482 READ(ifile) sectionstring
483 IF ( trim(sectionstring) /=
'# Dimensions' )
THEN
484 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
487 pgrid => pregion%grid
495 IF (
nfaces /= pgrid%nFaces )
THEN
496 CALL
errorstop(global,err_dimens_invalid,__line__)
506 loopcounter = loopcounter + 1
508 READ(ifile) sectionstring
510 SELECT CASE ( trim(sectionstring) )
516 CASE (
'# Grid speeds' )
517 IF ( global%myProcid == masterproc .AND. &
518 global%verbLevel >= verbose_high)
THEN
519 WRITE(stdout,
'(A,3X,A)') solver_name,
'Grid speeds...'
522 IF ( pgrid%nFaces > 0 )
THEN
523 READ(ifile) (pgrid%gs(ifg),ifg=1,pgrid%nFaces)
526 DO ipatch = 1,pgrid%nPatches
527 ppatch => pregion%patches(ipatch)
529 IF ( ppatch%nBFaces > 0 )
THEN
530 READ(ifile) (ppatch%gs(ifl),ifl=1,ppatch%nBFaces)
539 IF ( global%myProcid == masterproc .AND. &
540 global%verbLevel >= verbose_high)
THEN
541 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
551 IF ( global%verbLevel >= verbose_high)
THEN
552 WRITE(stdout,
'(3X,A)') sectionstring
555 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
563 IF ( loopcounter >= limit_infinite_loop )
THEN
564 CALL
errorstop(global,err_infinite_loop,__line__)
573 CLOSE(ifile,iostat=errorflag)
574 global%error = errorflag
575 IF ( global%error /= err_none )
THEN
576 CALL
errorstop(global,err_file_close,__line__,ifilename)
583 IF ( global%myProcid == masterproc .AND. &
584 global%verbLevel >= verbose_high )
THEN
585 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading binary grid speeds file done.'
630 TYPE(t_region
),
POINTER :: pregion
642 global => pregion%global
645 'RFLU_ModReadWriteGridSpeeds.F90')
652 IF ( global%gridFormat == format_ascii )
THEN
654 ELSE IF ( global%gridFormat == format_binary )
THEN
657 CALL
errorstop(global,err_reached_default,__line__)
707 TYPE(t_region
),
POINTER :: pregion
713 CHARACTER(CHRLEN) :: ifilename,sectionstring
714 INTEGER :: errorflag,ifile,ifg,ifl,ipatch
715 TYPE(t_grid),
POINTER :: pgrid
716 TYPE(t_patch),
POINTER :: ppatch
723 global => pregion%global
726 'RFLU_ModReadWriteGridSpeeds.F90')
728 IF ( global%myProcid == masterproc .AND. &
729 global%verbLevel >= verbose_low )
THEN
730 WRITE(stdout,
'(A,1X,A)') solver_name
731 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing ASCII grid speeds file...'
736 IF ( global%flowType == flow_unsteady .AND. &
737 (pregion%mixtInput%moveGrid .EQV. .true.) )
THEN
739 pregion%iRegionGlobal,global%currentTime, &
742 IF ( global%myProcid == masterproc .AND. &
743 global%verbLevel >= verbose_high )
THEN
744 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
745 pregion%iRegionGlobal
746 WRITE(stdout,
'(A,3X,A,1X,1PE11.5)') solver_name,
'Current time:', &
751 pregion%iRegionGlobal,ifilename)
753 IF ( global%myProcid == masterproc .AND. &
754 global%verbLevel >= verbose_high )
THEN
755 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
756 pregion%iRegionGlobal
760 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"UNKNOWN", &
762 global%error = errorflag
763 IF ( global%error /= err_none )
THEN
764 CALL
errorstop(global,err_file_open,__line__,ifilename)
771 IF ( global%myProcid == masterproc .AND. &
772 global%verbLevel >= verbose_med)
THEN
773 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
776 sectionstring =
'# ROCFLU grid speeds file'
777 WRITE(ifile,
'(A)') trim(sectionstring)
779 sectionstring =
'# Precision and range'
780 WRITE(ifile,
'(A)') trim(sectionstring)
781 WRITE(ifile,
'(2(I8))')
precision(1.0_rfreal),range(1.0_rfreal)
783 sectionstring =
'# Physical time'
784 WRITE(ifile,
'(A)') trim(sectionstring)
785 WRITE(ifile,
'(E23.16)') global%currentTime
791 pgrid => pregion%grid
793 sectionstring =
'# Dimensions'
794 WRITE(ifile,
'(A)') trim(sectionstring)
795 WRITE(ifile,
'(I8)') pgrid%nFaces
801 IF ( pregion%mixtInput%moveGrid .EQV. .true. )
THEN
802 IF ( global%myProcid == masterproc .AND. &
803 global%verbLevel >= verbose_med)
THEN
804 WRITE(stdout,
'(A,3X,A)') solver_name,
'Grid speeds...'
807 sectionstring =
'# Grid speeds'
808 WRITE(ifile,
'(A)') trim(sectionstring)
810 IF ( pgrid%nFaces > 0 )
THEN
811 WRITE(ifile,
'(5(E23.16))') (pgrid%gs(ifg),ifg=1,pgrid%nFaces)
814 DO ipatch = 1,pgrid%nPatches
815 ppatch => pregion%patches(ipatch)
817 IF ( ppatch%nBFaces > 0 )
THEN
818 WRITE(ifile,
'(5(E23.16))') (ppatch%gs(ifl),ifl=1,ppatch%nBFaces)
827 IF ( global%myProcid == masterproc .AND. &
828 global%verbLevel >= verbose_med)
THEN
829 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
832 sectionstring =
'# End'
833 WRITE(ifile,
'(A)') trim(sectionstring)
839 CLOSE(ifile,iostat=errorflag)
840 global%error = errorflag
841 IF ( global%myProcid == masterproc .AND. &
842 global%error /= err_none )
THEN
843 CALL
errorstop(global,err_file_close,__line__,ifilename)
850 IF ( global%myProcid == masterproc .AND. &
851 global%verbLevel >= verbose_med )
THEN
852 WRITE(stdout,
'(A,1X,A)') solver_name, &
853 'Writing ASCII grid speeds file done.'
854 WRITE(stdout,
'(A,1X,A)') solver_name
896 TYPE(t_region
),
POINTER :: pregion
902 CHARACTER(CHRLEN) :: ifilename,sectionstring
903 INTEGER :: errorflag,ifile,ifg,ifl,ipatch
904 TYPE(t_grid),
POINTER :: pgrid
905 TYPE(t_patch),
POINTER :: ppatch
912 global => pregion%global
915 'RFLU_ModReadWriteGridSpeeds.F90')
917 IF ( global%myProcid == masterproc .AND. &
918 global%verbLevel >= verbose_low )
THEN
919 WRITE(stdout,
'(A,1X,A)') solver_name
920 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing binary grid speeds file...'
925 IF ( global%flowType == flow_unsteady .AND. &
926 (pregion%mixtInput%moveGrid .EQV. .true.) )
THEN
928 pregion%iRegionGlobal,global%currentTime, &
931 IF ( global%myProcid == masterproc .AND. &
932 global%verbLevel >= verbose_high )
THEN
933 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
934 pregion%iRegionGlobal
935 WRITE(stdout,
'(A,3X,A,1X,1PE11.5)') solver_name,
'Current time:', &
940 pregion%iRegionGlobal,ifilename)
942 IF ( global%myProcid == masterproc .AND. &
943 global%verbLevel >= verbose_high )
THEN
944 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
945 pregion%iRegionGlobal
949 OPEN(ifile,file=ifilename,
form=
"UNFORMATTED",
status=
"UNKNOWN", &
951 global%error = errorflag
952 IF ( global%error /= err_none )
THEN
953 CALL
errorstop(global,err_file_open,__line__,ifilename)
960 IF ( global%myProcid == masterproc .AND. &
961 global%verbLevel >= verbose_med)
THEN
962 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
965 sectionstring =
'# ROCFLU grid speeds file'
966 WRITE(ifile) sectionstring
968 sectionstring =
'# Precision and range'
969 WRITE(ifile) sectionstring
970 WRITE(ifile)
precision(1.0_rfreal),range(1.0_rfreal)
972 sectionstring =
'# Physical time'
973 WRITE(ifile) sectionstring
974 WRITE(ifile) global%currentTime
980 pgrid => pregion%grid
982 sectionstring =
'# Dimensions'
983 WRITE(ifile) sectionstring
984 WRITE(ifile) pgrid%nFaces
990 IF ( pregion%mixtInput%moveGrid .EQV. .true. )
THEN
991 IF ( global%myProcid == masterproc .AND. &
992 global%verbLevel >= verbose_med)
THEN
993 WRITE(stdout,
'(A,3X,A)') solver_name,
'Grid speeds...'
996 sectionstring =
'# Grid speeds'
997 WRITE(ifile) sectionstring
999 IF ( pgrid%nFaces > 0 )
THEN
1000 WRITE(ifile) (pgrid%gs(ifg),ifg=1,pgrid%nFaces)
1003 DO ipatch = 1,pgrid%nPatches
1004 ppatch => pregion%patches(ipatch)
1006 IF ( ppatch%nBFaces > 0 )
THEN
1007 WRITE(ifile) (ppatch%gs(ifl),ifl=1,ppatch%nBFaces)
1016 IF ( global%myProcid == masterproc .AND. &
1017 global%verbLevel >= verbose_med)
THEN
1018 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
1021 sectionstring =
'# End'
1022 WRITE(ifile) sectionstring
1028 CLOSE(ifile,iostat=errorflag)
1029 global%error = errorflag
1030 IF ( global%myProcid == masterproc .AND. &
1031 global%error /= err_none )
THEN
1032 CALL
errorstop(global,err_file_close,__line__,ifilename)
1039 IF ( global%myProcid == masterproc .AND. &
1040 global%verbLevel >= verbose_med )
THEN
1041 WRITE(stdout,
'(A,1X,A)') solver_name, &
1042 'Writing binary grid speeds file done.'
1043 WRITE(stdout,
'(A,1X,A)') solver_name
1088 TYPE(t_region
),
POINTER :: pregion
1100 global => pregion%global
1103 'RFLU_ModReadWriteGridSpeeds.F90')
1112 IF ( global%gridFormat == format_ascii )
THEN
1114 ELSE IF ( global%gridFormat == format_binary )
THEN
1117 CALL
errorstop(global,err_reached_default,__line__)
subroutine buildfilenamebasic(global, dest, ext, id, fileName)
subroutine rflu_readgridspeedsbinary(pRegion)
subroutine rflu_writegridspeedsbinary(pRegion)
subroutine, public rflu_writegridspeedswrapper(pRegion)
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine, public rflu_readgridspeedswrapper(pRegion)
subroutine, public rflu_genx_getdatagspeedssurf(pRegion)
subroutine, public rflu_genx_putdatagspeedssurf(pRegion)
subroutine, public rflu_genx_getdatagspeedsvol(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 rflu_writegridspeedsascii(pRegion)
subroutine rflu_readgridspeedsascii(pRegion)
subroutine, public rflu_genx_putdatagspeedsvol(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)
LOGICAL function, public rflu_genx_decidewritefile(global)
subroutine buildfilenameunsteady(global, dest, ext, id, tm, fileName)