60 TYPE(t_region
) :: region
63 INTEGER :: ijk, ind, l
66 CHARACTER(CHRLEN+23) :: fname
67 CHARACTER(CHRLEN) :: rcsidentstring,
msg,timestring1,timestring2
69 INTEGER :: errorflag,ireg, ijkbeg, ijkend, ncells
71 INTEGER :: mixtvarid(2,region%global%mixtnstat)
72 INTEGER :: turbvarid(2,region%global%turbnstat)
74 REAL(RFREAL) :: currenttime
75 REAL(RFREAL),
POINTER :: mixttav(:,:), turbtav(:,:)
81 rcsidentstring =
'$RCSfile: RFLU_ReadStat.F90,v $'
83 global => region%global
90 ireg = region%iRegionGlobal
91 WRITE(fname,
'(A,I5.5,A,1PE11.5)') trim(global%outDir)// &
92 trim(global%casename)//
'.statb_',ireg, &
93 '_',global%currentTime
95 OPEN(if_stat,file=fname,
form=
'unformatted',
status=
'old',iostat=errorflag)
96 global%error = errorflag
97 IF (global%error /= 0) &
98 CALL
errorstop(global,err_file_open,__line__,
'File: '//trim(fname))
102 READ(if_stat,err=10,
end=10) currenttime
103 READ(if_stat,err=10,
end=10) global%integrTime
104 WRITE(timestring1,
'(1PE11.5)') global%currentTime
105 WRITE(timestring2,
'(1PE11.5)') currenttime
107 IF ( trim(timestring1) /= trim(timestring2) )
THEN
108 WRITE(
msg,1010) ireg,currenttime,global%currentTime
109 CALL
errorstop(global,err_time_solution,__line__, &
110 msg//
' File: '//trim(fname) )
115 READ(if_stat,err=10,
end=10) ncells
117 IF (ncells /= region%grid%nCells)
THEN
118 WRITE(
msg,1000) ireg, ncells, region%grid%nCells
124 IF (global%mixtNStat > 0)
THEN
125 READ(if_stat,err=10,
end=10) ntavgvar,mixtvarid(1,:)
126 mixtvarid(2,:) = mod(mixtvarid(1,:),10)
127 mixtvarid(1,:) = (mixtvarid(1,:)-mixtvarid(2,:))/10
129 IF (ntavgvar /= global%mixtNStat)
THEN
130 CALL
errorstop(global,err_stats_restart,__line__)
134 DO l=1,global%mixtNStat
135 IF (mixtvarid(ind,l) /= global%mixtStatId(ind,l))
THEN
136 CALL
errorstop(global,err_stats_restart,__line__)
145 IF (global%turbNStat > 0)
THEN
146 READ(if_stat,err=10,
end=10) ntavgvar,turbvarid(1,:)
147 turbvarid(2,:) = mod(turbvarid(1,:),10)
148 turbvarid(1,:) = (turbvarid(1,:)-turbvarid(2,:))/10
150 IF (ntavgvar /= global%turbNStat)
THEN
151 CALL
errorstop(global,err_stats_restart,__line__)
155 DO l=1,global%turbNStat
156 IF (turbvarid(ind,l) /= global%turbStatId(ind,l))
THEN
157 CALL
errorstop(global,err_stats_restart,__line__)
166 IF (global%myProcid==masterproc .AND. global%verbLevel>=verbose_high) &
167 WRITE(stdout,
'(A)') solver_name,
' - read statistics'
170 ijkend = region%grid%nCells
172 IF (global%mixtNStat > 0)
THEN
173 mixttav => region%mixt%tav
174 READ(if_stat,err=10,
end=10) ((mixttav(l,ijk), ijk=ijkbeg,ijkend), &
175 l=1,global%mixtNStat)
178 IF (global%turbNStat > 0)
THEN
179 turbtav => region%turb%tav
180 READ(if_stat,err=10,
end=10) ((turbtav(l,ijk), ijk=ijkbeg,ijkend), &
181 l=1,global%turbNStat)
188 CLOSE(if_stat,iostat=errorflag)
189 global%error = errorflag
190 IF (global%error /= 0) &
191 CALL
errorstop(global,err_file_close,__line__,
'File: '//trim(fname))
199 CALL
errorstop(global,err_file_read,__line__,
'File: '//trim(fname))
202 1000
FORMAT(
'Region ',i5,
', nCells= ',i10,
', nCellExpected= ',i10)
203 1010
FORMAT(
'Region ',i5,
', time in file is= ',1pe12.5, &
204 ' but it should be= ',e12.5,
'.')
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
**********************************************************************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_readstat(region)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)