69 CHARACTER(CHRLEN) :: level, gridformat,
msg, versionstring, headerstring
71 INTEGER :: ipc, jpc, kpc, ibn, ien, ninteract
73 INTEGER :: margin, versionwidth, errorflag
74 INTEGER,
PARAMETER :: headerwidth = 53
77 TYPE(t_region
),
POINTER :: regions(:)
89 global%verbLevel = verbose_none
91 global%flowType = flow_steady
92 global%currentTime = 0._rfreal
93 global%timeStamp = 0._rfreal
94 global%currentIter = 0
95 global%resInit = 1._rfreal
100 global%nProcAlloc = 1
101 global%myProcid = masterproc
102 global%mpierr = err_none
103 global%error = err_none
105 global%pi = 4._rfreal*atan(1._rfreal)
106 global%rad = global%pi/180._rfreal
111 CALL mpi_init( global%mpierr )
112 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,__line__ )
118 versionwidth = len_trim(versionstring)
119 margin = (headerwidth-versionwidth)/2
120 headerstring(margin+1:margin+versionwidth) = versionstring(1:versionwidth)
121 headerstring(1:1) =
'*'
122 headerstring(headerwidth:headerwidth) =
'*'
124 WRITE(stdout,
'(/,A)') solver_name//
' *****************************************************'
125 WRITE(stdout,
'(A)') solver_name//
' * *'
126 WRITE(stdout,
'(A)') solver_name//
' * ROCFLO-MP: Surface Grid for GenX *'
127 WRITE(stdout,
'(A)') solver_name//
' * ================================ *'
128 WRITE(stdout,
'(A)') solver_name//
' * *'
129 WRITE(stdout,
'(A)') solver_name//
' '//trim(headerstring)
130 WRITE(stdout,
'(A)') solver_name//
' * Copyright (c) by the University of Illinois *'
131 WRITE(stdout,
'(A)') solver_name//
' * *'
132 WRITE(stdout,
'(A,/)') solver_name//
' *****************************************************'
136 CALL getarg(1,global%casename)
138 CALL getarg(3,gridformat)
140 IF (len_trim(global%casename)==0 .OR. &
141 len_trim(level)==0 .OR. &
142 len_trim(gridformat)==0)
THEN
143 WRITE(stdout,
'(/,A,/,5(A,/))') &
144 solver_name//
' Usage: rflosurf <casename> <level> <grid>', &
146 solver_name//
' level = grid level (>0)', &
148 solver_name//
' grid = 0 - ASCII format', &
149 solver_name//
' = 1 - binary format'
151 CALL mpi_finalize( global%mpierr )
156 READ(level ,*) global%startLevel
157 READ(gridformat,*) global%gridFormat
161 WRITE(stdout,
'(/,A)') solver_name//
' Reading region topology ...'
165 DO ireg=1,global%nRegions
166 regions(ireg)%startLevel = global%startLevel
167 regions(ireg)%currLevel = global%startLevel
168 IF (regions(ireg)%nGridLevels < regions(ireg)%currLevel)
THEN
169 WRITE(
msg,1000) solver_name,ireg,global%startLevel
172 DO ilev=2,regions(ireg)%nGridLevels
173 ipc = regions(ireg)%levels(ilev-1)%grid%ipc
174 jpc = regions(ireg)%levels(ilev-1)%grid%jpc
175 kpc = regions(ireg)%levels(ilev-1)%grid%kpc
176 regions(ireg)%levels(ilev)%grid%ipc = ipc/2
177 regions(ireg)%levels(ilev)%grid%jpc = jpc/2
178 regions(ireg)%levels(ilev)%grid%kpc = kpc/2
196 WRITE(stdout,
'(A)') solver_name//
' Generating and storing surface grid ...'
200 OPEN(if_plot,file=trim(global%casename)//
'.im',
form=
'formatted', &
201 status=
'unknown',iostat=errorflag)
202 global%error = errorflag
203 IF (global%error /= 0) CALL
errorstop( global,err_file_open,__line__ )
205 WRITE(if_plot,*) ninteract,
' 2'
209 DO ireg=1,global%nregions
210 WRITE(stdout,
'(A,I5.5)') solver_name//
' - region ',ireg
212 regions(ireg)%currLevel = global%startLevel
216 DO ilev=1,regions(ireg)%nGridLevels
222 ALLOCATE( regions(ireg)%levels(ilev)%grid%xyz(3,ibn:ien),stat=errorflag )
223 global%error = errorflag
224 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
235 ilev = global%startLevel
241 DO ilev=1,regions(ireg)%nGridLevels
242 DEALLOCATE( regions(ireg)%levels(ilev)%grid%xyz,stat=errorflag )
243 global%error = errorflag
244 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
250 CLOSE(if_plot,iostat=errorflag)
251 global%error = errorflag
252 IF (global%error /= 0) CALL
errorstop( global,err_file_close,__line__ )
256 WRITE(stdout,
'(/,A)') solver_name//
' Finished.'
259 CALL mpi_finalize( global%mpierr )
262 1000
FORMAT(
a,
' Region ',i5,
', grid level= ',i2,
'.')
265 END SUBROUTINE mpi_main
subroutine rflo_copygeometrydummy(region)
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 jdnbeg
**********************************************************************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 idnend
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
**********************************************************************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 jdnend
subroutine rflo_readgridregion(iReg, regions)
subroutine rflo_copytopologylevels(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 idnbeg
subroutine buildversionstring(versionString)
subroutine rflo_generatecoarsegrids(region)
**********************************************************************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 writesurfacegrid(iReg, region)
subroutine countinteractingpatches(regions, nInteract)
subroutine rflo_getdimensdummynodes(region, iLev, idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend)
subroutine rflo_readregiontopology(global, regions)
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 kdnbeg