65 TYPE(t_region
),
POINTER :: regions(:)
67 INTEGER,
INTENT(IN) :: ireg
70 INTEGER ::
i,
j,
k, ijk, iedge, iedgecellbuff, ipcls
73 CHARACTER(CHRLEN) :: rcsidentstring
75 INTEGER :: ilev, ipclsregin,
nedges, npcls, npclsprev
76 INTEGER :: icoff, ijcoff
77 INTEGER :: ijkcsrc, ijkesrc
78 INTEGER :: iecdes, jecdes, kecdes, ijkecdes
82 INTEGER :: icoffdes, ijcoffdes, ndumcellsdes, iregdes
83 INTEGER :: ibegedgecell,iendedgecell
84 INTEGER :: errorflag,iecmax
85 INTEGER :: lpclsfoundinedgecellsum
86 INTEGER :: npclsbeg, npclsend
88 INTEGER,
DIMENSION(12) :: lpclsfoundinedgecell
89 INTEGER,
POINTER,
DIMENSION(:,:) :: paiv, paivold
90 INTEGER,
POINTER,
DIMENSION(:,:) :: paivc, paivoldc
91 INTEGER,
POINTER,
DIMENSION(:,:) :: paive, paivolde
92 INTEGER,
ALLOCATABLE,
DIMENSION(:,:) :: edgecellcounter
94 LOGICAL :: pclsfoundinedgecell
96 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: parv, parvold, pcv, pcvold, &
97 pdv, ptv, prhs, prhssum
98 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: parve, parvolde,pcve, pcvolde, &
99 pdve, ptve, prhse, prhssume
101 TYPE(t_region
),
POINTER :: pregion
102 TYPE(t_level
),
POINTER :: plevel
103 TYPE(t_plag),
POINTER :: pplag
110 '$RCSfile: PLAG_EdgeCellsLoadData.F90,v $ $Revision: 1.5 $'
112 global => regions(ireg)%global
115 'PLAG_EdgeCellsLoadData.F90' )
119 ilev = regions(ireg)%currLevel
120 npcls = regions(ireg)%levels(ilev)%plag%nPcls
125 pregion => regions(ireg)
126 plevel => regions(ireg)%levels(ilev)
134 prhssum => pplag%rhsSum
136 paivold => pplag%aivOld
137 parvold => pplag%arvOld
138 pcvold => pplag%cvOld
142 IF ( pplag%nPcls == 0 ) goto 3999
158 pclsfoundinedgecell = .false.
159 lpclsfoundinedgecell = 0
165 IF( plevel%edgeCells(iedge)%interact ) &
166 iecmax =
max(iecmax,ubound(plevel%edgeCells(iedge)%cells,1))
169 ALLOCATE( edgecellcounter(
nedges,iecmax),stat=errorflag )
170 global%error = errorflag
171 IF (global%error /= err_none) &
172 CALL
errorstop( global,err_allocate,__line__ )
176 #ifdef PLAG_CECELLS_DEBUG
177 print*,
'PLAG_EdgeCellsLoadData: iReg,iECMax = ', ireg, iecmax
184 icplag = paiv(aiv_plag_indexi,ipcls)
185 jcplag = paiv(aiv_plag_indexj,ipcls)
186 kcplag = paiv(aiv_plag_indexk,ipcls)
187 ijkcplag = paiv(aiv_plag_icells,ipcls)
189 lpclsfoundinedgecell = 0
197 IF( .NOT. plevel%edgeCells(iedge)%interact ) goto 999
201 IF( plevel%edgeCells(iedge)%degenrt /= degenerat_none ) goto 999
209 iendedgecell = indijk(
iend,
jend,kend,icoff,ijcoff)
214 IF ( icplag >=
ibeg .AND. icplag <=
iend .AND. &
215 jcplag >=
jbeg .AND. jcplag <=
jend .AND. &
216 kcplag >=
kbeg .AND. kcplag <= kend )
THEN
217 lpclsfoundinedgecell(iedge) = 1
218 pclsfoundinedgecell = .true.
221 #ifdef PLAG_CECELLS_DEBUG
222 print*,
'PLAG_EdgeCellsLoadData: iReg,iEdge,iPcls,ibeg,iend,jbeg,jend,kbeg,kend,',&
223 'ibegEdgeCell, iendEdgeCell,i-j-kCPlag,ijkCPlag,nPcls,lPclsFoundInEdgeCell',&
225 ibegedgecell, iendedgecell,icplag,jcplag,kcplag,ijkcplag,npcls, &
226 lpclsfoundinedgecell(iedge)
238 IF( .NOT. plevel%edgeCells(iedge)%interact ) goto 2999
242 IF( plevel%edgeCells(iedge)%degenrt /= degenerat_none ) goto 2999
252 lpclsfoundinedgecellsum =
sum( lpclsfoundinedgecell )
257 IF ( lpclsfoundinedgecellsum == 0 )
THEN
259 ipclsregin = ipclsregin + 1
261 #ifdef PLAG_CECELLS_DEBUG
262 print*,
' PLAG_EdgeCellsLoadData: iReg, iEdge, iPcls,iPclsRegIn =',&
263 ireg, iedge, ipcls,ipclsregin
266 IF ( ipclsregin /= ipcls )
THEN
267 paiv( :,ipclsregin) = paiv( :,ipcls)
268 parv( :,ipclsregin) = parv( :,ipcls)
269 pcv( :,ipclsregin) = pcv( :,ipcls)
270 pdv( :,ipclsregin) = pdv( :,ipcls)
271 ptv( :,ipclsregin) = ptv( :,ipcls)
272 prhs( :,ipclsregin) = prhs( :,ipcls)
273 prhssum(:,ipclsregin) = prhssum(:,ipcls)
275 paivold(:,ipclsregin) = paivold(:,ipcls)
276 parvold(:,ipclsregin) = parvold(:,ipcls)
277 pcvold( :,ipclsregin) = pcvold( :,ipcls)
284 IF ( lpclsfoundinedgecell(iedge) == 1 )
THEN
293 ijkesrc = indijk(
i,
j,
k,icoff, ijcoff)
297 pedgecellsxbuff => plevel%edgeCells(iedge)%cells(ijk)%bufferExchPlag
299 paive => pedgecellsxbuff%aiv
300 parve => pedgecellsxbuff%arv
301 pcve => pedgecellsxbuff%cv
302 pdve => pedgecellsxbuff%dv
303 ptve => pedgecellsxbuff%tv
304 prhse => pedgecellsxbuff%rhs
305 prhssume => pedgecellsxbuff%rhsSum
307 paivolde => pedgecellsxbuff%aivOld
308 parvolde => pedgecellsxbuff%arvOld
309 pcvolde => pedgecellsxbuff%cvOld
313 iregdes = plevel%edgeCells(iedge)%cells(ijk)%srcRegion
315 IF ( iregdes > 0 .AND. ijkcplag == ijkesrc .AND. &
316 pedgecellsxbuff%nBuffSize /= 0 )
THEN
317 ijkecdes = plevel%edgeCells(iedge)%cells(ijk)%srcCell
318 ndumcellsdes = regions(iregdes)%nDumCells
321 CALL
getijk( ijkecdes,icoffdes,ijcoffdes,ndumcellsdes, &
322 iecdes,jecdes,kecdes )
324 edgecellcounter(iedge,ijk) = edgecellcounter(iedge,ijk)+1
325 iedgecellbuff = edgecellcounter(iedge,ijk)
327 #ifdef PLAG_CECELLS_DEBUG
328 WRITE(stdout,*)
' PLAG_EdgeCellsLoadData: iReg,iPcls,iEdge,iRegDes,iEdgeCellBuff ', &
329 ireg, ipcls, iedge, iregdes, iedgecellbuff
334 paive(aiv_plag_icells,iedgecellbuff) = ijkecdes
335 paive(aiv_plag_indexi,iedgecellbuff) = iecdes
336 paive(aiv_plag_indexj,iedgecellbuff) = jecdes
337 paive(aiv_plag_indexk,iedgecellbuff) = kecdes
338 paive(aiv_plag_pidini,iedgecellbuff) = paiv(aiv_plag_pidini,ipcls)
339 paive(aiv_plag_regini,iedgecellbuff) = paiv(aiv_plag_regini,ipcls)
340 paive(aiv_plag_regcrt,iedgecellbuff) = iregdes
341 paive(aiv_plag_burnstat,iedgecellbuff) = paiv(aiv_plag_burnstat,ipcls)
342 paive(aiv_plag_status,iedgecellbuff) = paiv(aiv_plag_status,ipcls)
344 paivolde(: ,iedgecellbuff) = paive(:,iedgecellbuff)
348 parve( :,iedgecellbuff) = parv( :,ipcls)
349 pcve( :,iedgecellbuff) = pcv( :,ipcls)
350 pdve( :,iedgecellbuff) = pdv( :,ipcls)
351 ptve( :,iedgecellbuff) = ptv( :,ipcls)
352 prhse( :,iedgecellbuff) = prhs( :,ipcls)
353 prhssume(:,iedgecellbuff) = prhssum(:,ipcls)
355 parvolde(:,iedgecellbuff) = parvold(:,ipcls)
356 pcvolde( :,iedgecellbuff) = pcvold( :,ipcls)
358 #ifdef PLAG_CECELLS_DEBUG
360 ' PLAG_EdgeCellsLoadData: iReg, iEdge, iEdgeCellBuff, nEdgeBuffSize, pAiv', &
361 ireg, iedge, iedgecellbuff, pedgecellsxbuff%nBuffSize,&
362 paive(aiv_plag_icells,iedgecellbuff),&
363 paive(aiv_plag_indexi,iedgecellbuff),&
364 paive(aiv_plag_indexj,iedgecellbuff),&
365 paive(aiv_plag_indexk,iedgecellbuff),&
366 paive(aiv_plag_pidini,iedgecellbuff),&
367 paive(aiv_plag_regini,iedgecellbuff),&
368 paive(aiv_plag_regcrt,iedgecellbuff),&
369 paive(aiv_plag_burnstat,iedgecellbuff)
382 IF ( lpclsfoundinedgecellsum == 0 ) goto 1999
384 #ifdef PLAG_CECELLS_DEBUG
385 WRITE(stdout,
'(A,2(2X,I3),2(2X,I4))') &
386 ' PLAG_EdgeCellsLoadData: iReg, iEdge, iEdgeCellBuff', &
387 ireg, iedge, iedgecellbuff
399 npclsprev = pplag%nPcls
400 IF ( pclsfoundinedgecell ) pplag%nPcls = ipclsregin
402 #ifdef PLAG_CECELLS_DEBUG
403 WRITE(stdout,
'(A,I4,2I8,2X,L1)') &
404 ' PLAG_EdgeCellsLoadData: iReg,nPclsPrev,nPclsCurr,pclsFoundInEdgeCell = ',&
405 ireg,npclsprev,pplag%nPcls,pclsfoundinedgecell
412 IF ( pclsfoundinedgecell .AND. pplag%nPcls == 0)
THEN
413 npclsbeg =
max(1,pplag%nPcls+1)
416 pplag%aiv(: ,npclsbeg:npclsend) = 0
417 pplag%aivOld(:,npclsbeg:npclsend) = 0
418 pplag%arv(: ,npclsbeg:npclsend) = 0.0_rfreal
419 pplag%arvOld(:,npclsbeg:npclsend) = 0.0_rfreal
420 pplag%cv(: ,npclsbeg:npclsend) = 0.0_rfreal
421 pplag%cvOld(: ,npclsbeg:npclsend) = 0.0_rfreal
422 pplag%rhs(: ,npclsbeg:npclsend) = 0.0_rfreal
423 pplag%rhsSum(:,npclsbeg:npclsend) = 0.0_rfreal
425 #ifdef PLAG_CECELLS_DEBUG
426 WRITE(stdout,
'(A,I4,2I8,2X,L1)') &
427 ' PLAG_EdgeCellsLoadData: iReg,nPclsBeg,nPclsEnd = ',&
428 ireg,npclsbeg,npclsend
434 DEALLOCATE( edgecellcounter,stat=errorflag )
435 global%error = errorflag
436 IF (global%error /= err_none) &
437 CALL
errorstop( global,err_deallocate,__line__ )
subroutine rflo_getedgecellsindices(region, iLev, iedge, iebeg, ieend, jebeg, jeend, kebeg, keend)
**********************************************************************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 ibeg
Tfloat sum() const
Return the sum of all the pixel values in an image.
**********************************************************************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 kpcbeg
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine plag_edgecellsloaddata(regions, iReg)
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 jpcbeg
**********************************************************************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 ipcend
**********************************************************************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 knode iend
**********************************************************************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 ipcbeg
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
**********************************************************************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 jpcend
**********************************************************************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 knode jend
subroutine errorstop(global, errorCode, errorLine, addMessage)
**********************************************************************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 knode jbeg
**********************************************************************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 knode kbeg
subroutine deregisterfunction(global)
subroutine getijk(ijk, iOffset, ijOffset, nDumCells, i, j, k)
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)