66 CHARACTER(CHRLEN),
PARAMETER,
PRIVATE :: &
67 RCSIdentString =
'$RCSfile: RFLU_ModENSIGHT.F90,v $ $Revision: 1.6 $'
69 INTEGER,
PRIVATE :: nScalars,nScalars1,nVectors,partNumber,partNumberSave
73 CHARACTER(CHRLEN) :: iFileName,varName,varNameShort
78 TYPE(t_var_info),
DIMENSION(:),
ALLOCATABLE :: scalarInfo
79 TYPE(t_var_info),
DIMENSION(:),
ALLOCATABLE :: vectorInfo
134 INTEGER,
INTENT(IN) :: iserver
135 TYPE(t_region
),
POINTER :: pregion
141 CHARACTER(CHRLEN) :: dummystring
142 INTEGER :: errorflag,ifileoffs,ipv,ipv2,iscalar,iscalaroffs,ivector
149 global => pregion%global
152 'RFLU_ModENSIGHT.F90')
154 IF ( global%verbLevel > verbose_low )
THEN
155 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building ENSIGHT data info...'
173 IF ( pregion%plot%nPv > 0 )
THEN
174 nscalars = nscalars + pregion%plot%nPv
186 IF ( global%specUsed .EQV. .true. )
THEN
187 nscalars = nscalars + global%nSpecies
195 ALLOCATE(scalarinfo(nscalars),stat=errorflag)
196 global%error = errorflag
197 IF ( global%error /= err_none )
THEN
198 CALL
errorstop(global,err_allocate,__line__,
'scalarInfo')
201 ALLOCATE(vectorinfo(nvectors),stat=errorflag)
202 global%error = errorflag
203 IF ( global%error /= err_none )
THEN
204 CALL
errorstop(global,err_allocate,__line__,
'vectorInfo')
222 IF ( pregion%plot%nPv > 0 )
THEN
223 nscalars = nscalars + pregion%plot%nPv
230 scalarinfo(1)%varName =
'Density'
231 scalarinfo(2)%varName =
'Energy'
232 scalarinfo(3)%varName =
'Pressure'
233 scalarinfo(4)%varName =
'Temperature'
234 scalarinfo(5)%varName =
'Soundspeed'
236 scalarinfo(1)%varNameShort =
'r'
237 scalarinfo(2)%varNameShort =
'rE'
238 scalarinfo(3)%varNameShort =
'p'
239 scalarinfo(4)%varNameShort =
'T'
240 scalarinfo(5)%varNameShort =
'a'
245 IF ( pregion%plot%nPv > 0 )
THEN
246 DO ipv = 1,pregion%plot%nPv
247 ipv2 = pregion%plot%pvi2pv(ipv)
251 scalarinfo(nscalars1+iscalar)%varName = pregion%plot%pvNameLong(ipv2)
252 scalarinfo(nscalars1+iscalar)%varNameShort = pregion%plot%pvNameShort(ipv2)
256 scalarinfo(1)%iFile = if_ens_scalar
257 scalarinfo(2)%iFile = if_ens_scalar + 1
258 scalarinfo(3)%iFile = if_ens_scalar + 2
259 scalarinfo(4)%iFile = if_ens_scalar + 3
260 scalarinfo(5)%iFile = if_ens_scalar + 4
264 IF ( pregion%plot%nPv > 0 )
THEN
265 DO iscalar=1,pregion%plot%nPv
266 scalarinfo(5+iscalar)%iFile = if_ens_scalar + nscalars1 + iscalar - 1
272 IF ( pregion%plot%nPv > 0 )
THEN
273 iscalaroffs = iscalaroffs + pregion%plot%nPv
280 vectorinfo(1)%varName =
'Momentum'
282 vectorinfo(1)%varNameShort =
'rv'
284 vectorinfo(1)%iFile = if_ens_vector
290 ifileoffs = scalarinfo(iscalaroffs)%iFile
297 IF ( global%specUsed .EQV. .true. )
THEN
298 DO iscalar = 1,global%nSpecies
299 WRITE(dummystring,
'(A,I2.2)')
'Density',iscalar
300 scalarinfo(iscalar+iscalaroffs)%varName = trim(dummystring)
302 WRITE(dummystring,
'(A,I2.2)')
'rY',iscalar
303 scalarinfo(iscalar+iscalaroffs)%varNameShort = trim(dummystring)
305 scalarinfo(iscalar+iscalaroffs)%iFile = iscalar + ifileoffs
308 iscalaroffs = iscalaroffs + global%nSpecies
309 nscalars = nscalars + global%nSpecies
317 IF ( global%verbLevel > verbose_low )
THEN
318 WRITE(stdout,
'(A,3X,A,1X,I2)') solver_name,
'Server:',iserver
319 WRITE(stdout,
'(A,3X,A)') solver_name,
'Scalar variables:'
320 WRITE(stdout,
'(A,5X,A,2X,A,2X,A,26X,A)') solver_name,
'#',
'Index', &
321 'Long name',
'Short name'
323 DO iscalar = 1,nscalars
324 WRITE(stdout,
'(A,4X,I2,3X,I3,3X,A32,3X,A5)') &
325 solver_name,iscalar,scalarinfo(iscalar)%iFile, &
326 adjustl(scalarinfo(iscalar)%varName), &
327 adjustl(scalarinfo(iscalar)%varNameShort)
330 WRITE(stdout,
'(A,3X,A)') solver_name,
'Vector variables:'
331 WRITE(stdout,
'(A,5X,A,2X,A,2X,A,26X,A)') solver_name,
'#',
'Index', &
332 'Long name',
'Short name'
334 DO ivector = 1,nvectors
335 WRITE(stdout,
'(A,4X,I2,3X,I3,3X,A32,3X,A5)') &
336 solver_name,ivector,vectorinfo(ivector)%iFile, &
337 adjustl(vectorinfo(ivector)%varName), &
338 adjustl(vectorinfo(ivector)%varNameShort)
351 global%currentIter,geoinfo%iFileName)
357 IF ( global%flowType == flow_unsteady )
THEN
358 DO iscalar = 1,nscalars
360 '.'//trim(scalarinfo(iscalar)%varNameShort), &
361 iserver,global%currentTime, &
362 scalarinfo(iscalar)%iFileName)
364 ELSE IF ( global%flowType == flow_steady )
THEN
365 DO iscalar = 1,nscalars
367 '.'//trim(scalarinfo(iscalar)%varNameShort), &
368 iserver,global%currentIter, &
369 scalarinfo(iscalar)%iFileName)
372 CALL
errorstop(global,err_reached_default,__line__)
379 IF ( global%flowType == flow_unsteady )
THEN
380 DO ivector = 1,nvectors
382 '.'//trim(vectorinfo(ivector)%varNameShort), &
383 iserver,global%currentTime, &
384 vectorinfo(ivector)%iFileName)
386 ELSE IF ( global%flowType == flow_steady )
THEN
387 DO ivector = 1,nvectors
389 '.'//trim(vectorinfo(ivector)%varNameShort), &
390 iserver,global%currentIter, &
391 vectorinfo(ivector)%iFileName)
394 CALL
errorstop(global,err_reached_default,__line__)
401 IF ( global%verbLevel > verbose_low )
THEN
402 WRITE(stdout,
'(A,1X,A)') solver_name,
'Building ENSIGHT data info done.'
447 CHARACTER(80) :: dummystring
448 CHARACTER(CHRLEN) :: ifilename
449 INTEGER :: errorflag,iscalar,ivector
456 'RFLU_ModENSIGHT.F90')
458 IF ( global%verbLevel > verbose_low )
THEN
459 WRITE(stdout,
'(A,1X,A)') solver_name,
'Closing ENSIGHT flow files...'
466 DO iscalar = 1,nscalars
470 DO ivector = 1,nvectors
478 IF ( global%verbLevel > verbose_low )
THEN
479 WRITE(stdout,
'(A,1X,A)') solver_name,
'Closing ENSIGHT flow files done.'
531 'RFLU_ModENSIGHT.F90')
533 IF ( global%verbLevel > verbose_low )
THEN
534 WRITE(stdout,
'(A,1X,A)') solver_name,
'Closing ENSIGHT geometry file...'
541 CLOSE(if_ens_geometry,iostat=errorflag)
542 global%error = errorflag
543 IF ( global%error /= err_none )
THEN
544 CALL
errorstop(global,err_file_close,__line__)
551 IF ( global%verbLevel > verbose_low )
THEN
552 WRITE(stdout,
'(A,1X,A)') solver_name,
'Closing ENSIGHT geometry file done.'
590 INTEGER,
INTENT(IN) :: ifile
604 'RFLU_ModENSIGHT.F90')
610 CLOSE(ifile,iostat=errorflag)
611 global%error = errorflag
612 IF ( global%error /= err_none )
THEN
613 CALL
errorstop(global,err_file_close,__line__)
668 'RFLU_ModENSIGHT.F90')
670 IF ( global%verbLevel > verbose_low )
THEN
671 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying ENSIGHT data info...'
678 DEALLOCATE(scalarinfo,stat=errorflag)
679 global%error = errorflag
680 IF ( global%error /= err_none )
THEN
681 CALL
errorstop(global,err_deallocate,__line__,
'scalarInfo')
684 DEALLOCATE(vectorinfo,stat=errorflag)
685 global%error = errorflag
686 IF ( global%error /= err_none )
THEN
687 CALL
errorstop(global,err_deallocate,__line__,
'vectorInfo')
701 IF ( global%verbLevel > verbose_low )
THEN
702 WRITE(stdout,
'(A,1X,A)') solver_name,
'Destroying ENSIGHT data info done.'
746 global%postPartNumber = 0
788 INTEGER,
INTENT(IN) :: ireg,nregions,nservers
833 INTEGER,
INTENT(IN) :: iserver
840 CHARACTER(80) :: dummystring
841 CHARACTER(CHRLEN) :: ifilename
842 INTEGER :: errorflag,iscalar,ivector
849 'RFLU_ModENSIGHT.F90')
851 IF ( global%verbLevel > verbose_low )
THEN
852 WRITE(stdout,
'(A,1X,A)') solver_name,
'Opening ENSIGHT flow files...'
859 DO iscalar = 1,nscalars
861 scalarinfo(iscalar)%iFileName)
864 DO ivector = 1,nvectors
866 vectorinfo(ivector)%iFileName)
873 IF ( global%verbLevel > verbose_low )
THEN
874 WRITE(stdout,
'(A,1X,A)') solver_name,
'Opening ENSIGHT flow files done.'
912 INTEGER,
INTENT(IN) :: iserver
919 CHARACTER(80) :: dummystring
920 CHARACTER(CHRLEN) :: ifilename
928 'RFLU_ModENSIGHT.F90')
930 IF ( global%verbLevel > verbose_low )
THEN
931 WRITE(stdout,
'(A,1X,A)') solver_name,
'Opening ENSIGHT geometry file...'
938 OPEN(if_ens_geometry,file=trim(geoinfo%iFileName),
form=
"UNFORMATTED", &
939 status=
"UNKNOWN",iostat=errorflag)
940 global%error = errorflag
941 IF ( global%error /= err_none )
THEN
942 CALL
errorstop(global,err_file_open,__line__,ifilename)
949 dummystring =
'Fortran Binary'
950 WRITE(if_ens_geometry) dummystring
952 dummystring = trim(global%casename)
953 WRITE(if_ens_geometry) dummystring
955 dummystring = trim(global%casename)
956 WRITE(if_ens_geometry) dummystring
958 dummystring =
'node id assign'
959 WRITE(if_ens_geometry) dummystring
961 dummystring =
'element id assign'
962 WRITE(if_ens_geometry) dummystring
968 IF ( global%verbLevel > verbose_low )
THEN
969 WRITE(stdout,
'(A,1X,A)') solver_name,
'Opening ENSIGHT geometry file done.'
1010 CHARACTER(CHRLEN) :: ifilename
1011 INTEGER,
INTENT(IN) :: ifile
1018 CHARACTER(80) :: dummystring
1019 INTEGER :: errorflag
1026 'RFLU_ModENSIGHT.F90')
1032 OPEN(ifile,file=trim(ifilename),
form=
"UNFORMATTED",
status=
"UNKNOWN", &
1034 global%error = errorflag
1035 IF ( global%error /= err_none )
THEN
1036 CALL
errorstop(global,err_file_open,__line__,trim(ifilename))
1043 dummystring = trim(global%casename)
1044 WRITE(ifile) dummystring
1093 global%postPartNumber = global%postPartNumberSave
1138 global%postPartNumberSave = global%postPartNumber
1182 INTEGER,
INTENT(IN) :: iserver
1189 CHARACTER(80) :: dummystring
1190 CHARACTER(CHRLEN) :: ifilename
1191 INTEGER :: errorflag,iscalar,ivector
1198 'RFLU_ModENSIGHT.F90')
1206 OPEN(if_ens_case,file=trim(ifilename),
form=
"FORMATTED",
status=
"UNKNOWN", &
1208 global%error = errorflag
1209 IF ( global%error /= err_none )
THEN
1210 CALL
errorstop(global,err_file_open,__line__,trim(ifilename))
1213 WRITE(if_ens_case,
'(A)')
'FORMAT'
1214 WRITE(if_ens_case,
'(A)')
'type: ensight gold'
1215 WRITE(if_ens_case,
'(A)')
'GEOMETRY'
1216 WRITE(if_ens_case,
'(A,1X,A)')
'model:',trim(geoinfo%iFileName)
1217 WRITE(if_ens_case,
'(A)')
'VARIABLE'
1219 DO iscalar = 1,nscalars
1220 WRITE(if_ens_case,
'(A,2(1X,A))')
'scalar per element:', &
1221 trim(scalarinfo(iscalar)%varName), &
1222 trim(scalarinfo(iscalar)%iFileName)
1225 DO ivector = 1,nvectors
1226 WRITE(if_ens_case,
'(A,2(1X,A))')
'vector per element:', &
1227 trim(vectorinfo(ivector)%varName), &
1228 trim(vectorinfo(ivector)%iFileName)
1231 CLOSE(if_ens_case,iostat=errorflag)
1232 global%error = errorflag
1233 IF ( global%error /= err_none )
THEN
1234 CALL
errorstop(global,err_file_close,__line__,trim(ifilename))
1277 LOGICAL,
OPTIONAL :: emptypartflagin
1278 TYPE(t_region
),
POINTER :: pregion
1284 LOGICAL :: emptypartflag
1285 CHARACTER(80) :: dummystring
1286 INTEGER :: errorflag,icg,icl,ifl,ipart,ipatch,ipv,iscalar,iscalaroffs,offs
1287 REAL(RFREAL),
DIMENSION(:),
POINTER :: pscalar
1288 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pvector
1290 TYPE(t_grid),
POINTER :: pgrid
1291 TYPE(t_patch),
POINTER :: ppatch
1297 global => pregion%global
1300 'RFLU_ModENSIGHT.F90')
1302 IF ( global%verbLevel > verbose_none )
THEN
1303 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing solution to ENSIGHT files...'
1304 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1305 pregion%iRegionGlobal
1308 pgrid => pregion%grid
1314 IF ( present(emptypartflagin) .EQV. .false. )
THEN
1315 emptypartflag = .false.
1317 emptypartflag = emptypartflagin
1320 IF ( global%verbLevel > verbose_none )
THEN
1321 WRITE(stdout,
'(A,3X,A,1X,L1)') solver_name,
'Writing empty parts:', &
1337 IF ( emptypartflag .EQV. .false. )
THEN
1338 pscalar => pregion%mixt%cv(cv_mixt_dens,:)
1347 IF ( emptypartflag .EQV. .false. )
THEN
1348 pscalar => pregion%mixt%cv(cv_mixt_ener,:)
1357 IF ( emptypartflag .EQV. .false. )
THEN
1358 pscalar => pregion%mixt%dv(dv_mixt_pres,:)
1367 IF ( emptypartflag .EQV. .false. )
THEN
1368 pscalar => pregion%mixt%dv(dv_mixt_temp,:)
1377 IF ( emptypartflag .EQV. .false. )
THEN
1378 pscalar => pregion%mixt%dv(dv_mixt_soun,:)
1392 IF ( pregion%plot%nPv > 0 )
THEN
1395 DO ipv = 1,pregion%plot%nPv
1398 IF ( emptypartflag .EQV. .false. )
THEN
1399 pscalar => pregion%plot%pv(ipv,:)
1406 scalarinfo(iscalaroffs+iscalar)%iFile, &
1410 iscalaroffs = iscalaroffs + pregion%plot%nPv
1417 IF ( emptypartflag .EQV. .false. )
THEN
1418 pvector => pregion%mixt%cv(cv_mixt_xmom:cv_mixt_zmom,:)
1435 IF ( global%specUsed .EQV. .true. )
THEN
1436 DO iscalar = 1,pregion%specInput%nSpecies
1437 IF ( emptypartflag .EQV. .false. )
THEN
1438 pscalar => pregion%spec%cv(iscalar,:)
1445 scalarinfo(iscalar+iscalaroffs)%iFile, &
1455 IF ( global%verbLevel > verbose_none )
THEN
1456 WRITE(stdout,
'(A,1X,A)') solver_name, &
1457 'Writing solution to ENSIGHT files done.'
1496 LOGICAL,
OPTIONAL :: emptypartflagin
1497 TYPE(t_region
),
POINTER :: pregion
1503 LOGICAL :: emptypartflag
1504 INTEGER :: errorflag
1511 global => pregion%global
1514 'RFLU_ModENSIGHT.F90')
1516 IF ( global%verbLevel > verbose_none )
THEN
1517 WRITE(stdout,
'(A,1X,A)') solver_name, &
1518 'Writing grid to ENSIGHT geometry file...'
1519 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
1520 pregion%iRegionGlobal
1527 IF ( present(emptypartflagin) .EQV. .false. )
THEN
1528 emptypartflag = .false.
1530 emptypartflag = emptypartflagin
1533 IF ( global%verbLevel > verbose_none )
THEN
1534 WRITE(stdout,
'(A,3X,A,1X,L1)') solver_name,
'Writing empty parts:', &
1548 IF ( global%verbLevel > verbose_none )
THEN
1549 WRITE(stdout,
'(A,1X,A)') solver_name, &
1550 'Writing grid to ENSIGHT geometry file done.'
subroutine rflu_ens_closefileflowwrapper(global)
subroutine buildfilenamebasic(global, dest, ext, id, fileName)
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
INTEGER function, public rflu_ens_mapregion2server(iReg, nRegions, nServers)
subroutine rflu_ens_restorepartnumber(global)
subroutine, public rflu_ens_openfilegeometry(global, iServer)
subroutine, public rflu_countplottingvars(pRegion)
subroutine rflu_ens_writefilecase(global, iServer)
subroutine rflu_ens_openfileflowwrapper(global, iServer)
subroutine rflu_ens_storepartnumber(global)
**********************************************************************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_ens_closefilescalarvector(global, iFile)
subroutine, public rflu_ens_writegridwrapper(pRegion, emptyPartFlagIn)
subroutine, public rflu_ens_writevector(pRegion, var, iFile, emptyPartFlag)
subroutine, public rflu_ens_writeflowwrapper(pRegion, emptyPartFlagIn)
subroutine, public rflu_ens_destroydatainfo(global)
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
subroutine, public rflu_ens_writegrid(pRegion, emptyPartFlag)
subroutine, public rflu_ens_closefilegeometry(global)
subroutine rflu_ens_openfilescalarvector(global, iFile, iFileName)
subroutine, public rflu_ens_writescalar(pRegion, var, iFile, emptyPartFlag)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine, public rflu_ens_builddatainfo(pRegion, iServer)
subroutine, public rflu_ens_initpartnumber(global)
subroutine deregisterfunction(global)
subroutine buildfilenamesteady(global, dest, ext, id, it, fileName)
subroutine buildfilenameunsteady(global, dest, ext, id, tm, fileName)