56 USE moddatastruct, ONLY : t_dcell, t_dcelltransf, t_region, t_level
71 TYPE(t_region
),
POINTER :: regions(:)
73 INTEGER,
INTENT(IN) :: ir,ireg
74 INTEGER,
INTENT(OUT) :: nbuffsizeedge
80 CHARACTER(CHRLEN) :: rcsidentstring
83 INTEGER :: iaiv,iarv,iarvold,ibuff,ibuffsendi, ibuffsendr,icont, &
84 icv,icvmass,icvold,irhs,irhssum,ishifti,ishiftr, &
85 narv,naiv,ncont,ncv,ndimi,ndimr,nsendbuffi,nsendbuffr
87 INTEGER,
POINTER,
DIMENSION(:) :: pcvplagmass,psendbuffi
88 INTEGER,
POINTER,
DIMENSION(:,:) :: paive, paivolde
90 REAL(RFREAL),
POINTER,
DIMENSION(:) :: psendbuffr
91 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: parve,parvolde,pcve,pcvolde, &
95 TYPE(t_dcelltransf
),
POINTER :: psendeccell
97 TYPE(t_level
),
POINTER :: plevelsrc
98 TYPE(t_plag),
POINTER :: pplag
99 TYPE(t_region
),
POINTER :: pregionsrc
105 rcsidentstring =
'$RCSfile: PLAG_EdgeCellsLoadSendBuff.F90,v $ $Revision: 1.3 $'
107 global => regions(ireg)%global
110 'PLAG_EdgeCellsLoadSendBuff.F90' )
116 ilev = regions(ireg)%currLevel
125 pregionsrc => regions(ireg)
126 plevelsrc => pregionsrc%levels(ilev)
127 pplag => plevelsrc%plag
128 pcvplagmass => pplag%cvPlagMass
136 ncont = pregionsrc%plagInput%nCont
140 ndimr = 2*narv +4*ncv
146 IF ( plevelsrc%sendEcCells(ir)%nCells > 0 )
THEN
147 psendeccell => plevelsrc%sendEcCells(ir)
148 psendbuffi => psendeccell%buffplagI
149 psendbuffr => psendeccell%buffplagR
157 IF( .NOT. plevelsrc%edgeCells(iedge)%interact ) goto 2999
161 IF( plevelsrc%edgeCells(iedge)%degenrt /= degenerat_none ) goto 2999
163 ibuffsendi = 0; ibuffsendr = 0;
164 ishifti = 0; ishiftr = 0;
166 DO ijk=1,ubound(plevelsrc%edgeCells(iedge)%cells,1)
167 iregdes = plevelsrc%edgeCells(iedge)%cells(ijk)%srcRegion
173 pedgecellsxbuff => plevelsrc%edgeCells(iedge)%cells(ijk)%bufferExchPlag
175 paive => pedgecellsxbuff%aiv
176 parve => pedgecellsxbuff%arv
177 pcve => pedgecellsxbuff%cv
178 prhse => pedgecellsxbuff%rhs
179 prhssume => pedgecellsxbuff%rhsSum
181 paivolde => pedgecellsxbuff%aivOld
182 parvolde => pedgecellsxbuff%arvOld
183 pcvolde => pedgecellsxbuff%cvOld
185 IF ( iregdes == ir .AND. pedgecellsxbuff%nBuffSize /= 0 .AND. &
186 regions(iregdes)%procid /= global%myProcid )
THEN
187 nbuffsizeedge = nbuffsizeedge +pedgecellsxbuff%nBuffSize
196 DO ibuff = 1, pedgecellsxbuff%nBuffSize
197 ibuffsendi = ishifti +ndimi*(ibuff-1) +1
200 psendbuffi(iaiv ) = paive(aiv_plag_pidini,ibuff)
201 psendbuffi(iaiv+1) = paive(aiv_plag_regini,ibuff)
202 psendbuffi(iaiv+2) = paive(aiv_plag_regcrt,ibuff)
203 psendbuffi(iaiv+3) = paive(aiv_plag_icells,ibuff)
204 psendbuffi(iaiv+4) = paive(aiv_plag_indexi,ibuff)
205 psendbuffi(iaiv+5) = paive(aiv_plag_indexj,ibuff)
206 psendbuffi(iaiv+6) = paive(aiv_plag_indexk,ibuff)
207 psendbuffi(iaiv+7) = paive(aiv_plag_burnstat,ibuff)
208 psendbuffi(iaiv+8) = paive(aiv_plag_status,ibuff)
210 #ifdef PLAG_CECELLS_MPI_DEBUG
211 IF ( ireg==1 )
WRITE(stdout,
'(A,A,15(2X,I5))') &
212 ' PLAG_EdgeCellsLoadSendBuff-INT: procSrc, iReg, procDes,',&
213 ' iRegDes,iEdge,ijk,iBuff,iBuffSendI,iShiftI,iAiv = ',&
214 global%myProcid,ireg,ireg,regions(iregdes)%procid,iregdes,iedge, &
215 ijk,ibuff,ibuffsendi,ishifti,iaiv
217 IF(ireg==1)
WRITE(stdout,
'(A,10(2X,I5))')
'iBuff, iAiv,pSendBuffI =',&
239 DO ibuff = 1, pedgecellsxbuff%nBuffSize
240 ibuffsendr = ishiftr +ndimr*(ibuff-1) +1
242 irhs = ibuffsendr +ncv
243 irhssum = ibuffsendr +2*ncv
244 icvold = ibuffsendr +3*ncv
245 iarv = ibuffsendr +4*ncv
246 iarvold = ibuffsendr +4*ncv +narv
248 #ifdef PLAG_CECELLS_MPI_DEBUG
249 IF ( ireg==1 )
WRITE(stdout,
'(A,10(2X,I5))') &
250 ' PLAG_EdgeCellsLoadSendBuff--REAL:procSrc,iReg,procDes,iBuff,iBuffSendR,iShiftR',&
251 global%myProcid, ireg, regions(iregdes)%procid, iregdes, ibuff, ibuffsendr,ishiftr
252 IF ( ireg==1 )
WRITE(stdout,
'(A,A,10(2X,I5))') &
253 ' PLAG_EdgeCellsLoadSendBuff--REAL:procSrc,iReg,procDes,iCv,',&
254 'iRhs,iRhsSum, iCvOld, iArv, iArvOld = ',&
255 global%myProcid, ireg,regions(iregdes)%procid,iregdes,icv, &
256 irhs, irhssum, icvold, iarv, iarvold
263 psendbuffr(icv ) = pcve(cv_plag_xmom,ibuff)
264 psendbuffr(icv+1) = pcve(cv_plag_ymom,ibuff)
265 psendbuffr(icv+2) = pcve(cv_plag_zmom,ibuff)
266 psendbuffr(icv+3) = pcve(cv_plag_ener,ibuff)
267 psendbuffr(icv+4) = pcve(cv_plag_xpos,ibuff)
268 psendbuffr(icv+5) = pcve(cv_plag_ypos,ibuff)
269 psendbuffr(icv+6) = pcve(cv_plag_zpos,ibuff)
270 psendbuffr(icv+7) = pcve(cv_plag_enervapor,ibuff)
272 icvmass = pcvplagmass(icont)
273 psendbuffr(icv+(cv_plag_last-1)+icont) = pcve(icvmass,ibuff)
280 psendbuffr(irhs ) = prhse(cv_plag_xmom,ibuff)
281 psendbuffr(irhs+1) = prhse(cv_plag_ymom,ibuff)
282 psendbuffr(irhs+2) = prhse(cv_plag_zmom,ibuff)
283 psendbuffr(irhs+3) = prhse(cv_plag_ener,ibuff)
284 psendbuffr(irhs+4) = prhse(cv_plag_xpos,ibuff)
285 psendbuffr(irhs+5) = prhse(cv_plag_ypos,ibuff)
286 psendbuffr(irhs+6) = prhse(cv_plag_zpos,ibuff)
287 psendbuffr(irhs+7) = prhse(cv_plag_enervapor,ibuff)
289 icvmass = pcvplagmass(icont)
290 psendbuffr(irhs+(cv_plag_last-1)+icont) = prhse(icvmass,ibuff)
297 psendbuffr(irhssum ) = prhssume(cv_plag_xmom,ibuff)
298 psendbuffr(irhssum+1) = prhssume(cv_plag_ymom,ibuff)
299 psendbuffr(irhssum+2) = prhssume(cv_plag_zmom,ibuff)
300 psendbuffr(irhssum+3) = prhssume(cv_plag_ener,ibuff)
301 psendbuffr(irhssum+4) = prhssume(cv_plag_xpos,ibuff)
302 psendbuffr(irhssum+5) = prhssume(cv_plag_ypos,ibuff)
303 psendbuffr(irhssum+6) = prhssume(cv_plag_zpos,ibuff)
304 psendbuffr(irhssum+7) = prhssume(cv_plag_enervapor,ibuff)
306 icvmass = pcvplagmass(icont)
307 psendbuffr(irhssum+(cv_plag_last-1)+icont) = prhssume(icvmass,ibuff)
314 psendbuffr(icvold ) = pcvolde(cv_plag_xmom,ibuff)
315 psendbuffr(icvold+1) = pcvolde(cv_plag_ymom,ibuff)
316 psendbuffr(icvold+2) = pcvolde(cv_plag_zmom,ibuff)
317 psendbuffr(icvold+3) = pcvolde(cv_plag_ener,ibuff)
318 psendbuffr(icvold+4) = pcvolde(cv_plag_xpos,ibuff)
319 psendbuffr(icvold+5) = pcvolde(cv_plag_ypos,ibuff)
320 psendbuffr(icvold+6) = pcvolde(cv_plag_zpos,ibuff)
321 psendbuffr(icvold+7) = pcvolde(cv_plag_enervapor,ibuff)
323 icvmass = pcvplagmass(icont)
324 psendbuffr(icvold+(cv_plag_last-1)+icont) = pcvolde(icvmass,ibuff)
331 psendbuffr(iarv) = parve(arv_plag_spload,ibuff)
332 psendbuffr(iarvold) = parvolde(arv_plag_spload,ibuff)
334 #ifdef PLAG_CECELLS_MPI_DEBUG
335 IF ( ireg==1 )
WRITE(stdout,
'(A,A,10(2X,I5))') &
336 ' PLAG_EdgeCellsLoadSendBuff-REAL: procSrc, iReg, procDes,iRegDes,',&
337 'iEdge,iBuff,iBuffSendR,iCv = ',&
338 global%myProcid,ireg,ireg,regions(iregdes)%procid,iregdes,&
339 iedge,ibuff,ibuffsendr,icv
341 IF (ireg==1 )
WRITE(stdout,
'(A,2(2X,I5),15(2X,1PE12.5))')
'iBuff, iCv,pSendBuffR =',&
351 psendbuffr(icv+(cv_plag_last-1)+1:icv+(cv_plag_last-1)+ncont)
360 ishifti = ibuffsendi +ndimi -1
361 ishiftr = ibuffsendr +ndimr -1
366 #ifdef PLAG_CECELLS_MPI_DEBUG
367 IF ( nbuffsizeedge > 0 ) &
368 print*,
' PLAG_EdgeCellsLoadSendBuff: procId, iReg, iR, procIdiR, iEdge, nBuffSizeEdge,iRegDes = ',&
369 global%myProcid, ireg, ir, regions(ir)%procid ,iedge, nbuffsizeedge,iregdes
subroutine plag_edgecellsloadsendbuff(regions, iReg, ir, nBuffSizeEdge)
subroutine registerfunction(global, funName, fileName)
**********************************************************************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 icell
subroutine deregisterfunction(global)