64 CHARACTER(CHRLEN) :: casename, verbosity,
msg, versionstring, headerstring
66 INTEGER :: ipc, jpc, kpc,
ni,
nj,
nk, gridlevel
67 INTEGER :: margin, versionwidth, errorflag
68 INTEGER :: npatches, nverts, nhexs, nbfmax, nbnmax
69 INTEGER,
PARAMETER :: headerwidth = 53
73 TYPE(t_region
),
POINTER :: regions(:)
85 global%verbLevel = verbose_none
87 global%flowType = flow_steady
88 global%currentTime = 0._rfreal
89 global%currentIter = 0
90 global%resInit = 1._rfreal
97 global%mpierr = err_none
98 global%error = err_none
100 global%startLevel = 1
101 global%gridFormat = format_ascii
102 global%solutFormat = format_ascii
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: Conversion to ROCFLU *'
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,/,A,/,8(A,/))') &
133 solver_name//
' Required Rocflo2Flu input:', &
135 solver_name//
' <casename> => command line input', &
136 solver_name//
' <verbosity> => command line input', &
137 solver_name//
' grid level => .inp file: # MULTIGRID: START', &
138 solver_name//
' Rocflo grd format => .inp file: # FORMATS: GRID', &
139 solver_name//
' Rocflu grd format => .inp file: # FORMATS: SOLUTION'
141 CALL getarg(1,casename)
142 CALL getarg(2,verbosity)
144 IF (len_trim(casename)==0 .OR. &
145 len_trim(verbosity)==0)
THEN
146 WRITE(stdout,
'(/,A,/)') &
147 solver_name//
' Usage: rflo2flu <casename> <verbosity>'
154 READ(casename ,*) global%casename
155 READ(verbosity,*) global%verbLevel
159 WRITE(stdout,
'(/,A)') solver_name//
' Reading region topology ...'
163 WRITE(stdout,
'(A)') solver_name//
' Reading user input file ...'
169 gridlevel = global%startLevel
173 DO ireg=1,global%nRegions
174 IF (regions(ireg)%nGridLevels < gridlevel)
THEN
175 WRITE(
msg,1000) solver_name,ireg,gridlevel
178 DO ilev=2,regions(ireg)%nGridLevels
179 ipc = regions(ireg)%levels(ilev-1)%grid%ipc
180 jpc = regions(ireg)%levels(ilev-1)%grid%jpc
181 kpc = regions(ireg)%levels(ilev-1)%grid%kpc
182 regions(ireg)%levels(ilev)%grid%ipc = ipc/2
183 regions(ireg)%levels(ilev)%grid%jpc = jpc/2
184 regions(ireg)%levels(ilev)%grid%kpc = kpc/2
191 global%tofluNPatches = 0
192 global%tofluNHexs = 0
193 global%tofluNVerts = 0
194 global%tofluNbfMax = 0
195 global%tofluNbnMax = 0
196 global%tofluNFaces = 0
197 global%tofluNEdges = 0
199 DO ireg=1,global%nregions
200 regions(ireg)%currLevel = gridlevel
206 npatches = global%tofluNPatches
207 nverts = global%tofluNVerts
208 nhexs = global%tofluNHexs
209 nbfmax = global%tofluNbfMax
210 nbnmax = global%tofluNbnMax
212 ALLOCATE( global%tofluXyz(3,nverts),stat=errorflag )
213 global%error = errorflag
214 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
216 ALLOCATE( global%tofluNbVerts(npatches),stat=errorflag )
217 global%error = errorflag
218 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
220 ALLOCATE( global%tofluNbFaces(npatches),stat=errorflag )
221 global%error = errorflag
222 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
224 ALLOCATE( global%tofluHex2v(8,nhexs),stat=errorflag )
225 global%error = errorflag
226 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
228 ALLOCATE( global%tofluQuad2v(4,nbfmax,npatches),stat=errorflag )
229 global%error = errorflag
230 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
232 ALLOCATE( global%tofluBLoc2g(nbnmax,npatches),stat=errorflag )
233 global%error = errorflag
234 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
236 ALLOCATE( global%tofluIq(npatches),stat=errorflag )
237 global%error = errorflag
238 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
242 WRITE(stdout,
'(A)') solver_name//
' Generating and storing Rocflu files ...'
244 global%tofluNPatches = 0
245 global%tofluNHexs = 0
246 global%tofluNVerts = 0
247 global%tofluNbVerts(:) = 0
248 global%tofluNbFaces(:) = 0
249 global%tofluIq(:) = 0
250 global%tofluMaxBind = 0
252 DO ireg=1,global%nregions
253 WRITE(stdout,
'(A,I5.5)') solver_name//
' - region ',ireg
255 ilev = regions(ireg)%currLevel
256 grid => regions(ireg)%levels(ilev)%grid
264 DEALLOCATE(
grid%xyz,stat=errorflag )
265 global%error = errorflag
266 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
272 ALLOCATE( global%tofluBType(6,global%tofluMaxBind),stat=errorflag )
273 global%error = errorflag
274 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
276 global%tofluBType(:,:) = 0
278 DO ireg=1,global%nregions
294 WRITE(stdout,
'(/,A)') solver_name//
' Finished.'
300 1000
FORMAT(
a,
' Region ',i5,
', grid level= ',i2,
'.')
subroutine correctnedges(global)
subroutine writeflucellmap(global)
subroutine convertflo2flupatch(iReg, regions)
subroutine registerfunction(global, funName, fileName)
subroutine buildversionstring(versionString)
subroutine writefludimens(global)
subroutine writeflugrid(global)
subroutine convertflo2flumesh(iFlag, iReg, regions)
subroutine rflo_readregiontopology(global, regions)
subroutine errorstop(global, errorCode, errorLine, addMessage)
void int int REAL REAL REAL *z blockDim dim * ni
subroutine deregisterfunction(global)
subroutine getbndverttype(iReg, Regions)