243 class(MethodCellPollockQuadType),
intent(inout) :: this
244 type(ParticleType),
pointer,
intent(inout) :: particle
245 class(SubcellRectType),
intent(inout) :: subcell
247 double precision :: dx, dy, dz, areax, areay, areaz
248 double precision :: dxprel, dyprel
249 integer :: isc, npolyverts, m1, m2
250 double precision :: qextl1, qextl2, qintl1, qintl2
251 double precision :: factor, term
253 select type (cell => this%cell)
254 type is (cellrectquadtype)
255 factor = done / cell%defn%retfactor
256 factor = factor / cell%defn%porosity
257 npolyverts = cell%defn%npolyverts
259 isc = particle%idomain(3)
267 dxprel = particle%x / dx
268 dyprel = particle%y / dy
269 if (dxprel .lt. 5d-1)
then
270 if (dyprel .lt. 5d-1)
then
272 else if (dyprel .gt. 5d-1)
then
276 call pstop(1,
"particle initially on shared subcell edge")
278 else if (dxprel .gt. 5d-1)
then
279 if (dyprel .lt. 5d-1)
then
281 else if (dyprel .gt. 5d-1)
then
285 call pstop(1,
"particle initially on shared subcell edge")
289 call pstop(1,
"particle initially on shared subcell edge")
291 subcell%isubcell = isc
294 particle%idomain(3) = isc
299 dz = cell%defn%top - &
304 qintl1 = cell%qintl(isc)
306 qintl2 = cell%qintl(isc + 1)
307 qextl1 = cell%qextl1(isc)
308 qextl2 = cell%qextl2(isc)
315 subcell%zOrigin = 0d0
320 term = factor / areax
321 subcell%vx1 = qintl1 * term
322 subcell%vx2 = -qextl2 * term
323 term = factor / areay
324 subcell%vy1 = -qintl2 * term
325 subcell%vy2 = -qextl1 * term
328 subcell%yOrigin = 0d0
329 term = factor / areax
330 subcell%vx1 = -qintl2 * term
331 subcell%vx2 = -qextl1 * term
332 term = factor / areay
333 subcell%vy1 = qextl2 * term
334 subcell%vy2 = -qintl1 * term
336 subcell%xOrigin = 0d0
337 subcell%yOrigin = 0d0
338 term = factor / areax
339 subcell%vx1 = qextl2 * term
340 subcell%vx2 = -qintl1 * term
341 term = factor / areay
342 subcell%vy1 = qextl1 * term
343 subcell%vy2 = qintl2 * term
345 subcell%xOrigin = 0d0
347 term = factor / areax
348 subcell%vx1 = qextl1 * term
349 subcell%vx2 = qintl2 * term
350 term = factor / areay
351 subcell%vy1 = qintl1 * term
352 subcell%vy2 = -qextl2 * term
356 term = factor / areaz
357 subcell%vz1 = 2.5d-1 * cell%defn%faceflow(m1) * term
358 subcell%vz2 = -2.5d-1 * cell%defn%faceflow(m2) * term