58 USE moddatastruct, ONLY : t_dcell, t_dcelltransf, t_region, t_level
73 TYPE(t_region
),
POINTER :: regions(:)
75 INTEGER,
INTENT(IN) :: ir,ireg
76 INTEGER,
INTENT(IN) :: nbuffsizeedge
77 INTEGER,
INTENT(OUT) :: nbuffsizecorn
83 CHARACTER(CHRLEN) :: rcsidentstring
86 INTEGER :: iaiv,iarv,iarvold,ibuff,ibuffsendi,ibuffsendr,icont, &
87 icv,icvmass,icvold,irhs,irhssum,ishifti,ishiftr, &
88 narv,naiv,ncont,ncv,ndimi,ndimr,nsendbuffi,nsendbuffr
90 INTEGER,
POINTER,
DIMENSION(:) :: pcvplagmass,psendbuffi
91 INTEGER,
POINTER,
DIMENSION(:,:) :: paivc, paivoldc
93 REAL(RFREAL),
POINTER,
DIMENSION(:) :: psendbuffr
94 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: parvc,parvoldc,pcvc,pcvoldc, &
98 TYPE(t_dcelltransf
),
POINTER :: psendeccell
100 TYPE(t_level
),
POINTER :: plevelsrc
101 TYPE(t_plag),
POINTER :: pplag
102 TYPE(t_region
),
POINTER :: pregionsrc
108 rcsidentstring =
'$RCSfile: PLAG_CornCellsLoadSendBuff.F90,v $ $Revision: 1.3 $'
110 global => regions(ireg)%global
113 'PLAG_CornCellsLoadSendBuff.F90' )
119 ilev = regions(ireg)%currLevel
128 pregionsrc => regions(ireg)
129 plevelsrc => pregionsrc%levels(ilev)
130 pplag => plevelsrc%plag
131 pcvplagmass => pplag%cvPlagMass
139 ncont = pregionsrc%plagInput%nCont
143 ndimr = 2*narv +4*ncv
149 IF ( plevelsrc%sendEcCells(ir)%nCells > 0 )
THEN
150 psendeccell => plevelsrc%sendEcCells(ir)
151 psendbuffi => psendeccell%buffplagI
152 psendbuffr => psendeccell%buffplagR
160 IF( .NOT. plevelsrc%cornerCells(
icorner)%interact ) goto 2999
164 IF( plevelsrc%cornerCells(
icorner)%degenrt /= degenerat_none ) goto 2999
166 ibuffsendi = nbuffsizeedge; ibuffsendr = nbuffsizeedge;
167 ishifti = nbuffsizeedge; ishiftr = nbuffsizeedge;
169 DO ijk=1,ubound(plevelsrc%cornerCells(
icorner)%cells,1)
170 iregdes = plevelsrc%cornerCells(
icorner)%cells(ijk)%srcRegion
176 pcorncellsxbuff => plevelsrc%cornerCells(
icorner)%cells(ijk)%bufferExchPlag
178 paivc => pcorncellsxbuff%aiv
179 parvc => pcorncellsxbuff%arv
180 pcvc => pcorncellsxbuff%cv
181 prhsc => pcorncellsxbuff%rhs
182 prhssumc => pcorncellsxbuff%rhsSum
184 paivoldc => pcorncellsxbuff%aivOld
185 parvoldc => pcorncellsxbuff%arvOld
186 pcvoldc => pcorncellsxbuff%cvOld
188 IF ( iregdes == ir .AND. pcorncellsxbuff%nBuffSize /= 0 .AND. &
189 regions(iregdes)%procid /= global%myProcid )
THEN
190 nbuffsizecorn = nbuffsizecorn +pcorncellsxbuff%nBuffSize
198 DO ibuff = 1, pcorncellsxbuff%nBuffSize
199 ibuffsendi = ishifti +ndimi*(ibuff-1) +1
202 psendbuffi(iaiv ) = paivc(aiv_plag_pidini,ibuff)
203 psendbuffi(iaiv+1) = paivc(aiv_plag_regini,ibuff)
204 psendbuffi(iaiv+2) = paivc(aiv_plag_regcrt,ibuff)
205 psendbuffi(iaiv+3) = paivc(aiv_plag_icells,ibuff)
206 psendbuffi(iaiv+4) = paivc(aiv_plag_indexi,ibuff)
207 psendbuffi(iaiv+5) = paivc(aiv_plag_indexj,ibuff)
208 psendbuffi(iaiv+6) = paivc(aiv_plag_indexk,ibuff)
209 psendbuffi(iaiv+7) = paivc(aiv_plag_burnstat,ibuff)
210 psendbuffi(iaiv+8) = paivc(aiv_plag_status,ibuff)
212 #ifdef PLAG_CECELLS_MPI_DEBUG
214 WRITE(stdout,*)
' PLAG_CornCellsLoadSendBuff-INT: procSrc, iReg, procDes,iRegDes,iCorner,iBuff,iBuffSendI,iAiv = ',&
215 global%myProcid,ireg,ireg,regions(iregdes)%procid,iregdes,
icorner,ibuff,ibuffsendi,iaiv
225 DO ibuff = 1, pcorncellsxbuff%nBuffSize
226 ibuffsendr = ishiftr +ndimr*(ibuff-1) +1
228 irhs = ibuffsendr +ncv
229 irhssum = ibuffsendr +2*ncv
230 icvold = ibuffsendr +3*ncv
231 iarv = ibuffsendr +4*ncv
232 iarvold = ibuffsendr +4*ncv +narv
234 #ifdef PLAG_CECELLS_MPI_DEBUG
236 WRITE(stdout,*)
' PLAG_EdgeCellsLoadSendBuff--REAL:procSrc,iReg,procDes,iCorner,iBuff,iBuffSendR',&
237 global%myProcid, ireg, regions(iregdes)%procid, iregdes,
icorner,ibuff, ibuffsendr
239 WRITE(stdout,*)
' PLAG_EdgeCellsLoadSendBuff--REAL:procSrc,iReg,procDes,iRegDes,iCv,iRhs,iRhsSum, iCvOld, iArv, iArvOld = ',&
240 global%myProcid, ireg,regions(iregdes)%procid,iregdes,icv,irhs, irhssum, icvold, iarv, iarvold
247 psendbuffr(icv ) = pcvc(cv_plag_xmom,ibuff)
248 psendbuffr(icv+1) = pcvc(cv_plag_ymom,ibuff)
249 psendbuffr(icv+2) = pcvc(cv_plag_zmom,ibuff)
250 psendbuffr(icv+3) = pcvc(cv_plag_ener,ibuff)
251 psendbuffr(icv+4) = pcvc(cv_plag_xpos,ibuff)
252 psendbuffr(icv+5) = pcvc(cv_plag_ypos,ibuff)
253 psendbuffr(icv+6) = pcvc(cv_plag_zpos,ibuff)
254 psendbuffr(icv+7) = pcvc(cv_plag_enervapor,ibuff)
256 icvmass = pcvplagmass(icont)
257 psendbuffr(icv+(cv_plag_last-1)+icont) = pcvc(icvmass,ibuff)
264 psendbuffr(irhs ) = prhsc(cv_plag_xmom,ibuff)
265 psendbuffr(irhs+1) = prhsc(cv_plag_ymom,ibuff)
266 psendbuffr(irhs+2) = prhsc(cv_plag_zmom,ibuff)
267 psendbuffr(irhs+3) = prhsc(cv_plag_ener,ibuff)
268 psendbuffr(irhs+4) = prhsc(cv_plag_xpos,ibuff)
269 psendbuffr(irhs+5) = prhsc(cv_plag_ypos,ibuff)
270 psendbuffr(irhs+6) = prhsc(cv_plag_zpos,ibuff)
271 psendbuffr(irhs+7) = prhsc(cv_plag_enervapor,ibuff)
273 icvmass = pcvplagmass(icont)
274 psendbuffr(irhs+(cv_plag_last-1)+icont) = prhsc(icvmass,ibuff)
281 psendbuffr(irhssum ) = prhssumc(cv_plag_xmom,ibuff)
282 psendbuffr(irhssum+1) = prhssumc(cv_plag_ymom,ibuff)
283 psendbuffr(irhssum+2) = prhssumc(cv_plag_zmom,ibuff)
284 psendbuffr(irhssum+3) = prhssumc(cv_plag_ener,ibuff)
285 psendbuffr(irhssum+4) = prhssumc(cv_plag_xpos,ibuff)
286 psendbuffr(irhssum+5) = prhssumc(cv_plag_ypos,ibuff)
287 psendbuffr(irhssum+6) = prhssumc(cv_plag_zpos,ibuff)
288 psendbuffr(irhssum+7) = prhssumc(cv_plag_enervapor,ibuff)
290 icvmass = pcvplagmass(icont)
291 psendbuffr(irhssum+(cv_plag_last-1)+icont) = prhssumc(icvmass,ibuff)
298 psendbuffr(icvold ) = pcvoldc(cv_plag_xmom,ibuff)
299 psendbuffr(icvold+1) = pcvoldc(cv_plag_ymom,ibuff)
300 psendbuffr(icvold+2) = pcvoldc(cv_plag_zmom,ibuff)
301 psendbuffr(icvold+3) = pcvoldc(cv_plag_ener,ibuff)
302 psendbuffr(icvold+4) = pcvoldc(cv_plag_xpos,ibuff)
303 psendbuffr(icvold+5) = pcvoldc(cv_plag_ypos,ibuff)
304 psendbuffr(icvold+6) = pcvoldc(cv_plag_zpos,ibuff)
305 psendbuffr(icvold+7) = pcvoldc(cv_plag_enervapor,ibuff)
307 icvmass = pcvplagmass(icont)
308 psendbuffr(icvold+(cv_plag_last-1)+icont) = pcvoldc(icvmass,ibuff)
315 psendbuffr(iarv) = parvc(arv_plag_spload,ibuff)
316 psendbuffr(iarvold) = parvoldc(arv_plag_spload,ibuff)
324 ishifti = ibuffsendi +ndimi -1
325 ishiftr = ibuffsendr +ndimr -1
330 #ifdef PLAG_CECELLS_MPI_DEBUG
331 IF ( nbuffsizecorn > 0 ) &
332 print*,
' PLAG_CornCellsLoadSendBuff: procId, iReg, iR, procIdiR, iCorner, nBuffSizeEdge,iRegDes = ',&
333 global%myProcid, ireg, ir, regions(ir)%procid ,
icorner, nbuffsizeedge,iregdes
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 icorner
**********************************************************************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)
subroutine plag_corncellsloadsendbuff(regions, iReg, ir, nBuffSizeEdge, nBuffSizeCorn)