70 CHARACTER(CHRLEN) :: casename, verbosity,
msg, versionstring, headerstring
72 CHARACTER(CHRLEN) :: wins, winv
75 INTEGER :: ipc, jpc, kpc, gridlevel
76 INTEGER :: margin, versionwidth, errorflag
77 INTEGER,
PARAMETER :: headerwidth = 53
80 TYPE(t_region
),
POINTER :: regions(:)
92 global%verbLevel = verbose_none
94 global%flowType = flow_steady
95 global%currentTime = 0._rfreal
96 global%currentIter = 0
97 global%resInit = 1._rfreal
102 global%nProcAlloc = 1
103 global%myProcid = masterproc
104 global%mpierr = err_none
105 global%error = err_none
107 global%pi = 4._rfreal*atan(1._rfreal)
108 global%rad = global%pi/180._rfreal
120 versionwidth = len_trim(versionstring)
121 margin = (headerwidth-versionwidth)/2
122 headerstring(margin+1:margin+versionwidth) = versionstring(1:versionwidth)
123 headerstring(1:1) =
'*'
124 headerstring(headerwidth:headerwidth) =
'*'
126 WRITE(stdout,
'(/,A)') solver_name//
' *****************************************************'
127 WRITE(stdout,
'(A)') solver_name//
' * *'
128 WRITE(stdout,
'(A)') solver_name//
' * ROCFLO-MP: Solution Initialization *'
129 WRITE(stdout,
'(A)') solver_name//
' * ================================== *'
130 WRITE(stdout,
'(A)') solver_name//
' * *'
131 WRITE(stdout,
'(A)') solver_name//
' '//trim(headerstring)
132 WRITE(stdout,
'(A)') solver_name//
' * Copyright (c) by the University of Illinois *'
133 WRITE(stdout,
'(A)') solver_name//
' * *'
134 WRITE(stdout,
'(A,/)') solver_name//
' *****************************************************'
138 WRITE(stdout,
'(/,A,/,A,/,8(A,/))') &
139 solver_name//
' Required Rocflo-Prep input:', &
141 solver_name//
' <casename> => command line input', &
142 solver_name//
' <verbosity> => command line input', &
143 solver_name//
' grid level => .inp file: # MULTIGRID: START', &
144 solver_name//
' input grd format => .inp file: # FORMATS: GRID', &
145 solver_name//
' output sol format => .inp file: # FORMATS: SOLUTION', &
146 solver_name//
' unsteadiness => .inp file: # TIMESTEP: FLOWTYPE', &
147 solver_name//
' spec. heat ratio => .inp file: # REFERENCE: GAMMA', &
148 solver_name//
' initial solution => .inp file: # INITFLOW: all'
150 CALL getarg(1,casename)
151 CALL getarg(2,verbosity)
153 IF (len_trim(casename)==0 .OR. &
154 len_trim(verbosity)==0)
THEN
155 WRITE(stdout,
'(/,A,/)') &
156 solver_name//
' Usage: rfloprep <casename> <verbosity>'
163 READ(casename ,*) global%casename
164 READ(verbosity,*) global%verbLevel
172 CALL com_set_verbose( 1 )
173 CALL rocout_load_module(
'OUT')
178 WRITE(stdout,
'(/,A)') solver_name//
' Reading region topology ...'
182 WRITE(stdout,
'(A)') solver_name//
' Reading user input file ...'
188 WRITE(stdout,
'(A)') solver_name//
' Checking BC consistency ...'
194 IF (global%verbLevel >= verbose_low) CALL
printprepinput( regions )
198 WRITE(stdout,
'(A)') solver_name//
' Reading grid ...'
200 gridlevel = global%startLevel
202 DO ireg=1,global%nRegions
203 IF (regions(ireg)%nGridLevels < gridlevel)
THEN
204 WRITE(
msg,1000) solver_name,ireg,gridlevel
207 DO ilev=2,regions(ireg)%nGridLevels
208 ipc = regions(ireg)%levels(ilev-1)%grid%ipc
209 jpc = regions(ireg)%levels(ilev-1)%grid%jpc
210 kpc = regions(ireg)%levels(ilev-1)%grid%kpc
211 regions(ireg)%levels(ilev)%grid%ipc = ipc/2
212 regions(ireg)%levels(ilev)%grid%jpc = jpc/2
213 regions(ireg)%levels(ilev)%grid%kpc = kpc/2
216 CALL
getgrid( gridlevel,ireg,regions )
221 WRITE(stdout,
'(A)') solver_name//
' Write BC distribution to files ...'
227 IF (global%solutFormat==2)
THEN
229 CALL
errorstop( global,err_unknown_format,__line__, &
230 'compile with GENX=1 for format=2 (Genx HDF format)' )
236 WRITE(stdout,
'(A)') solver_name//
' Generating and storing solution ...'
238 DO ireg=1,global%nregions
239 WRITE(stdout,
'(A,I5.5)') solver_name//
' - region ',ireg
241 IF (global%solutFormat==2)
THEN
250 DEALLOCATE( regions(ireg)%levels(gridlevel)%mixt%cv,stat=errorflag )
251 global%error = errorflag
252 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
260 WRITE(stdout,
'(/,A)') solver_name//
' Finished.'
266 1000
FORMAT(
a,
' Region ',i5,
', grid level= ',i2,
'.')
subroutine genxinitsolution(gridLevel, iReg, regions, wins, winv)
subroutine checkbcvalidity(regions)
subroutine registerfunction(global, funName, fileName)
subroutine getgrid(gridLevel, iReg, regions)
subroutine buildversionstring(versionString)
subroutine genxwritesolution(gridLevel, iReg, region, wins, winv)
subroutine rflo_readregiontopology(global, regions)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)
subroutine, public bcdistributionfiles(regions)
subroutine rflo_writesolutionregion(iReg, regions)
subroutine initializeflowfield(iLev, region)