66 TYPE(t_region
),
POINTER :: regions(:)
72 CHARACTER(2*CHRLEN+17) :: fname
73 CHARACTER(CHRLEN) ::
msg
75 INTEGER :: iregfile, ipc, jpc, kpc, ndim
77 INTEGER :: inoff, ijnoff, ijkn, errorflag
78 INTEGER,
ALLOCATABLE :: ivar(:,:)
82 REAL(RFREAL),
POINTER :: xyz(:,:)
83 REAL(RFREAL),
ALLOCATABLE :: rvar(:,:), xyzfile(:,:)
89 global => regions(ireg)%global
92 'RFLO_ReadGridRegion.F90' )
96 ALLOCATE( ivar(4,1),stat=errorflag )
97 ALLOCATE( rvar(1,1),stat=errorflag )
98 global%error = errorflag
99 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
106 DO iregfile=1,global%nRegions
107 IF (regions(iregfile)%mixtInput%moveGrid) movegrid = .true.
112 IF (global%flowType==flow_unsteady .AND. &
113 movegrid .AND. global%timeStamp>0._rfreal)
THEN
114 IF (global%gridFormat == format_ascii)
THEN
115 WRITE(fname,
'(A,1PE11.5)') trim(global%inDir)//trim(global%casename)//
'.grda_', &
117 OPEN(if_grid,file=fname,
form=
'formatted',
status=
'old',iostat=errorflag)
118 ELSE IF (global%gridFormat == format_binary)
THEN
119 WRITE(fname,
'(A,1PE11.5)') trim(global%inDir)//trim(global%casename)//
'.grdb_', &
121 OPEN(if_grid,file=fname,
form=
'unformatted',
status=
'old',iostat=errorflag)
123 CALL
errorstop( global,err_unknown_format,__line__ )
129 IF (global%gridFormat == format_ascii)
THEN
130 WRITE(fname,
'(A)') trim(global%inDir)//trim(global%casename)//
'.grda'
131 OPEN(if_grid,file=fname,
form=
'formatted',
status=
'old',iostat=errorflag)
132 ELSE IF (global%gridFormat == format_binary)
THEN
133 WRITE(fname,
'(A)') trim(global%inDir)//trim(global%casename)//
'.grdb'
134 OPEN(if_grid,file=fname,
form=
'unformatted',
status=
'old',iostat=errorflag)
136 CALL
errorstop( global,err_unknown_format,__line__ )
140 global%error = errorflag
141 IF (global%error /= 0) &
142 CALL
errorstop( global,err_file_open,__line__,
'File: '//trim(fname) )
147 global%currentTime = rvar(1,1)
160 IF (iregfile /= ireg) &
161 CALL
errorstop( global,err_region_number,__line__,
'File: '//trim(fname) )
162 IF ((ipc /= regions(ireg)%levels(1)%grid%ipc) .OR. &
163 (jpc /= regions(ireg)%levels(1)%grid%jpc) .OR. &
164 (kpc /= regions(ireg)%levels(1)%grid%kpc))
THEN
165 WRITE(
msg,1000) ireg,ipc,jpc,kpc
166 CALL
errorstop( global,err_grid_dimensions,__line__,
msg )
171 ndim = (ipc+1)*(jpc+1)*(kpc+1)
172 ALLOCATE( xyzfile(3,ndim),stat=errorflag )
173 global%error = errorflag
174 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
183 xyz => regions(ireg)%levels(1)%grid%xyz
190 ijkn = indijk(
i,
j,
k,inoff,ijnoff)
191 xyz(xcoord,ijkn) = xyzfile(1,
n)
192 xyz(ycoord,ijkn) = xyzfile(2,
n)
193 xyz(zcoord,ijkn) = xyzfile(3,
n)
198 DEALLOCATE( xyzfile,stat=errorflag )
199 global%error = errorflag
200 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
204 IF (ireg == global%nRegions)
THEN
205 CLOSE(if_grid,iostat=errorflag)
206 global%error = errorflag
207 IF (global%error /= 0) &
208 CALL
errorstop( global,err_file_close,__line__,
'File: '//trim(fname) )
213 1000
FORMAT(
'Region ',i5,
', ipc= ',i6,
', jpc= ',i6,
', kpc= ',i6,
'.')
**********************************************************************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_readgridregion(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
**********************************************************************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 rflo_getdimensphysnodes(region, iLev, ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend)
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)