64 TYPE(t_region
),
POINTER :: regions(:)
67 INTEGER :: ireg,
i,
j,
k,
n, ifld
70 CHARACTER(2*CHRLEN+17) :: fname
71 CHARACTER(CHRLEN) ::
msg, timestring
74 INTEGER ::
status(mpi_status_size)
76 INTEGER :: ilev, iregfile, ipc, jpc, kpc, ndumcells, ioff, ijoff, ijk
78 INTEGER :: ndimc, nrvar, noutsol, nang, nsolcomp, errorflag
79 INTEGER,
ALLOCATABLE :: ivar(:,:)
81 REAL(RFREAL),
POINTER :: rcv(:,:)
82 REAL(RFREAL),
ALLOCATABLE :: rvar(:,:), solfile(:,:), dumfile(:,:)
88 global => regions(1)%global
91 'RADI_rFLO_ReadSolution.F90' )
97 ALLOCATE( ivar(5,1),stat=errorflag )
98 ALLOCATE( rvar(nrvar,1),stat=errorflag )
99 global%error = errorflag
100 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
104 IF (global%flowType == flow_unsteady)
THEN
105 WRITE(timestring,
'(1PE11.5)') global%timeStamp
107 WRITE(timestring,
'(1PE11.5)') 0._rfreal
112 IF (global%myProcid == masterproc)
THEN
116 IF (global%flowType == flow_unsteady)
THEN
117 IF (global%solutFormat == format_ascii)
THEN
118 WRITE(fname,
'(A,1PE11.5)') trim(global%inDir)//trim(global%casename)//
'.radia_', &
120 OPEN(if_solut,file=fname,
form=
'formatted',
status=
'old',iostat=errorflag)
121 ELSE IF (global%solutFormat == format_binary)
THEN
122 WRITE(fname,
'(A,1PE11.5)') trim(global%inDir)//trim(global%casename)//
'.radib_', &
124 OPEN(if_solut,file=fname,
form=
'unformatted',
status=
'old',iostat=errorflag)
126 CALL
errorstop( global,err_unknown_format,__line__ )
132 IF (global%solutFormat == format_ascii)
THEN
133 WRITE(fname,
'(A,I6.6)') trim(global%inDir)//trim(global%casename)//
'.radia_', &
135 OPEN(if_solut,file=fname,
form=
'formatted',
status=
'old',iostat=errorflag)
136 ELSE IF (global%solutFormat == format_binary)
THEN
137 WRITE(fname,
'(A,I6.6)') trim(global%inDir)//trim(global%casename)//
'.radib_', &
139 OPEN(if_solut,file=fname,
form=
'unformatted',
status=
'old',iostat=errorflag)
141 CALL
errorstop( global,err_unknown_format,__line__ )
145 global%error = errorflag
146 IF (global%error /= 0) &
147 CALL
errorstop( global,err_file_open,__line__,
'File: '//trim(fname) )
153 IF (global%myProcid == masterproc)
THEN
158 CALL mpi_bcast( rvar,nrvar,mpi_rfreal,masterproc,global%mpiComm,global%mpierr )
159 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,__line__ )
162 IF (global%flowType==flow_unsteady .AND. global%currentTime>0._rfreal)
THEN
163 IF (global%currentTime /= rvar(1,1))
THEN
164 WRITE(
msg,1000) rvar(1,1),global%currentTime
165 CALL
errorstop( global,err_time_solution,__line__,
msg//
' File: '//trim(fname) )
168 global%currentTime = rvar(1,1)
170 global%resInit = rvar(2,1)
177 nang = regions(ireg)%radiInput%nAng
178 nsolcomp = 3+radi_coeff_ncomp+nang
180 DO ireg=1,global%nRegions
184 ilev = regions(ireg)%currLevel
190 ndimc = ijkend - ijkbeg + 1
194 IF (global%myProcid == masterproc)
THEN
200 ndumcells = ivar(5,1)
202 IF (iregfile /= ireg) &
203 CALL
errorstop( global,err_region_number,__line__,
'File: '//trim(fname) )
204 IF ((ipc /= regions(ireg)%levels(ilev)%grid%ipc) .OR. &
205 (jpc /= regions(ireg)%levels(ilev)%grid%jpc) .OR. &
206 (kpc /= regions(ireg)%levels(ilev)%grid%kpc))
THEN
207 WRITE(
msg,1005) ireg,ipc,jpc,kpc
208 CALL
errorstop( global,err_grid_dimensions,__line__,
msg )
210 IF (ndumcells /= regions(ireg)%nDumCells)
THEN
211 WRITE(
msg,1010) ireg,ndumcells,regions(ireg)%nDumCells
218 IF (global%myProcid == masterproc)
THEN
220 ALLOCATE( solfile(noutsol,ndimc),stat=errorflag )
221 global%error = errorflag
222 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
224 ALLOCATE( dumfile(1,ndimc),stat=errorflag )
225 global%error = errorflag
226 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
228 solfile(:,:) = 0._rfreal
229 IF (regions(ireg)%radiInput%radiModel == radi_model_fldtran)
THEN
231 noutsol,ndimc,solfile )
239 IF (regions(ireg)%procid /= masterproc)
THEN
240 CALL mpi_send( noutsol,1,mpi_integer, &
241 regions(ireg)%procid,ireg, &
242 global%mpiComm,global%mpierr )
243 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,__line__ )
244 CALL mpi_send( solfile,noutsol*ndimc,mpi_rfreal, &
245 regions(ireg)%procid,ireg, &
246 global%mpiComm,global%mpierr )
247 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,__line__ )
253 IF (regions(ireg)%procid == global%myProcid)
THEN
255 CALL mpi_recv( noutsol,1,mpi_integer,masterproc,ireg, &
256 global%mpiComm,
status,global%mpierr )
257 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,__line__ )
259 ALLOCATE( solfile(noutsol,ndimc),stat=errorflag )
260 global%error = errorflag
261 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
264 CALL mpi_recv( solfile,noutsol*ndimc,mpi_rfreal,masterproc,ireg, &
265 global%mpiComm,
status,global%mpierr )
266 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,__line__ )
274 IF (regions(ireg)%procid == global%myProcid)
THEN
275 IF (regions(ireg)%radiInput%radiModel == radi_model_fldtran)
THEN
276 rcv => regions(ireg)%levels(ilev)%radi%cv
282 ijk = indijk(
i,
j,
k,ioff,ijoff)
283 rcv(tv_mixt_muet,ijk) = solfile(2,
n)
290 IF (
ALLOCATED(solfile))
THEN
291 DEALLOCATE( solfile,stat=errorflag )
292 global%error = errorflag
293 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
300 IF (global%myProcid == masterproc)
THEN
301 CLOSE(if_solut,iostat=errorflag)
302 global%error = errorflag
303 IF (global%error /= 0) &
304 CALL
errorstop( global,err_file_close,__line__,
'File: '//trim(fname) )
309 1000
FORMAT(
'Time in file is= ',1pe12.5,
' but it should be= ',e12.5,
'.')
310 1005
FORMAT(
'Region ',i5,
', ipc= ',i6,
', jpc= ',i6,
', kpc= ',i6,
'.')
311 1010
FORMAT(
'Region ',i5,
', # dummy cells=',i2,
' but should be= ',i1)
**********************************************************************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 registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
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
**********************************************************************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 radi_rflo_readsolution(regions)
subroutine deregisterfunction(global)
subroutine rflo_readdatafilereal(global, fileId, form, nDim1, nDim2, var)