64 CHARACTER(CHRLEN) :: casenameold, casenamenew, versionstring, headerstring
66 INTEGER :: gridformat, splitdirection, nsplits
67 INTEGER :: strlen, ibn, ien, inoff, ijnoff
69 INTEGER :: margin, versionwidth, errorflag
70 INTEGER,
PARAMETER :: headerwidth = 53
72 TYPE(t_global),
POINTER :: globalold, globalnew
73 TYPE(t_region
),
POINTER :: regionsold(:), regionsnew(:)
80 globalold%nFunTree = 0
86 globalold%verbLevel = verbose_none
88 globalold%flowType = flow_steady
89 globalold%currentTime = -1._rfreal
90 globalold%currentIter = -1
92 globalold%inDir =
'./'
93 globalold%outDir =
'./'
95 globalold%nProcAlloc = 1
96 globalold%myProcid = masterproc
97 globalold%mpierr = err_none
98 globalold%error = err_none
100 globalold%pi = 4._rfreal*atan(1._rfreal)
101 globalold%rad = globalold%pi/180._rfreal
106 CALL mpi_init( globalold%mpierr )
107 IF (globalold%mpierr /=0 ) &
108 CALL
errorstop( globalold,err_mpi_trouble,__line__ )
114 versionwidth = len_trim(versionstring)
115 margin = (headerwidth-versionwidth)/2
116 headerstring(margin+1:margin+versionwidth) = versionstring(1:versionwidth)
117 headerstring(1:1) =
'*'
118 headerstring(headerwidth:headerwidth) =
'*'
120 WRITE(stdout,
'(/,A)') solver_name//
' *****************************************************'
121 WRITE(stdout,
'(A)') solver_name//
' * *'
122 WRITE(stdout,
'(A)') solver_name//
' * ROCFLO-MP: Grid Split Up *'
123 WRITE(stdout,
'(A)') solver_name//
' * ======================== *'
124 WRITE(stdout,
'(A)') solver_name//
' * *'
125 WRITE(stdout,
'(A)') solver_name//
' '//trim(headerstring)
126 WRITE(stdout,
'(A)') solver_name//
' * Copyright (c) by the University of Illinois *'
127 WRITE(stdout,
'(A)') solver_name//
' * *'
128 WRITE(stdout,
'(A,/)') solver_name//
' *****************************************************'
132 WRITE(stdout,
'(A)') solver_name//
' Case name of old grid:'
133 READ(stdin,
'(A)') casenameold
135 WRITE(stdout,
'(A)') solver_name//
' Case name of new grid:'
136 READ(stdin,
'(A)') casenamenew
138 WRITE(stdout,
'(A)') solver_name//
' Grid format (ASCII=1, binary=2):'
139 READ(stdin,*) gridformat
141 WRITE(stdout,
'(A)') solver_name//
' Split direction (i=1, j=2, k=3):'
142 READ(stdin,*) splitdirection
144 WRITE(stdout,
'(A)') solver_name//
' Number of new regions:'
145 READ(stdin,*) nsplits
149 IF (gridformat <= 1)
THEN
150 globalold%gridFormat = format_ascii
152 globalold%gridFormat = format_binary
157 WRITE(stdout,
'(/,A)') solver_name//
' Reading old topology ...'
159 globalold%casename = casenameold
163 IF (globalold%nRegions > 1)
THEN
164 WRITE(stdout,
'(/,A)') solver_name//
' Tool works only for SINGLE region.'
166 CALL mpi_finalize( globalold%mpierr )
173 WRITE(stdout,
'(A)') solver_name//
' Reading old grid ...'
177 regionsold(1)%nDumCells = 0
184 ALLOCATE( regionsold(1)%levels(1)%grid%xyz(3,ibn:ien),stat=errorflag )
185 globalold%error = errorflag
186 IF (globalold%error /= 0) CALL
errorstop( globalold,err_allocate,__line__ )
194 WRITE(stdout,
'(A)') solver_name//
' Splitting the grid ...'
196 globalnew = globalold
198 globalnew%casename = casenamenew
199 globalnew%nRegions = nsplits
201 ALLOCATE( regionsnew(globalnew%nRegions),stat=errorflag )
202 globalold%error = errorflag
203 IF (globalold%error /= 0) CALL
errorstop( globalold,err_allocate,__line__ )
207 DO ireg=1,globalnew%nRegions
208 regionsnew(ireg)%global => globalnew
213 CALL
splitgrid( splitdirection,regionsold,regionsnew )
219 WRITE(stdout,
'(A)') solver_name//
' Writing data ...'
221 DO ireg=1,globalnew%nRegions
231 WRITE(stdout,
'(/,A,/)') solver_name//
' Finished.'
234 CALL mpi_finalize( globalold%mpierr )
subroutine registerfunction(global, funName, fileName)
subroutine rflo_writegridregion(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 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)
**********************************************************************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 splittopology(splitDirection, regionsOld, regionsNew)
subroutine rflo_writeregiontopology(regions)
subroutine rflo_getdimensdummynodes(region, iLev, idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend)
subroutine splitgrid(splitDirection, regionsOld, regionsNew)
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