65 INTEGER,
INTENT(IN) :: ireg
66 TYPE(t_region
),
POINTER :: regions(:)
69 INTEGER :: iptype,
i,
j,
k,
n
72 CHARACTER(2*CHRLEN+22) :: fhead, fname
73 CHARACTER(CHRLEN) :: rcsidentstring,
msg, timestring
75 INTEGER :: ilev, iregfile, ipc, jpc, kpc, ndumcells, ioff, ijoff, ijk
78 INTEGER :: ndimc, ndimn, ncv, errorflag
79 INTEGER,
ALLOCATABLE :: ivar(:,:)
83 REAL(RFREAL),
POINTER :: cv(:,:), cvfile(:,:)
84 REAL(RFREAL),
ALLOCATABLE :: rvar(:,:)
90 rcsidentstring =
'$RCSfile: PEUL_ReadSolutionRegion.F90,v $ $Revision: 1.3 $'
92 global => regions(ireg)%global
95 'PEUL_ReadSolutionRegion.F90' )
101 ALLOCATE( ivar(5,1),stat=errorflag )
102 ALLOCATE( rvar(2,1),stat=errorflag )
103 global%error = errorflag
104 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
108 IF (global%flowType == flow_unsteady)
THEN
109 WRITE(timestring,
'(ES11.5)') global%timeStamp
111 WRITE(timestring,
'(ES11.5)') 0._rfreal
118 fhead = trim(global%inDir)//trim(global%casename)
120 SELECT CASE(global%solutFormat)
122 fhead = trim(fhead)//
'.peul_sola_'
124 fhead = trim(fhead)//
'.peul_solb_'
126 CALL
errorstop( global,err_unknown_format,__line__ )
129 IF (global%flowType == flow_unsteady)
THEN
130 WRITE(fname,
'(A,ES11.5)') trim(fhead), global%timeStamp
132 WRITE(fname,
'(A,I6.6)') trim(fhead), global%currentIter
135 INQUIRE(file=fname,exist=fileexists)
139 SELECT CASE(global%solutFormat)
141 OPEN(if_peul_solut,file=fname,
form=
'formatted',
status=
'old', &
144 OPEN(if_peul_solut,file=fname,
form=
'unformatted',
status=
'old', &
147 global%error = errorflag
148 IF (global%error /= 0) &
149 CALL
errorstop( global,err_file_open,__line__,
'File: '//trim(fname) )
159 rvar(1,1) = 0._rfreal
160 rvar(2,1) = 1._rfreal
163 IF (global%flowType==flow_unsteady .AND. global%currentTime>0._rfreal)
THEN
164 IF (global%currentTime /= rvar(1,1) .AND. &
165 .NOT.regions(1)%peulInput%constInit)
THEN
166 WRITE(
msg,1000) rvar(1,1),global%currentTime
167 CALL
errorstop( global,err_time_solution,__line__,
msg//
' File: '// &
171 global%peulResInit = rvar(2,1)
178 ilev = regions(ireg)%currLevel
184 ndimc = ijkend - ijkbeg + 1
189 ndimn = (regions(ireg)%levels(ilev)%grid%ipc+1)* &
190 (regions(ireg)%levels(ilev)%grid%jpc+1)* &
191 (regions(ireg)%levels(ilev)%grid%kpc+1)
193 ncv = regions(ireg)%levels(ilev)%peul%nCv
203 ndumcells = ivar(5,1)
205 IF (iregfile /= ireg) &
206 CALL
errorstop( global,err_region_number,__line__,
'File: '//trim(fname) )
207 IF ((ipc /= regions(ireg)%levels(ilev)%grid%ipc) .OR. &
208 (jpc /= regions(ireg)%levels(ilev)%grid%jpc) .OR. &
209 (kpc /= regions(ireg)%levels(ilev)%grid%kpc))
THEN
210 WRITE(
msg,1005) ireg,ipc,jpc,kpc
211 CALL
errorstop( global,err_grid_dimensions,__line__,
msg )
213 IF (ndumcells /= regions(ireg)%nDumCells)
THEN
214 WRITE(
msg,1010) ireg,ndumcells,regions(ireg)%nDumCells
220 ALLOCATE( cvfile(ncv,ndimc),stat=errorflag )
221 global%error = errorflag
222 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
229 cv => regions(ireg)%levels(ilev)%peul%cv
236 ijk = indijk(
i,
j,
k,ioff,ijoff)
237 cv(:,ijk) = cvfile(:,
n)
242 IF (
ASSOCIATED(cvfile))
THEN
243 DEALLOCATE( cvfile,stat=errorflag )
244 global%error = errorflag
245 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
251 IF (ireg == global%nRegions)
THEN
252 CLOSE(if_peul_solut,iostat=errorflag)
253 global%error = errorflag
254 IF (global%error /= 0) &
255 CALL
errorstop( global,err_file_close,__line__,
'File: '//trim(fname) )
260 1000
FORMAT(
'Time in file is= ',es12.5,
' but it should be= ',e12.5,
'.')
261 1005
FORMAT(
'Region ',i5,
', ipc= ',i6,
', jpc= ',i6,
', kpc= ',i6,
'.')
262 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
**********************************************************************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 jpnbeg
**********************************************************************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 kpnbeg
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine rflo_readdatafileint(global, fileId, form, nDim1, nDim2, ivar)
**********************************************************************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 jpnend
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
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 peul_readsolutionregion(iReg, regions)
**********************************************************************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 ipnbeg
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 rflo_getdimensphysnodes(region, iLev, ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend)
**********************************************************************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 deregisterfunction(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 ipnend
subroutine rflo_readdatafilereal(global, fileId, form, nDim1, nDim2, var)