58 INTEGER ::
i,
j,
k, ijk, ijkm1
61 CHARACTER(CHRLEN) :: versionstring, headerstring
62 CHARACTER(3*CHRLEN) :: fname2d
64 INTEGER :: inoff, ijnoff, ijkbeg, ijkend
67 INTEGER :: margin, versionwidth, errorflag
68 INTEGER,
PARAMETER :: headerwidth = 53
70 REAL(RFREAL) :: depth,
dz
71 REAL(RFREAL),
POINTER :: xyz(:,:)
74 TYPE(t_region
),
POINTER :: regions(:)
87 global%verbLevel = verbose_high
89 global%flowType = flow_steady
90 global%currentTime = 0._rfreal
91 global%currentIter = 0
97 global%myProcid = masterproc
98 global%mpierr = err_none
99 global%error = err_none
101 global%pi = 4._rfreal*atan(1._rfreal)
102 global%rad = global%pi/180._rfreal
107 CALL mpi_init( global%mpierr )
108 IF (global%mpierr /=0 ) CALL
errorstop( global,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: 2-D to 3-D Grid Convertor *'
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//
' *****************************************************'
134 ALLOCATE( regions(global%nRegions),stat=errorflag )
135 global%error = errorflag
136 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
138 regions(1)%global => global
139 regions(1)%active = active
140 regions(1)%procid = global%myProcid
141 regions(1)%nPatches = 1
142 regions(1)%nGridLevels = 1
143 regions(1)%nDumCells = 0
144 regions(1)%mixtInput%moveGrid = .false.
146 ALLOCATE( regions(1)%levels(regions(1)%nGridLevels),stat=errorflag )
147 global%error = errorflag
148 IF (global%error /=0 ) CALL
errorstop( global,err_allocate,__line__ )
152 WRITE(stdout,
'(A)') solver_name//
' Name of file with 2-D grid:'
153 READ(stdin,
'(A)') fname2d
155 WRITE(stdout,
'(A)') solver_name//
' Case name:'
156 READ(stdin,
'(A)') global%casename
158 WRITE(stdout,
'(A)') solver_name//
' Number of cells in the 3rd direction (>1):'
159 READ(stdin,*) regions(1)%levels(1)%grid%kpc
160 regions(1)%levels(1)%grid%kpc =
max(2,regions(1)%levels(1)%grid%kpc)
162 WRITE(stdout,
'(A)') solver_name//
' Depth of the 3-D grid (>0.):'
165 WRITE(stdout,
'(A)') solver_name//
' Format of 3-D grid (0=ASCII, 1=binary):'
166 READ(stdin,*) global%gridFormat
170 WRITE(stdout,
'(/,A)') solver_name//
' Reading 2-D grid ...'
172 OPEN(if_grid,file=fname2d,
status=
'old',
form=
'formatted',iostat=errorflag)
173 global%error = errorflag
174 IF (global%error /= 0) &
175 CALL
errorstop( global,err_file_open,__line__,
'File: '//trim(fname2d) )
179 READ(if_grid,*) regions(1)%levels(1)%grid%ipc, &
180 regions(1)%levels(1)%grid%jpc
182 WRITE(stdout,
'(A,I4,A,I4)') solver_name//
' dimensions= ', &
183 regions(1)%levels(1)%grid%ipc, &
184 ' x ',regions(1)%levels(1)%grid%jpc
197 ALLOCATE( regions(1)%levels(1)%grid%xyz(3,ijkbeg:ijkend),stat=errorflag )
198 global%error = errorflag
199 IF (global%error /=0 ) CALL
errorstop( global,err_allocate,__line__ )
203 xyz => regions(1)%levels(1)%grid%xyz
208 ijk = indijk(
i,
j,
k,inoff,ijnoff)
209 READ(if_grid,*) xyz(xcoord,ijk), &
211 xyz(zcoord,ijk) = 0._rfreal
217 CLOSE(if_grid,iostat=errorflag)
218 global%error = errorflag
219 IF (global%error /= 0) &
220 CALL
errorstop( global,err_file_close,__line__,
'File: '//trim(fname2d) )
224 WRITE(stdout,
'(A)') solver_name//
' Generating 3-D grid ...'
226 dz = depth/
REAL(regions(1)%levels(1)%
grid%kpc)
231 ijk = indijk(
i,
j,
k ,inoff,ijnoff)
232 ijkm1 = indijk(
i,
j,
k-1,inoff,ijnoff)
233 xyz(xcoord,ijk) = xyz(xcoord,ijkm1)
234 xyz(ycoord,ijk) = xyz(ycoord,ijkm1)
235 xyz(zcoord,ijk) = xyz(zcoord,ijkm1) +
dz
242 WRITE(stdout,
'(A)') solver_name//
' Storing 3-D grid ...'
250 WRITE(stdout,
'(/,A)') solver_name//
' Finished.'
253 CALL mpi_finalize( global%mpierr )
**********************************************************************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
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
**********************************************************************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.
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 jpnend
**********************************************************************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
**********************************************************************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)
**********************************************************************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
**********************************************************************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 rflo_getdimensphysnodes(region, iLev, ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend)
subroutine rflo_getdimensdummynodes(region, iLev, idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend)
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 ipnend
**********************************************************************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