56 TYPE(t_region
),
POINTER :: regions(:)
61 INTEGER :: ipatch, ilev, ir
64 INTEGER :: bctype, iregsrc, n1, n2, n1src, n2src, neqs, neqssrc, &
65 ndc, ndcsrc, ndim, ndimsrc, errorflag
69 TYPE(t_dcelltransf
),
POINTER :: sendeccell, recveccell
73 global => regions(ireg)%global
76 'RFLO_AllocateDataBuffers.F90' )
80 DO ilev=1,regions(ireg)%nGridLevels
81 DO ipatch=1,regions(ireg)%nPatches
83 patch => regions(ireg)%levels(ilev)%patches(ipatch)
86 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
87 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR. &
88 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range))
THEN
89 iregsrc =
patch%srcRegion
90 IF (regions(iregsrc)%procid /= global%myProcid)
THEN
96 neqssrc = cv_mixt_neqs
97 ndc = regions(ireg )%nDumCells
98 ndcsrc = regions(iregsrc)%nDumCells
100 ndimsrc = n1src*n2src*neqssrc*ndcsrc
101 ALLOCATE(
patch%mixt%sendBuff(ndimsrc),stat=errorflag )
102 ALLOCATE(
patch%mixt%recvBuff(ndim ),stat=errorflag )
103 global%error = errorflag
104 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
105 patch%mixt%nSendBuff = ndimsrc
106 patch%mixt%nRecvBuff = ndim
107 global%nRequests = global%nRequests + 1
108 patch%mixt%iRequest = global%nRequests
110 ELSE IF ((bctype>=bc_regionint .AND. bctype<=bc_regionint +bc_range) .OR. &
111 (bctype>=bc_regnonconf .AND. bctype<=bc_regnonconf+bc_range))
THEN
112 CALL
errorstop( global,err_unknown_bc,__line__ )
120 IF (global%nProcAlloc > 1)
THEN
122 DO ilev=1,regions(ireg)%nGridLevels
123 DO ir=1,global%nRegions
124 sendeccell => regions(ireg)%levels(ilev)%sendEcCells(ir)
125 recveccell => regions(ireg)%levels(ilev)%recvEcCells(ir)
126 IF (sendeccell%nCells > 0)
THEN
127 global%nRequests = global%nRequests + 1
128 sendeccell%iRequest = global%nRequests
129 ALLOCATE( sendeccell%buff(sendeccell%nCells*cv_mixt_neqs), &
131 global%error = errorflag
132 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
134 IF (recveccell%nCells > 0)
THEN
135 recveccell%iRequest = -999999
136 ALLOCATE( recveccell%buff(recveccell%nCells*cv_mixt_neqs), &
138 global%error = errorflag
139 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
subroutine rflo_allocatedatabuffers(regions, iReg)
subroutine registerfunction(global, funName, fileName)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)