60 CHARACTER(CHRLEN),
PRIVATE :: &
61 RCSIdentString =
'$RCSfile: RFLU_ModDimensionality.F90,v $ $Revision: 1.9 $'
101 TYPE(t_region
),
POINTER :: pregion
108 TYPE(t_grid),
POINTER :: pgrid
114 global => pregion%global
117 'RFLU_ModDimensionality.F90')
123 pgrid => pregion%grid
129 SELECT CASE ( pregion%mixtInput%dimens )
137 CALL
errorstop(global,err_reached_default,__line__)
187 INTEGER,
INTENT(IN) ::
dir
188 TYPE(t_region
),
POINTER :: pregion
195 REAL(RFREAL) :: ndmax,nxmax,ndmin,nxmin,ntol
196 TYPE(t_grid),
POINTER :: pgrid
197 TYPE(t_patch),
POINTER :: ppatch
204 global => pregion%global
207 'RFLU_ModDimensionality.F90')
209 IF ( global%myProcid == masterproc .AND. &
210 global%verbLevel >= verbose_high)
THEN
211 WRITE(stdout,
'(A,1X,A)') solver_name,
'Checking geometry...'
212 WRITE(stdout,
'(A,3X,A,1X,I2)') solver_name,
'Component:',
dir
215 pgrid => pregion%grid
217 ntol = 1.0e-14_rfreal
223 IF ( pgrid%nFacesTot > 0 )
THEN
224 ndmin = minval(pgrid%fn(
dir,1:pgrid%nFacesTot))
225 ndmax = maxval(pgrid%fn(
dir,1:pgrid%nFacesTot))
227 IF ( global%myProcid == masterproc .AND. &
228 global%verbLevel >= verbose_high)
THEN
229 WRITE(stdout,
'(A,3X,A)') solver_name,
'Extrema of face-normal vectors:'
230 WRITE(stdout,
'(A,5X,A,1X,E23.16)') solver_name,
'Tolerance:',ntol
231 WRITE(stdout,
'(A,7X,A,1X,2(1X,E23.16))') solver_name,
'Interior:', &
235 IF ( (abs(ndmin) > ntol) .OR. (abs(ndmax) > ntol) )
THEN
236 CALL
errorstop(global,err_face_normal_invalid,__line__)
239 IF ( (
floatequal(abs(ndmin),0.0_rfreal,ntol) .EQV. .false.) .OR. &
240 (
floatequal(abs(ndmax),0.0_rfreal,ntol) .EQV. .false.) )
THEN
241 CALL
errorstop(global,err_face_normal_invalid,__line__)
250 DO ipatch = 1,pgrid%nPatches
251 ppatch => pregion%patches(ipatch)
253 IF ( ppatch%nBFacesTot > 0 )
THEN
254 ndmin = minval(ppatch%fn(
dir,1:ppatch%nBFacesTot))
255 ndmax = maxval(ppatch%fn(
dir,1:ppatch%nBFacesTot))
257 nxmin = minval(ppatch%fn(xcoord,1:ppatch%nBFacesTot))
258 nxmax = maxval(ppatch%fn(xcoord,1:ppatch%nBFacesTot))
260 IF ( global%myProcid == masterproc .AND. &
261 global%verbLevel >= verbose_high)
THEN
262 WRITE(stdout,
'(A,7X,A,1X,I2,A,1X,2(1X,E23.16))') &
263 solver_name,
'Patch',ipatch,
':',ndmin,ndmax
270 IF ( ppatch%bcType /= bc_virtual )
THEN
271 IF ( (
floatequal(abs(ndmin),0.0_rfreal,ntol) .EQV. .false.) .OR. &
272 (
floatequal(abs(ndmax),0.0_rfreal,ntol) .EQV. .false.) )
THEN
273 CALL
errorstop(global,err_face_normal_invalid,__line__)
281 IF ( (
floatequal(abs(nxmin),0.0_rfreal,ntol) .EQV. .false.) .OR. &
282 (
floatequal(abs(nxmax),0.0_rfreal,ntol) .EQV. .false.) )
THEN
283 CALL
errorstop(global,err_face_normal_invalid,__line__)
293 IF ( global%myProcid == masterproc .AND. &
294 global%verbLevel >= verbose_high)
THEN
295 WRITE(stdout,
'(A,1X,A)') solver_name,
'Checking geometry done.'
334 TYPE(t_region
),
POINTER :: pregion
340 INTEGER :: icl,ifg,ifl,ifl2,ipatch,ipatchcntr
341 TYPE(t_grid),
POINTER :: pgrid
342 TYPE(t_patch),
POINTER :: ppatch
349 global => pregion%global
352 'RFLU_ModDimensionality.F90')
354 IF ( global%myProcid == masterproc .AND. &
355 global%verbLevel >= verbose_high)
THEN
356 WRITE(stdout,
'(A,1X,A)') solver_name,
'Checking topology...'
363 pgrid => pregion%grid
373 SELECT CASE ( pregion%mixtInput%dimens )
375 IF ( pgrid%nTetsTot /= 0 .OR. &
376 pgrid%nPrisTot /= 0 .OR. &
377 pgrid%nPyrsTot /= 0 )
THEN
378 CALL
errorstop(global,err_dimens_invalid,__line__)
381 IF ( pgrid%nTetsTot /= 0 .OR. pgrid%nPyrsTot /= 0 )
THEN
382 CALL
errorstop(global,err_dimens_invalid,__line__)
386 CALL
errorstop(global,err_reached_default,__line__)
395 DO ipatch = 1,pgrid%nPatches
396 ppatch => pregion%patches(ipatch)
398 IF ( ppatch%bcType == bc_virtual )
THEN
399 ipatchcntr = ipatchcntr + 1
403 SELECT CASE ( pregion%mixtInput%dimens )
405 IF ( ipatchcntr /= 4 )
THEN
406 CALL
errorstop(global,err_num_bc_virtual,__line__)
409 IF ( ipatchcntr /= 2 )
THEN
410 CALL
errorstop(global,err_num_bc_virtual,__line__)
413 IF ( ipatchcntr /= 0 )
THEN
414 CALL
errorstop(global,err_num_bc_virtual,__line__)
417 CALL
errorstop(global,err_reached_default,__line__)
426 SELECT CASE ( pregion%mixtInput%dimens )
436 DO icl = 1,pgrid%nHexsTot
440 ipatch = pgrid%hex2f(1,ifl,icl)
442 IF ( ipatch > 0 )
THEN
443 ppatch => pregion%patches(ipatch)
445 IF ( ppatch%bcType == bc_virtual )
THEN
446 ipatchcntr = ipatchcntr + 1
451 IF ( ipatchcntr /= 4 )
THEN
452 CALL
errorstop(global,err_dimens_invalid,__line__)
464 DO icl = 1,pgrid%nHexsTot
468 ipatch = pgrid%hex2f(1,ifl,icl)
470 IF ( ipatch > 0 )
THEN
471 ppatch => pregion%patches(ipatch)
473 IF ( ppatch%bcType == bc_virtual )
THEN
474 ipatchcntr = ipatchcntr + 1
479 IF ( ipatchcntr /= 2 )
THEN
480 CALL
errorstop(global,err_dimens_invalid,__line__)
486 DO icl = 1,pgrid%nPrisTot
490 ipatch = pgrid%pri2f(1,ifl,icl)
491 ifl2 = pgrid%pri2f(2,ifl,icl)
493 IF ( ipatch > 0 )
THEN
494 ppatch => pregion%patches(ipatch)
496 IF ( ppatch%bcType == bc_virtual )
THEN
497 ipatchcntr = ipatchcntr + 1
499 IF ( ppatch%bf2v(4,ifl2) /= vert_none )
THEN
500 CALL
errorstop(global,err_dimens_invalid,__line__)
506 IF ( ipatchcntr /= 2 )
THEN
507 CALL
errorstop(global,err_dimens_invalid,__line__)
517 CALL
errorstop(global,err_reached_default,__line__)
524 IF ( global%myProcid == masterproc .AND. &
525 global%verbLevel >= verbose_high)
THEN
526 WRITE(stdout,
'(A,1X,A)') solver_name,
'Checking topology done.'
subroutine registerfunction(global, funName, fileName)
subroutine, public rflu_123d_checkgeometrywrapper(pRegion)
subroutine, public rflu_123d_checktopology(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)
subroutine rflu_123d_checkgeometrykernel(pRegion, dir)