84 TYPE(t_region
),
POINTER :: regions(:)
85 INTEGER,
INTENT(IN) :: ireg
91 CHARACTER(2*CHRLEN+17) :: fname
92 CHARACTER(CHRLEN) ::
msg
94 INTEGER ::
i,
j,
k, l,
n, ind
97 INTEGER ::
status(mpi_status_size)
99 INTEGER :: ilev,iregfile,ipc,jpc,kpc,ndumcells,ndim,ioff,ijoff,ijk
101 INTEGER :: errorflag,ntav,ntavvar
103 INTEGER,
ALLOCATABLE,
DIMENSION (:,:) :: ivar,jvar,plagvarid
105 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: tav
106 REAL(RFREAL),
ALLOCATABLE,
DIMENSION(:,:) :: rvar, tavfile
114 global => regions(ireg)%global
117 'PLAG_ReadStatPost.F90' )
123 ALLOCATE( ivar(5,1),stat=errorflag )
124 global%error = errorflag
125 IF ( global%error /= err_none ) &
126 CALL
errorstop( global,err_allocate,__line__,
'ivar' )
128 ALLOCATE( rvar(2,1),stat=errorflag )
129 global%error = errorflag
130 IF ( global%error /= err_none ) &
131 CALL
errorstop( global,err_allocate,__line__,
'rvar' )
133 ALLOCATE( jvar(global%plagNStat+1,1),stat=errorflag )
134 global%error = errorflag
135 IF ( global%error /= err_none ) &
136 CALL
errorstop( global,err_allocate,__line__,
'jvar' )
138 ALLOCATE( plagvarid(2,global%plagNStat+1),stat=errorflag )
139 global%error = errorflag
140 IF ( global%error /= err_none ) &
141 CALL
errorstop( global,err_allocate,__line__,
'plagVarId' )
149 SELECT CASE( global%solutFormat )
150 CASE ( format_ascii )
151 WRITE(fname,
'(A,1PE11.5)') &
152 trim(global%inDir)//trim(global%casename)//
'.plag_stata_', &
154 OPEN( if_plag_stats,file=fname,
form=
'formatted',
status=
'old', &
157 CASE ( format_binary )
158 WRITE(fname,
'(A,1PE11.5)') &
159 trim(global%inDir)//trim(global%casename)//
'.plag_stat_', &
161 OPEN( if_plag_stats,file=fname,
form=
'unformatted',
status=
'old', &
165 CALL
errorstop( global,err_reached_default,__line__ )
169 global%error = errorflag
170 IF ( global%error /= err_none ) &
171 CALL
errorstop( global,err_file_open,__line__,
'File: '//trim(fname) )
179 IF ( ireg == 1 )
THEN
182 global%integrTime = rvar(2,1)
188 IF ( global%flowType==flow_unsteady .AND. global%currentTime>0._rfreal )
THEN
189 IF (abs(global%currentTime-rvar(1,1))/global%currentTime > 1.0e-03_rfreal)
THEN
190 WRITE(
msg,1000) rvar(1,1),global%currentTime
191 CALL
errorstop( global,err_time_solution,__line__,
msg//
' File: '//trim(fname) )
195 print*,
' PLAG_ReadStatPost: integrTime, currentime = ',global%integrTime,global%currentTime,rvar(1,1)
203 IF ( ireg == 1 )
THEN
204 IF (global%plagNStat > 0)
THEN
206 global%plagNStat+1,1,jvar )
208 IF ( ntavvar /= global%plagNStat )
THEN
209 CALL
errorstop( global,err_stats_restart,__line__ )
212 plagvarid(1,:) = jvar(2:global%plagNStat+1,1)
213 plagvarid(2,:) = mod(plagvarid(1,:),10)
214 plagvarid(1,:) = (plagvarid(1,:)-plagvarid(2,:))/10
217 DO l=1,global%plagNStat
218 IF ( plagvarid(ind,l) /= global%plagStatId(ind,l) ) &
219 CALL
errorstop( global,err_stats_restart,__line__ )
234 ilev = regions(ireg)%currLevel
240 ndim = ijkend - ijkbeg + 1
242 ntav = global%plagNStat
253 ndumcells = ivar(5,1)
255 IF (iregfile /= ireg) &
256 CALL
errorstop( global,err_region_number,__line__,
'File: '//trim(fname) )
258 IF ( (ipc /= regions(ireg)%levels(ilev)%grid%ipc) .OR. &
259 (jpc /= regions(ireg)%levels(ilev)%grid%jpc) .OR. &
260 (kpc /= regions(ireg)%levels(ilev)%grid%kpc) )
THEN
261 WRITE(
msg,1005) ireg,ipc,jpc,kpc
262 CALL
errorstop( global,err_grid_dimensions,__line__,
msg )
265 IF ( ndumcells /= regions(ireg)%nDumCells )
THEN
266 WRITE(
msg,1010) ireg,ndumcells,regions(ireg)%nDumCells
274 ALLOCATE( tavfile(ntav,ndim),stat=errorflag )
275 global%error = errorflag
276 IF ( global%error /= err_none ) &
277 CALL
errorstop( global,err_allocate,__line__ )
286 IF ( ntav > 0 ) tav => regions(ireg)%levels(ilev)%plag%tav
293 ijk = indijk(
i,
j,
k,ioff,ijoff)
295 tav(l,ijk) = tavfile(l,
n)
305 IF (
ALLOCATED(tavfile) )
THEN
306 DEALLOCATE( tavfile,stat=errorflag )
307 global%error = errorflag
308 IF ( global%error /= err_none ) &
309 CALL
errorstop( global,err_deallocate,__line__,
'tavFile' )
316 DEALLOCATE( ivar,stat=errorflag )
317 global%error = errorflag
318 IF ( global%error /= err_none ) &
319 CALL
errorstop( global,err_deallocate,__line__,
'ivar' )
321 DEALLOCATE( rvar,stat=errorflag )
322 global%error = errorflag
323 IF ( global%error /= err_none ) &
324 CALL
errorstop( global,err_deallocate,__line__,
'rvar' )
326 DEALLOCATE( jvar,stat=errorflag )
327 global%error = errorflag
328 IF ( global%error /= err_none ) &
329 CALL
errorstop( global,err_deallocate,__line__,
'jvar' )
331 DEALLOCATE( plagvarid,stat=errorflag )
332 global%error = errorflag
333 IF ( global%error /= err_none ) &
334 CALL
errorstop( global,err_deallocate,__line__,
'plagVarId' )
340 IF ( ireg == global%nRegions )
THEN
341 CLOSE(if_plag_stats,iostat=errorflag)
342 global%error = errorflag
343 IF ( global%error /= err_none ) &
344 CALL
errorstop( global,err_file_close,__line__,
'File: '//trim(fname) )
357 1000
FORMAT(
'Time in file is= ',1pe12.5,
' but it should be= ',e12.5,
'.')
358 1005
FORMAT(
'Region ',i5,
', ipc= ',i6,
', jpc= ',i6,
', kpc= ',i6,
'.')
359 1010
FORMAT(
'Region ',i5,
', # dummy cells=',i2,
' but should be= ',i1)
360 2000
FORMAT(
'Integration Time in file is= ',1pe12.5,
' but it should be= ',e12.5,
'.')
**********************************************************************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 idcend
subroutine rflo_getpatchdirection(patch, idir, jdir, kdir)
subroutine rflo_writedatafileint(global, fileId, form, nDim1, nDim2, ivar)
INTEGER function indijkmap(i, j, k, mapMat, iOffset, ijOffset)
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine rflo_getpatchindices(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
subroutine rflo_readdatafileint(global, fileId, form, nDim1, nDim2, ivar)
subroutine rflo_getdimensdummy(region, iLev, idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend)
**********************************************************************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 kdcbeg
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
**********************************************************************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 idcbeg
**********************************************************************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
**********************************************************************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 jdcend
subroutine plag_readstatpost(regions, iReg)
**********************************************************************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 jdcbeg
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine rflo_getpatchmapping(lb, lbs, l1SrcDir, l2SrcDir, align, idir, jdir, kdir, idirSrc, jdirSrc, kdirSrc, ibeg, iend, jbeg, jend, kbeg, kend, ibegSrc, iendSrc, jbegSrc, jendSrc, kbegSrc, kendSrc, mapMat)
subroutine rflo_writedatafilereal(global, fileId, form, nDim1, nDim2, var)
subroutine deregisterfunction(global)
subroutine rflo_readdatafilereal(global, fileId, form, nDim1, nDim2, var)