73 TYPE(t_region
),
POINTER :: pregion
79 CHARACTER(CHRLEN) :: rcsidentstring
80 INTEGER :: errorflag,ipatch
81 TYPE(t_grid),
POINTER :: pgrid
82 TYPE(t_patch),
POINTER :: ppatch
89 rcsidentstring =
'$RCSfile: RFLU_CreateGrid.F90,v $ $Revision: 1.25 $'
91 global => pregion%global
94 'RFLU_CreateGrid.F90')
96 IF ( global%myProcid == masterproc .AND. &
97 global%verbLevel >= verbose_high )
THEN
98 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating grid...'
105 pgrid => pregion%grid
111 ALLOCATE(pgrid%xyz(3,pgrid%nVertMax),stat=errorflag)
112 global%error = errorflag
113 IF ( global%error /= err_none )
THEN
114 CALL
errorstop(global,err_allocate,__line__,
'region%grid%xyz')
125 IF ( pgrid%nTetsMax > 0 )
THEN
126 ALLOCATE(pgrid%tet2v(4,pgrid%nTetsMax),stat=errorflag)
127 global%error = errorflag
128 IF ( global%error /= err_none )
THEN
129 CALL
errorstop(global,err_allocate,__line__,
'region%grid%tet2v')
139 IF ( pgrid%nHexsMax > 0 )
THEN
140 ALLOCATE(pgrid%hex2v(8,pgrid%nHexsMax),stat=errorflag)
141 global%error = errorflag
142 IF ( global%error /= err_none )
THEN
143 CALL
errorstop(global,err_allocate,__line__,
'region%grid%hex2v')
153 IF ( pgrid%nPrisMax > 0 )
THEN
154 ALLOCATE(pgrid%pri2v(6,pgrid%nPrisMax),stat=errorflag)
155 global%error = errorflag
156 IF ( global%error /= err_none )
THEN
157 CALL
errorstop(global,err_allocate,__line__,
'region%grid%pri2v')
167 IF ( pgrid%nPyrsMax > 0 )
THEN
168 ALLOCATE(pgrid%pyr2v(5,pgrid%nPyrsMax),stat=errorflag)
169 global%error = errorflag
170 IF ( global%error /= err_none )
THEN
171 CALL
errorstop(global,err_allocate,__line__,
'region%grid%pyr2v')
181 pgrid%nCellsSpecial = 0
182 pgrid%nFacesSpecial = 0
187 pgrid%nCellsConstr = 0
188 pgrid%nFacesConstr = 0
194 IF ( pgrid%nPatches > 0 )
THEN
195 ALLOCATE(pregion%patches(pgrid%nPatches),stat=errorflag)
196 global%error = errorflag
197 IF ( global%error /= err_none )
THEN
198 CALL
errorstop(global,err_allocate,__line__,
'pRegion%patches')
201 nullify(pregion%patches)
208 DO ipatch = 1,pgrid%nPatches
209 ppatch => pregion%patches(ipatch)
215 ppatch%iPatchLocal = ipatch
216 ppatch%iPatchGlobal = pgrid%patchDimens(patch_dimens_ipglobal,ipatch)
218 ppatch%nBTris = pgrid%patchDimens(patch_dimens_nbtris ,ipatch)
219 ppatch%nBTrisTot = pgrid%patchDimens(patch_dimens_nbtristot ,ipatch)
220 ppatch%nBTrisMax = pgrid%patchDimens(patch_dimens_nbtrismax ,ipatch)
222 ppatch%nBQuads = pgrid%patchDimens(patch_dimens_nbquads ,ipatch)
223 ppatch%nBQuadsTot = pgrid%patchDimens(patch_dimens_nbquadstot ,ipatch)
224 ppatch%nBQuadsMax = pgrid%patchDimens(patch_dimens_nbquadsmax ,ipatch)
226 ppatch%nBCellsVirt = pgrid%patchDimens(patch_dimens_nbcellsvirt,ipatch)
228 ppatch%nBFaces = ppatch%nBTris + ppatch%nBQuads
229 ppatch%nBFacesTot = ppatch%nBTrisTot + ppatch%nBQuadsTot
230 ppatch%nBFacesMax = ppatch%nBTrisMax + ppatch%nBQuadsMax
232 pgrid%nBFaces = pgrid%nBFaces + ppatch%nBFaces
233 pgrid%nBFacesTot = pgrid%nBFacesTot + ppatch%nBFacesTot
242 ppatch%plotFlag = .true.
243 ppatch%renumFlag = .false.
244 ppatch%flatFlag = .false.
245 ppatch%transformFlag = .false.
247 ppatch%movePatchDir = 0
255 IF ( ppatch%nBTrisMax > 0 )
THEN
256 ALLOCATE(ppatch%bTri2v(3,ppatch%nBTrisMax),stat=errorflag)
257 global%error = errorflag
258 IF ( global%error /= err_none )
THEN
259 CALL
errorstop(global,err_allocate,__line__,
'region%patches%bTri2v')
262 nullify(ppatch%bTri2v)
265 IF ( ppatch%nBQuadsMax > 0 )
THEN
266 ALLOCATE(ppatch%bQuad2v(4,ppatch%nBQuadsMax),stat=errorflag)
267 global%error = errorflag
268 IF ( global%error /= err_none )
THEN
269 CALL
errorstop(global,err_allocate,__line__,
'region%patch%bQuad2v')
272 nullify(ppatch%bQuad2v)
277 IF ( ppatch%nBCellsVirt > 0 )
THEN
278 ALLOCATE(ppatch%bvc(ppatch%nBCellsVirt),stat=errorflag)
279 global%error = errorflag
280 IF ( global%error /= err_none )
THEN
281 CALL
errorstop(global,err_allocate,__line__,
'pPatch%bvc')
291 ppatch%tm(xcoord,xcoord) =
REAL(crazy_value_int,kind=rfreal)
292 ppatch%tm(xcoord,ycoord) =
REAL(crazy_value_int,kind=rfreal)
293 ppatch%tm(xcoord,zcoord) =
REAL(crazy_value_int,kind=rfreal)
294 ppatch%tm(xcoord,xyzmag) =
REAL(crazy_value_int,kind=rfreal)
295 ppatch%tm(ycoord,xcoord) =
REAL(crazy_value_int,kind=rfreal)
296 ppatch%tm(ycoord,ycoord) =
REAL(crazy_value_int,kind=rfreal)
297 ppatch%tm(ycoord,zcoord) =
REAL(crazy_value_int,kind=rfreal)
298 ppatch%tm(ycoord,xyzmag) =
REAL(crazy_value_int,kind=rfreal)
299 ppatch%tm(zcoord,xcoord) =
REAL(crazy_value_int,kind=rfreal)
300 ppatch%tm(zcoord,ycoord) =
REAL(crazy_value_int,kind=rfreal)
301 ppatch%tm(zcoord,zcoord) =
REAL(crazy_value_int,kind=rfreal)
302 ppatch%tm(zcoord,xyzmag) =
REAL(crazy_value_int,kind=rfreal)
303 ppatch%tm(xyzmag,xcoord) =
REAL(crazy_value_int,kind=rfreal)
304 ppatch%tm(xyzmag,ycoord) =
REAL(crazy_value_int,kind=rfreal)
305 ppatch%tm(xyzmag,zcoord) =
REAL(crazy_value_int,kind=rfreal)
306 ppatch%tm(xyzmag,xyzmag) =
REAL(crazy_value_int,kind=rfreal)
313 IF ( global%myProcid == masterproc .AND. &
314 global%verbLevel >= verbose_high )
THEN
315 WRITE(stdout,
'(A,1X,A)') solver_name,
'Creating grid done.'
subroutine rflu_creategrid(pRegion)
subroutine registerfunction(global, funName, fileName)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)