66 TYPE(t_region
),
POINTER :: regions(:)
69 INTEGER :: ireg, iptype,
i,
j,
k,
n
72 CHARACTER(2*CHRLEN+22) :: fname,fhead
73 CHARACTER(CHRLEN) :: rcsidentstring,
msg
76 INTEGER ::
status(mpi_status_size)
78 INTEGER :: ilev, iregfile, ipc, jpc, kpc, ndumcells, ioff, ijoff, ijk
81 INTEGER :: ndimc, ndimn, ncv, errorflag
82 INTEGER,
POINTER :: ivar(:,:)
84 REAL(RFREAL),
POINTER :: rvar(:,:), cv(:,:), cvfile(:,:)
92 rcsidentstring =
'$RCSfile: PEUL_ReadSolution.F90,v $ $Revision: 1.3 $'
94 global => regions(1)%global
97 'PEUL_ReadSolution.F90' )
101 IF (.NOT. global%peulUsed) goto 9
105 ALLOCATE( ivar(5,1),stat=errorflag )
106 ALLOCATE( rvar(2,1),stat=errorflag )
107 global%error = errorflag
108 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
112 IF (global%myProcid == masterproc)
THEN
114 fhead = trim(global%inDir)//trim(global%casename)
116 SELECT CASE(global%solutFormat)
118 fhead = trim(fhead)//
'.peul_sola_'
120 fhead = trim(fhead)//
'.peul_solb_'
122 CALL
errorstop( global,err_unknown_format,__line__ )
125 IF (global%flowType == flow_unsteady)
THEN
126 WRITE(fname,
'(A,ES11.5)') trim(fhead), global%timeStamp
128 WRITE(fname,
'(A,I6.6)') trim(fhead), global%currentIter
131 INQUIRE(file=fname,exist=fileexists)
135 SELECT CASE(global%solutFormat)
137 OPEN(if_peul_solut,file=fname,
form=
'formatted',
status=
'old', &
140 OPEN(if_peul_solut,file=fname,
form=
'unformatted',
status=
'old', &
143 global%error = errorflag
144 IF (global%error /= 0) &
145 CALL
errorstop( global,err_file_open,__line__,
'File: '//trim(fname) )
153 IF (global%myProcid == masterproc)
THEN
158 rvar(1,1) = 0._rfreal
159 rvar(2,1) = 1._rfreal
164 CALL mpi_bcast( rvar,2,mpi_rfreal,masterproc,global%mpiComm,global%mpierr )
165 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,__line__ )
168 IF (global%flowType==flow_unsteady .AND. global%currentTime>0._rfreal)
THEN
169 IF (global%currentTime /= rvar(1,1) .AND. &
170 .NOT.regions(1)%peulInput%constInit)
THEN
171 WRITE(
msg,1000) rvar(1,1),global%currentTime
172 CALL
errorstop( global,err_time_solution,__line__,
msg//
' File: '// &
176 global%peulResInit = rvar(2,1)
180 DO ireg=1,global%nRegions
184 ilev = regions(ireg)%currLevel
190 ndimc = ijkend - ijkbeg + 1
195 ndimn = (regions(ireg)%levels(ilev)%grid%ipc+1)* &
196 (regions(ireg)%levels(ilev)%grid%jpc+1)* &
197 (regions(ireg)%levels(ilev)%grid%kpc+1)
199 ncv = regions(ireg)%levels(ilev)%peul%nCv
203 IF (global%myProcid == masterproc)
THEN
211 ndumcells = ivar(5,1)
214 ipc = regions(ireg)%levels(ilev)%grid%ipc
215 jpc = regions(ireg)%levels(ilev)%grid%jpc
216 kpc = regions(ireg)%levels(ilev)%grid%kpc
217 ndumcells = regions(ireg)%nDumCells
220 IF (iregfile /= ireg) &
221 CALL
errorstop( global,err_region_number,__line__, &
222 'File: '//trim(fname) )
223 IF ((ipc /= regions(ireg)%levels(ilev)%grid%ipc) .OR. &
224 (jpc /= regions(ireg)%levels(ilev)%grid%jpc) .OR. &
225 (kpc /= regions(ireg)%levels(ilev)%grid%kpc))
THEN
226 WRITE(
msg,1005) ireg,ipc,jpc,kpc
227 CALL
errorstop( global,err_grid_dimensions,__line__,
msg )
229 IF (ndumcells /= regions(ireg)%nDumCells)
THEN
230 WRITE(
msg,1010) ireg,ndumcells,regions(ireg)%nDumCells
237 IF (global%myProcid == masterproc)
THEN
239 ALLOCATE( cvfile(ncv,ndimc),stat=errorflag )
240 global%error = errorflag
241 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
248 cvfile(iptype,:) = regions(ireg)%peulInput%ptypes(iptype)%initc
253 IF (regions(ireg)%procid /= masterproc)
THEN
254 CALL mpi_send( cvfile,ncv*ndimc,mpi_rfreal, &
255 regions(ireg)%procid,ireg, &
256 global%mpiComm,global%mpierr )
257 IF (global%mpierr /=0) CALL
errorstop( global,err_mpi_trouble,__line__ )
264 IF (regions(ireg)%procid == global%myProcid)
THEN
265 ALLOCATE( cvfile(ncv,ndimc),stat=errorflag )
266 global%error = errorflag
267 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
270 CALL mpi_recv( cvfile,ncv*ndimc,mpi_rfreal,masterproc,ireg, &
271 global%mpiComm,
status,global%mpierr )
272 IF (global%mpierr /=0) CALL
errorstop( global,err_mpi_trouble,__line__ )
281 IF (regions(ireg)%procid == global%myProcid)
THEN
282 cv => regions(ireg)%levels(ilev)%peul%cv
288 ijk = indijk(
i,
j,
k,ioff,ijoff)
289 cv(:,ijk) = cvfile(:,
n)
296 IF (
ASSOCIATED(cvfile))
THEN
297 DEALLOCATE( cvfile,stat=errorflag )
298 global%error = errorflag
299 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
307 IF (global%myProcid == masterproc)
THEN
308 IF (fileexists)
CLOSE(if_peul_solut,iostat=errorflag)
309 global%error = errorflag
310 IF (global%error /= 0) &
311 CALL
errorstop( global,err_file_close,__line__,
'File: '//trim(fname) )
317 1000
FORMAT(
'Time in file is= ',es12.5,
' but it should be= ',es12.5,
'.')
318 1005
FORMAT(
'Region ',i5,
', ipc= ',i6,
', jpc= ',i6,
', kpc= ',i6,
'.')
319 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
subroutine peul_enforcepositivity(region)
subroutine peul_readsolution(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 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
**********************************************************************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)