61 TYPE(t_region
) :: region
66 INTEGER ::
i, icelllev, ilevels, ipcls,
j,
k
69 CHARACTER(CHRLEN) :: rcsidentstring
71 INTEGER :: icoff, ijcoff, ijkc, inoff, ijnoff, ilev, &
72 ijknr, ijknri, ijknrj,ijknrk, ihigh, ilow, iskip,
ipcbeg,
ipcend, &
74 kpcbeg,kpcend, khigh, klow, kskip, &
75 ncont, ncelllev, ncelllevmax, nlevels, npcls
76 INTEGER,
DIMENSION(4) :: indexcurr, indexnew, indexsearch
77 INTEGER,
POINTER,
DIMENSION(:,:) :: paiv, paivold
79 LOGICAL :: celllocate, celllocaterobust
81 REAL(RFREAL) :: massl,taulr,diaml
83 REAL(RFREAL),
DIMENSION(3) :: posplag
84 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: pcv, pcvold
85 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: pdv
87 TYPE(t_plag),
POINTER :: pplag
89 TYPE(t_region
),
POINTER :: pregion
93 rcsidentstring =
'$RCSfile: PLAG_GetCellIndices.F90,v $ $Revision: 1.4 $'
95 global => region%global
98 'PLAG_GetCellIndices.F90' )
102 ilev = region%currLevel
104 npcls = region%levels(ilev)%plag%nPcls
115 pplag => region%levels(ilev)%plag
118 paivold => pplag%aivOld
120 pcvold => pplag%cvOld
129 indexcurr(1) = paivold(aiv_plag_icells,ipcls)
130 indexcurr(2) = paivold(aiv_plag_indexi,ipcls)
131 indexcurr(3) = paivold(aiv_plag_indexj,ipcls)
132 indexcurr(4) = paivold(aiv_plag_indexk,ipcls)
136 posplag(xcoord) = pcv(cv_plag_xpos,ipcls)
137 posplag(ycoord) = pcv(cv_plag_ypos,ipcls)
138 posplag(zcoord) = pcv(cv_plag_zpos,ipcls)
142 paiv(aiv_plag_status,ipcls) = plag_status_keep
143 paivold(aiv_plag_status,ipcls) = plag_status_keep
149 DO WHILE(ncelllev <= ncelllevmax)
151 DO ilevels = 1, nlevels
171 ilow = indexcurr(2)-ncelllev
172 ihigh = indexcurr(2)+ncelllev
189 jlow = indexcurr(3)-ncelllev
190 jhigh = indexcurr(3)+ncelllev
207 klow = indexcurr(4)-ncelllev
208 khigh = indexcurr(4)+ncelllev
213 ilow = indexcurr(2)-ncelllev
214 ihigh = indexcurr(2)+ncelllev
217 jlow = indexcurr(3)-ncelllev
218 jhigh = indexcurr(3)+ncelllev
227 ilow = indexcurr(2)-ncelllev
228 ihigh = indexcurr(2)+ncelllev
235 klow = indexcurr(4)-ncelllev
236 khigh = indexcurr(4)+ncelllev
245 jlow = indexcurr(3)-ncelllev
246 jhigh = indexcurr(3)+ncelllev
249 klow = indexcurr(4)-ncelllev
250 khigh = indexcurr(4)+ncelllev
255 ilow = indexcurr(2)-ncelllev
256 ihigh = indexcurr(2)+ncelllev
259 jlow = indexcurr(3)-ncelllev
260 jhigh = indexcurr(3)+ncelllev
263 klow = indexcurr(4)-ncelllev
264 khigh = indexcurr(4)+ncelllev
271 DO k=klow,khigh,kskip
272 DO j=jlow,jhigh,jskip
273 DO i=ilow,ihigh,iskip
274 ijkc = indijk(
i,
j ,
k ,icoff,ijcoff)
275 ijknr = indijk(
i,
j ,
k ,inoff,ijnoff)
276 ijknri = indijk(
i+1,
j ,
k ,inoff,ijnoff)
277 ijknrj = indijk(
i,
j+1 ,
k ,inoff,ijnoff)
278 ijknrk = indijk(
i ,
j ,
k+1,inoff,ijnoff)
280 indexsearch(1) = ijkc
286 ijknr,ijknri,ijknrj,ijknrk, &
289 IF ( celllocate .EQV. .true. ) goto 999
297 ncelllev = ncelllev+1
303 IF ( celllocate .EQV. .false. )
THEN
304 massl =
sum( pplag%cv(pplag%cvPlagMass(:),ipcls) )
305 diaml = pdv(dv_plag_diam,ipcls)
307 IF ( diaml > 1.0e-14_rfreal )
THEN
308 taulr = 3.0_rfreal*global%pi*pplag%tv(tv_plag_muelmixt,ipcls)*diaml/massl
313 WRITE(stdout,
'(A)') &
314 '##### Rocpart Warning: PLAG_inCellTest Unable to Locate Cell #####'
315 WRITE(stdout,1010)
'Default Search Failed to Locate Cell for Particle',&
316 global%currentTime, ireg, ipcls,&
317 paivold(aiv_plag_pidini,ipcls), &
318 paivold(aiv_plag_regini,ipcls), &
319 paivold(aiv_plag_icells,ipcls), &
320 paivold(aiv_plag_indexi,ipcls), &
321 paivold(aiv_plag_indexj,ipcls), &
322 paivold(aiv_plag_indexk,ipcls), &
323 pcvold(cv_plag_xpos:cv_plag_zpos,ipcls), &
325 pdv(dv_plag_uvel:dv_plag_wvel,ipcls), &
326 pdv(dv_plag_uvelmixt:dv_plag_wvelmixt,ipcls),&
327 pdv(dv_plag_diam,ipcls),massl,taulr
333 indexnew,celllocaterobust )
339 WRITE(stdout,
'(A)') &
340 '##### Rocpart Warning: Deleting Particle Following Robust Cell Search #####'
341 paiv(aiv_plag_status,ipcls) = plag_status_delete
342 paivold(aiv_plag_status,ipcls) = plag_status_delete
345 IF ( celllocaterobust .EQV. .true. ) goto 999
347 WRITE(stdout,
'(A)') &
348 '##### Rocpart Error: PLAG_inCellTestRobust Unable to Locate Cell with Robust Search #####'
349 WRITE(stdout,1010)
'Unable to Locate Cell for Particle',&
350 global%currentTime, ireg, ipcls,&
351 paivold(aiv_plag_pidini,ipcls), &
352 paivold(aiv_plag_regini,ipcls), &
353 paivold(aiv_plag_icells,ipcls), &
354 paivold(aiv_plag_indexi,ipcls), &
355 paivold(aiv_plag_indexj,ipcls), &
356 paivold(aiv_plag_indexk,ipcls), &
357 pcvold(cv_plag_xpos:cv_plag_zpos,ipcls), &
359 pdv(dv_plag_uvel:dv_plag_wvel,ipcls), &
360 pdv(dv_plag_uvelmixt:dv_plag_wvelmixt,ipcls)
366 paiv(aiv_plag_status,ipcls) = plag_status_delete
367 paivold(aiv_plag_status,ipcls) = plag_status_delete
385 paiv(aiv_plag_icells,ipcls) = indexnew(1)
386 paiv(aiv_plag_indexi,ipcls) = indexnew(2)
387 paiv(aiv_plag_indexj,ipcls) = indexnew(3)
388 paiv(aiv_plag_indexk,ipcls) = indexnew(4)
396 1010
FORMAT(
a,
'Time = ', 1pe12.5,
', iReg = ', i5,
', iPcls = ', i8, &
397 ', aivOld = ',6i5,
', posOld = ',3(1pe15.7),&
398 ', posCurr = ', 3(1pe15.7),
', pVel = ', 3(1pe15.7), &
399 ', mVel = ', 3(1pe15.7),&
400 ', diam = ', 1pe15.7,
', mass = ',1pe15.7,
' , tauL = ', 1pe15.7)
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
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
subroutine plag_incelltest(region, posPlag, indexSearch, ijkNR, ijkNRI, ijkNRJ, ijkNRK, indexNew, cellLocate)
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
subroutine plag_incelltestrobust(region, posPlag, indexCurr, indexNew, cellLocate)
**********************************************************************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
subroutine plag_getcellindices(region, iReg)
subroutine deregisterfunction(global)
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)