65 TYPE(t_region
),
POINTER :: regions(:)
68 INTEGER :: ireg,
i,
j,
k,
n
71 CHARACTER(2*CHRLEN+22) :: fname,fhead
72 CHARACTER(CHRLEN) :: rcsidentstring,
msg
75 INTEGER ::
status(mpi_status_size)
77 INTEGER :: ilev, iregfile, ipc, jpc, kpc, ndumcells, ioff, ijoff, ijk
80 INTEGER :: ndimc, ndimn, ncv, errorflag
81 INTEGER,
POINTER :: ivar(:,:)
83 REAL(RFREAL),
POINTER :: rvar(:,:), cv(:,:), cvfile(:,:)
89 rcsidentstring =
'$RCSfile: PEUL_WriteSolution.F90,v $ $Revision: 1.3 $'
91 global => regions(1)%global
94 'PEUL_WriteSolution.F90' )
98 IF (.NOT. global%peulUsed) goto 9
102 ALLOCATE( ivar(5,1),stat=errorflag )
103 ALLOCATE( rvar(2,1),stat=errorflag )
104 global%error = errorflag
105 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
109 IF (global%myProcid == masterproc)
THEN
111 fhead = trim(global%inDir)//trim(global%casename)
113 SELECT CASE(global%solutFormat)
115 fhead = trim(fhead)//
'.peul_sola_'
117 fhead = trim(fhead)//
'.peul_solb_'
119 CALL
errorstop( global,err_unknown_format,__line__ )
122 IF (global%flowType == flow_unsteady)
THEN
123 WRITE(fname,
'(A,ES11.5)') trim(fhead), global%currentTime
124 rvar(1,1) = global%currentTime
125 rvar(2,1) = 1._rfreal
127 WRITE(fname,
'(A,I6.6)') trim(fhead), global%currentIter
128 rvar(1,1) = 0._rfreal
129 rvar(2,1) = global%peulResInit
132 SELECT CASE(global%solutFormat)
134 OPEN(if_peul_solut,file=fname,
form=
'formatted',
status=
'unknown', &
137 OPEN(if_peul_solut,file=fname,
form=
'unformatted',
status=
'unknown', &
140 global%error = errorflag
142 IF (global%error /= 0) &
143 CALL
errorstop( global,err_file_open,__line__,
'File: '//trim(fname) )
149 IF (global%myProcid == masterproc)
THEN
156 DO ireg=1,global%nRegions
160 ilev = regions(ireg)%currLevel
166 ndimc = ijkend - ijkbeg + 1
171 ndimn = (regions(ireg)%levels(ilev)%grid%ipc+1)* &
172 (regions(ireg)%levels(ilev)%grid%jpc+1)* &
173 (regions(ireg)%levels(ilev)%grid%kpc+1)
175 ncv = regions(ireg)%levels(ilev)%peul%nCv
179 IF (regions(ireg)%procid==global%myProcid .OR. &
180 global%myProcid==masterproc)
THEN
181 ALLOCATE( cvfile(ncv,ndimc),stat=errorflag )
182 global%error = errorflag
183 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
189 IF (regions(ireg)%procid == global%myProcid)
THEN
190 cv => regions(ireg)%levels(ilev)%peul%cv
196 ijk = indijk(
i,
j,
k,ioff,ijoff)
197 cvfile(:,
n) = cv(:,ijk)
205 IF (global%myProcid == masterproc)
THEN
207 ivar(2,1) = regions(ireg)%levels(ilev)%grid%ipc
208 ivar(3,1) = regions(ireg)%levels(ilev)%grid%jpc
209 ivar(4,1) = regions(ireg)%levels(ilev)%grid%kpc
210 ivar(5,1) = regions(ireg)%nDumCells
217 IF (global%myProcid == masterproc)
THEN
219 IF (regions(ireg)%procid /= masterproc)
THEN
220 CALL mpi_recv( cvfile,ncv*ndimc,mpi_rfreal, &
221 regions(ireg)%procid,ireg, &
222 global%mpiComm,
status,global%mpierr )
223 IF (global%mpierr /=0) CALL
errorstop(global,err_mpi_trouble,__line__)
231 IF (regions(ireg)%procid == global%myProcid)
THEN
232 CALL mpi_send( cvfile,ncv*ndimc,mpi_rfreal,masterproc,ireg, &
233 global%mpiComm,global%mpierr )
234 IF (global%mpierr /=0) CALL
errorstop(global,err_mpi_trouble,__line__)
239 IF (
ASSOCIATED(cvfile))
THEN
240 DEALLOCATE( cvfile,stat=errorflag )
241 global%error = errorflag
242 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
250 IF (global%myProcid == masterproc)
THEN
251 CLOSE(if_peul_solut,iostat=errorflag)
252 global%error = errorflag
253 IF (global%error /= 0) &
254 CALL
errorstop( global,err_file_close,__line__,
'File: '//trim(fname) )
**********************************************************************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 rflo_writedatafileint(global, fileId, form, nDim1, nDim2, ivar)
subroutine peul_writesolution(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.
**********************************************************************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 rflo_writedatafilereal(global, fileId, form, nDim1, nDim2, var)
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