244 class(MethodCellPollockQuadType),
intent(inout) :: this
245 type(ParticleType),
pointer,
intent(inout) :: particle
246 class(SubcellRectType),
intent(inout) :: subcell
248 real(DP) :: dx, dy, dz, areax, areay, areaz
249 real(DP) :: dxprel, dyprel
250 integer(I4B) :: isc, npolyverts, m1, m2
251 real(DP) :: qextl1, qextl2, qintl1, qintl2
252 real(DP) :: factor, term
254 select type (cell => this%cell)
255 type is (cellrectquadtype)
256 factor = done / cell%defn%retfactor
257 factor = factor / cell%defn%porosity
258 npolyverts = cell%defn%npolyverts
260 isc = particle%itrdomain(level_subfeature)
268 dxprel = particle%x / dx
269 dyprel = particle%y / dy
271 if (dyprel .ge. 5d-1)
then
272 if (dxprel .le. 5d-1)
then
278 if (dxprel .le. 5d-1)
then
285 subcell%isubcell = isc
286 particle%itrdomain(level_subfeature) = isc
290 dz = cell%defn%top - &
295 qintl1 = cell%qintl(isc)
297 qintl2 = cell%qintl(isc + 1)
298 qextl1 = cell%qextl1(isc)
299 qextl2 = cell%qextl2(isc)
304 subcell%sinrot = dzero
305 subcell%cosrot = done
306 subcell%zOrigin = dzero
311 term = factor / areax
312 subcell%vx1 = qintl1 * term
313 subcell%vx2 = -qextl2 * term
314 term = factor / areay
315 subcell%vy1 = -qintl2 * term
316 subcell%vy2 = -qextl1 * term
319 subcell%yOrigin = dzero
320 term = factor / areax
321 subcell%vx1 = -qintl2 * term
322 subcell%vx2 = -qextl1 * term
323 term = factor / areay
324 subcell%vy1 = qextl2 * term
325 subcell%vy2 = -qintl1 * term
327 subcell%xOrigin = dzero
328 subcell%yOrigin = dzero
329 term = factor / areax
330 subcell%vx1 = qextl2 * term
331 subcell%vx2 = -qintl1 * term
332 term = factor / areay
333 subcell%vy1 = qextl1 * term
334 subcell%vy2 = qintl2 * term
336 subcell%xOrigin = dzero
338 term = factor / areax
339 subcell%vx1 = qextl1 * term
340 subcell%vx2 = qintl2 * term
341 term = factor / areay
342 subcell%vy1 = qintl1 * term
343 subcell%vy2 = -qextl2 * term
347 term = factor / areaz
348 subcell%vz1 = 2.5d-1 * cell%defn%faceflow(m1) * term
349 subcell%vz2 = -2.5d-1 * cell%defn%faceflow(m2) * term