63 INTEGER,
PARAMETER,
PUBLIC :: GATHER_MODE_ACTUAL_ONLY = 1, &
64 GATHER_MODE_ACTUAL_VIRTUAL = 2
95 INTEGER,
INTENT(OUT) :: nvarsout
96 TYPE(t_region
),
POINTER :: pregion
109 global => pregion%global
112 'RFLU_ModGatherData.F90')
122 nvars = pregion%mixtInput%nCv
129 IF ( global%specUsed .EQV. .true. )
THEN
130 nvars = nvars + pregion%specInput%nSpecies
183 INTEGER,
INTENT(IN) :: gathermode,ictype
184 INTEGER,
INTENT(OUT) :: nvarsout
185 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: cv
186 TYPE(t_region
),
POINTER :: pregion
192 INTEGER :: errorflag,ncells,nvars
194 TYPE(t_grid),
POINTER :: pgrid
200 global => pregion%global
203 'RFLU_ModGatherData.F90')
209 pgrid => pregion%grid
221 SELECT CASE ( gathermode )
222 CASE ( gather_mode_actual_only )
223 SELECT CASE ( ictype )
224 CASE ( cell_type_tet )
226 CASE ( cell_type_hex )
228 CASE ( cell_type_pri )
230 CASE ( cell_type_pyr )
233 CALL
errorstop(global,err_reached_default,__line__)
235 CASE ( gather_mode_actual_virtual )
236 SELECT CASE ( ictype )
237 CASE ( cell_type_tet )
238 ncells = pgrid%nTetsTot
239 CASE ( cell_type_hex )
240 ncells = pgrid%nHexsTot
241 CASE ( cell_type_pri )
242 ncells = pgrid%nPrisTot
243 CASE ( cell_type_pyr )
244 ncells = pgrid%nPyrsTot
246 CALL
errorstop(global,err_reached_default,__line__)
249 CALL
errorstop(global,err_reached_default,__line__)
262 ALLOCATE(cv(nvars,ncells),stat=errorflag)
263 global%error = errorflag
264 IF ( global%error /= err_none )
THEN
265 CALL
errorstop(global,err_allocate,__line__,
'cv')
308 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: cv
309 TYPE(t_region
),
POINTER :: pregion
322 global => pregion%global
325 'RFLU_ModGatherData.F90')
331 DEALLOCATE(cv,stat=errorflag)
332 global%error = errorflag
333 IF ( global%error /= err_none )
THEN
334 CALL
errorstop(global,err_deallocate,__line__,
'cv')
380 INTEGER,
INTENT(IN) :: gathermode,ictype
381 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: cv
382 TYPE(t_region
),
POINTER :: pregion
388 INTEGER :: errorflag,icg,icl,ivar,ncells,nvars
389 INTEGER,
DIMENSION(:),
POINTER :: pxyz2cellglob
390 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pvar
392 TYPE(t_grid),
POINTER :: pgrid
398 global => pregion%global
401 'RFLU_ModGatherData.F90')
407 pgrid => pregion%grid
413 SELECT CASE ( gathermode )
414 CASE ( gather_mode_actual_only )
415 SELECT CASE ( ictype )
416 CASE ( cell_type_tet )
418 pxyz2cellglob => pgrid%tet2CellGlob
419 CASE ( cell_type_hex )
421 pxyz2cellglob => pgrid%hex2CellGlob
422 CASE ( cell_type_pri )
424 pxyz2cellglob => pgrid%pri2CellGlob
425 CASE ( cell_type_pyr )
427 pxyz2cellglob => pgrid%pyr2CellGlob
429 CALL
errorstop(global,err_reached_default,__line__)
431 CASE ( gather_mode_actual_virtual )
432 SELECT CASE ( ictype )
433 CASE ( cell_type_tet )
434 ncells = pgrid%nTetsTot
435 pxyz2cellglob => pgrid%tet2CellGlob
436 CASE ( cell_type_hex )
437 ncells = pgrid%nHexsTot
438 pxyz2cellglob => pgrid%hex2CellGlob
439 CASE ( cell_type_pri )
440 ncells = pgrid%nPrisTot
441 pxyz2cellglob => pgrid%pri2CellGlob
442 CASE ( cell_type_pyr )
443 ncells = pgrid%nPyrsTot
444 pxyz2cellglob => pgrid%pyr2CellGlob
446 CALL
errorstop(global,err_reached_default,__line__)
449 CALL
errorstop(global,err_reached_default,__line__)
457 icg = pxyz2cellglob(icl)
465 pvar => pregion%mixt%cv
467 DO ivar = cv_mixt_dens,cv_mixt_ener
469 cv(nvars,icl) = pvar(ivar,icg)
477 IF ( global%specUsed .EQV. .true. )
THEN
478 pvar => pregion%spec%cv
480 DO ivar = 1,pregion%specInput%nSpecies
482 cv(nvars,icl) = pvar(ivar,icg)
531 INTEGER,
INTENT(IN) :: gathermode,ictype
532 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: cv
533 TYPE(t_region
),
POINTER :: pregion
539 INTEGER :: errorflag,icg,icl,ivar,ncells,nvars
540 INTEGER,
DIMENSION(:),
POINTER :: pxyz2cellglob
541 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pvar
543 TYPE(t_grid),
POINTER :: pgrid
549 global => pregion%global
552 'RFLU_ModGatherData.F90')
558 pgrid => pregion%grid
564 SELECT CASE ( gathermode )
565 CASE ( gather_mode_actual_only )
566 SELECT CASE ( ictype )
567 CASE ( cell_type_tet )
569 pxyz2cellglob => pgrid%tet2CellGlob
570 CASE ( cell_type_hex )
572 pxyz2cellglob => pgrid%hex2CellGlob
573 CASE ( cell_type_pri )
575 pxyz2cellglob => pgrid%pri2CellGlob
576 CASE ( cell_type_pyr )
578 pxyz2cellglob => pgrid%pyr2CellGlob
580 CALL
errorstop(global,err_reached_default,__line__)
582 CASE ( gather_mode_actual_virtual )
583 SELECT CASE ( ictype )
584 CASE ( cell_type_tet )
585 ncells = pgrid%nTetsTot
586 pxyz2cellglob => pgrid%tet2CellGlob
587 CASE ( cell_type_hex )
588 ncells = pgrid%nHexsTot
589 pxyz2cellglob => pgrid%hex2CellGlob
590 CASE ( cell_type_pri )
591 ncells = pgrid%nPrisTot
592 pxyz2cellglob => pgrid%pri2CellGlob
593 CASE ( cell_type_pyr )
594 ncells = pgrid%nPyrsTot
595 pxyz2cellglob => pgrid%pyr2CellGlob
597 CALL
errorstop(global,err_reached_default,__line__)
600 CALL
errorstop(global,err_reached_default,__line__)
608 icg = pxyz2cellglob(icl)
616 pvar => pregion%mixt%cv
618 DO ivar = cv_mixt_dens,cv_mixt_ener
620 pvar(ivar,icg) = cv(nvars,icl)
628 IF ( global%specUsed .EQV. .true. )
THEN
629 pvar => pregion%spec%cv
631 DO ivar = 1,pregion%specInput%nSpecies
633 pvar(ivar,icg) = cv(nvars,icl)
subroutine registerfunction(global, funName, fileName)
subroutine, public rflu_creategathereddata(pRegion, icType, gatherMode, nVarsOut, cv)
subroutine, public rflu_destroygathereddata(pRegion, cv)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine, public rflu_countgathereddata(pRegion, nVarsOut)
subroutine deregisterfunction(global)
subroutine, public rflu_gatherdata(pRegion, icType, gatherMode, cv)
subroutine, public rflu_scattergathereddata(pRegion, icType, gatherMode, cv)