MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
MethodSubcellTernary.f90
Go to the documentation of this file.
2 use kindmodule, only: dp, i4b, lgp
4 use errorutilmodule, only: pstop
8 use cellmodule, only: celltype
13 use prtfmimodule, only: prtfmitype
14 use basedismodule, only: disbasetype
15 use mathutilmodule, only: is_close
16 use domainmodule, only: domaintype
17 use listmodule, only: listtype
22 implicit none
23
24 private
27
28 !> @brief Barycentric velocity interpolation exit solution.
29 !! Inherit from LinearExitSolutionType to get around array
30 !! polymorphism limitations in Fortran; the exit_solutions
31 !! array below needs to be of one type for convenient use.
33 real(dp) :: alpexit = dzero, betexit = dzero !< alpha and beta coefficients
34 integer(I4B) :: itopbotexit = -1, itrifaceexit = -1
35 ! transformation coefficients
36 real(dp) :: rxx = dzero
37 real(dp) :: rxy = dzero
38 real(dp) :: ryx = dzero
39 real(dp) :: ryy = dzero
40 real(dp) :: sxx = dzero
41 real(dp) :: sxy = dzero
42 real(dp) :: syy = dzero
44
45 !> @brief Ternary triangular subcell tracking method.
47 integer(I4B), public, pointer :: zeromethod
48 contains
49 procedure, public :: apply => apply_mst
50 procedure, public :: deallocate
51 procedure, private :: track_subcell
53
54contains
55
56 !> @brief Create a new ternary subcell tracking method.
58 ! dummy
59 type(methodsubcellternarytype), pointer :: method
60 ! local
61 type(subcelltritype), pointer :: subcell
62
63 allocate (method)
64 call create_subcell_tri(subcell)
65 method%subcell => subcell
66 method%name => method%subcell%type
67 method%delegates = .false.
69
70 !> @brief Deallocate the ternary subcell tracking method.
71 subroutine deallocate (this)
72 class(methodsubcellternarytype), intent(inout) :: this
73 deallocate (this%name)
74 end subroutine deallocate
75
76 !> @brief Apply the ternary subcell tracking method.
77 subroutine apply_mst(this, particle, tmax)
78 class(methodsubcellternarytype), intent(inout) :: this
79 type(particletype), pointer, intent(inout) :: particle
80 real(DP), intent(in) :: tmax
81
82 select type (subcell => this%subcell)
83 type is (subcelltritype)
84 call this%track_subcell(subcell, particle, tmax)
85 end select
86 end subroutine apply_mst
87
88 !> @brief Track a particle across a triangular subcell.
89 subroutine track_subcell(this, subcell, particle, tmax)
92 ! dummy
93 class(methodsubcellternarytype), intent(inout) :: this
94 class(subcelltritype), intent(in) :: subcell
95 type(particletype), pointer, intent(inout) :: particle
96 real(DP), intent(in) :: tmax
97 ! local
98 real(DP) :: dt, dtexit, texit
99 real(DP) :: t0, t, x, y, z0, z
100 integer(I4B) :: exit_face, exit_soln, event_code, i, isolv
101 type(barycentricexitsolutiontype) :: exit_solutions(2)
102 type(barycentricexitsolutiontype) :: exit_z, exit_lateral
103
104 event_code = -1
105 if (particle%iexmeth == 0) then
106 isolv = 1 ! default to Brent's solution method
107 else
108 isolv = particle%iexmeth
109 end if
110 t0 = particle%ttrack
111
112 ! Find exit solutions in lateral and vertical directions. z0 comes
113 ! back clamped to [zbot, ztop] (mirroring the nudge clamp_bary applies
114 ! to the lateral coordinates), so it can safely anchor the position
115 ! update even if the raw particle%z lies outside the subcell.
116 call find_exits(particle, subcell, exit_solutions, z0)
117
118 exit_z = exit_solutions(1)
119 exit_lateral = exit_solutions(2)
120
121 ! If the subcell has no exit face, terminate the particle.
122 ! TODO: consider ramifications
123 if (exit_z%itopbotexit == 0 .and. &
124 exit_lateral%itrifaceexit == 0) then
125 call this%terminate(particle, status=term_no_exits_sub)
126 return
127 end if
128
129 ! Determine exit solution, face, travel time, and time
130 exit_soln = pick_exit(exit_solutions)
131 exit_face = exit_solutions(exit_soln)%iboundary
132 dtexit = exit_solutions(exit_soln)%dt
133 if (dtexit < dzero) then
134 call this%terminate(particle, status=term_no_exits_sub)
135 return
136 end if
137 texit = t0 + dtexit
138
139 ! Select user tracking times to solve. If this is the last time step
140 ! in the simulation, times falling after the simulation end time are
141 ! only included if the 'extend' option is on, otherwise only times in
142 ! the time step are included.
143 call this%tracktimes%advance()
144 if (this%tracktimes%any()) then
145 do i = this%tracktimes%selection(1), this%tracktimes%selection(2)
146 t = this%tracktimes%times(i)
147 if (t < t0) cycle
148 if (t > texit .or. t > tmax) exit
149 dt = t - t0
150 call calculate_xyz_position(dt, &
151 exit_lateral%rxx, exit_lateral%rxy, &
152 exit_lateral%ryx, exit_lateral%ryy, &
153 exit_lateral%sxx, exit_lateral%sxy, &
154 exit_lateral%syy, exit_z%status, &
155 subcell%x0, subcell%y0, &
156 exit_z%dvdx, exit_z%v, &
157 subcell%vzbot, subcell%ztop, subcell%zbot, &
158 z0, x, y, z)
159 particle%x = x
160 particle%y = y
161 particle%z = z
162 particle%ttrack = t
163 call this%usertime(particle)
164 end do
165 end if
166
167 ! Compute exit time and face and update the particle's coordinates
168 ! (local, unscaled) and other properties. The particle may at this
169 ! point lie on a boundary of the subcell or may still be within it.
170 if (texit .gt. tmax) then
171 ! The computed exit time is greater than the maximum time, so set
172 ! final time for particle trajectory equal to maximum time.
173 t = tmax
174 dt = t - t0
175 exit_face = 0
176 particle%advancing = .false.
177 event_code = timestep
178 else
179 ! The computed exit time is less than or equal to the maximum time,
180 ! so set final time for particle trajectory equal to exit time.
181 t = texit
182 dt = dtexit
183 event_code = featexit
184 end if
185 call calculate_xyz_position(dt, &
186 exit_lateral%rxx, exit_lateral%rxy, &
187 exit_lateral%ryx, exit_lateral%ryy, &
188 exit_lateral%sxx, exit_lateral%sxy, &
189 exit_lateral%syy, exit_z%status, &
190 subcell%x0, subcell%y0, &
191 exit_z%dvdx, exit_z%v, &
192 subcell%vzbot, subcell%ztop, subcell%zbot, &
193 z0, x, y, z, exit_face)
194 particle%x = x
195 particle%y = y
196 particle%z = z
197 particle%ttrack = t
198 particle%iboundary(level_subfeature) = exit_face
199
200 if (event_code == timestep) then
201 call this%timestep(particle)
202 else if (event_code == featexit) then
203 call this%subcellexit(particle)
204 end if
205
206 end subroutine track_subcell
207
208 !> @brief Determine earliest exit face
209 function pick_exit(exit_solutions) result(exit_soln)
210 type(barycentricexitsolutiontype), intent(in) :: exit_solutions(2)
211 integer(I4B) :: exit_soln
212
213 if (exit_solutions(1)%itopbotexit == 0) then
214 exit_soln = 2 ! lateral
215 else if (exit_solutions(2)%itrifaceexit == 0 .or. &
216 exit_solutions(1)%dt < exit_solutions(2)%dt) then
217 exit_soln = 1 ! top/bottom
218 else
219 exit_soln = 2 ! lateral
220 end if
221
222 end function pick_exit
223
224 !> @brief Calculate exit solutions for each coordinate direction
225 subroutine find_exits(particle, domain, exit_solutions, z0)
226 type(particletype), pointer, intent(inout) :: particle
227 class(domaintype), intent(in) :: domain
228 type(barycentricexitsolutiontype), intent(out) :: exit_solutions(2)
229 real(DP), intent(out) :: z0
230 ! local
231 integer(I4B) :: ntmax
232 real(DP) :: tol
233 real(DP) :: zirel
234 real(DP) :: rxx
235 real(DP) :: rxy
236 real(DP) :: ryx
237 real(DP) :: ryy
238 real(DP) :: sxx
239 real(DP) :: sxy
240 real(DP) :: syy
241 real(DP) :: alp0
242 real(DP) :: bet0
243 real(DP) :: alp1
244 real(DP) :: bet1
245 real(DP) :: alp2
246 real(DP) :: bet2
247 real(DP) :: alpi
248 real(DP) :: beti
249 real(DP) :: gami
250 integer(I4B) :: isolv
251 integer(I4B) :: itrifaceenter
252
253 ntmax = 10000
254 tol = particle%extol
255
256 ! Set lateral solution method
257 if (particle%iexmeth == 0) then
258 isolv = 1 ! default to Brent's
259 else
260 isolv = particle%iexmeth
261 end if
262
263 select type (subcell => domain)
264 type is (subcelltritype)
265 ! Transform coordinates to the "canonical" configuration:
266 ! barycentric in two dimensions with alpha, beta & gamma
267 ! such that at f2 alpha = 0, f0 beta = 0, f1 gamma = 0.
268 !
269 ! v2
270 ! |\
271 ! f2| \f1
272 ! |__\
273 ! v0 f0 v1
274 !
275 call canonical(subcell%x0, subcell%y0, &
276 subcell%x1, subcell%y1, &
277 subcell%x2, subcell%y2, &
278 subcell%v0x, subcell%v0y, &
279 subcell%v1x, subcell%v1y, &
280 subcell%v2x, subcell%v2y, &
281 particle%x, particle%y, &
282 rxx, rxy, ryx, ryy, &
283 sxx, sxy, syy, &
284 alp0, bet0, alp1, bet1, alp2, bet2, alpi, beti)
285
286 ! Clamp particle coordinates to the canonical triangular
287 ! subcell and nudge it ever so slightly inside if needed.
288 call clamp_bary(alpi, beti, gami, pad=dsame * dep3)
289
290 ! Do calculations related to the analytical z solution.
291 ! (TODO: just once for each cell? store at cell-level?)
292 ! Clamp the relative z coordinate to the unit interval, and nudge
293 ! the particle's z ever so slightly inside the subcell if needed,
294 ! analogous to the lateral clamp_bary nudge above.
295 zirel = (particle%z - subcell%zbot) / subcell%dz
296 if (zirel > done) then
297 zirel = done
298 else if (zirel < dzero) then
299 zirel = dzero
300 end if
301 z0 = subcell%zbot + zirel * subcell%dz
302 exit_solutions(1) = find_vertical_exit(subcell%vzbot, subcell%vztop, &
303 subcell%dz, zirel)
304
305 ! Calculate a semi-analytical lateral exit solution
306 itrifaceenter = particle%iboundary(level_subfeature) - 1
307 if (itrifaceenter == -1) itrifaceenter = 999
308 exit_solutions(2) = find_lateral_exit(isolv, tol, &
309 itrifaceenter, &
310 alp1, bet1, alp2, &
311 bet2, alpi, beti)
312 exit_solutions(2)%rxx = rxx
313 exit_solutions(2)%rxy = rxy
314 exit_solutions(2)%ryx = ryx
315 exit_solutions(2)%ryy = ryy
316 exit_solutions(2)%sxx = sxx
317 exit_solutions(2)%sxy = sxy
318 exit_solutions(2)%syy = syy
319
320 ! Set vertical solution exit face
321 if (exit_solutions(1)%itopbotexit /= 0) then
322 if (exit_solutions(1)%itopbotexit == -1) then
323 exit_solutions(1)%iboundary = 4
324 else
325 exit_solutions(1)%iboundary = 5
326 end if
327 end if
328
329 ! Set lateral solution exit face
330 if (exit_solutions(2)%itrifaceexit /= 0) &
331 exit_solutions(2)%iboundary = exit_solutions(2)%itrifaceexit
332 end select
333 end subroutine find_exits
334
335 function find_lateral_exit(isolv, tol, &
336 itrifaceenter, &
337 alp1, bet1, alp2, bet2, alpi, beti) &
338 result(solution)
339 integer(I4B) :: isolv
340 real(dp) :: tol
341 integer(I4B) :: itrifaceenter
342 real(dp) :: alp1
343 real(dp) :: bet1
344 real(dp) :: alp2
345 real(dp) :: bet2
346 real(dp) :: alpi
347 real(dp) :: beti
348 type(barycentricexitsolutiontype) :: solution
349
350 solution = barycentricexitsolutiontype()
351 call traverse_triangle(isolv, tol, &
352 solution%dt, solution%alpexit, solution%betexit, &
353 itrifaceenter, solution%itrifaceexit, &
354 alp1, bet1, alp2, bet2, alpi, beti)
355 if (solution%itrifaceexit > 0) solution%status = ok_exit
356 end function find_lateral_exit
357
358 function find_vertical_exit(v1, v2, dx, xL) result(solution)
359 real(dp), intent(in) :: v1
360 real(dp), intent(in) :: v2
361 real(dp), intent(in) :: dx
362 real(dp), intent(in) :: xl
363 type(barycentricexitsolutiontype) :: solution
364
365 solution = barycentricexitsolutiontype()
366 call calculate_dt(v1, v2, dx, xl, solution%v, solution%dvdx, &
367 solution%dt, solution%status, solution%itopbotexit)
368 end function find_vertical_exit
369
370 !> @brief Do calculations related to analytical z solution
371 !!
372 !! This subroutine consists partly of code written by and/or adapted from
373 !! David W. Pollock of the USGS for MODPATH 7. The authors of the present
374 !! code are responsible for its appropriate application in this context
375 !! and for any modifications or errors.
376 !<
377 subroutine calculate_dt(v1, v2, dx, xL, v, dvdx, &
378 dt, status, itopbotexit)
379 real(DP) :: v1
380 real(DP) :: v2
381 real(DP) :: dx
382 real(DP) :: xL
383 real(DP) :: v
384 real(DP) :: dvdx
385 real(DP) :: dt
386 real(DP) :: v2a
387 real(DP) :: v1a
388 real(DP) :: dv
389 real(DP) :: dva
390 real(DP) :: vv
391 real(DP) :: vvv
392 real(DP) :: zro
393 real(DP) :: zrom
394 real(DP) :: x
395 real(DP) :: tol
396 real(DP) :: vr1
397 real(DP) :: vr2
398 real(DP) :: vr
399 real(DP) :: v1v2
400 integer(I4B) :: status
401 integer(I4B) :: itopbotexit
402 logical(LGP) :: noOutflow
403
404 ! Initialize variables
405 status = -1
406 dt = 1.0d+20
407 v2a = v2
408 if (v2a .lt. dzero) v2a = -v2a
409 v1a = v1
410 if (v1a .lt. dzero) v1a = -v1a
411 dv = v2 - v1
412 dva = dv
413 if (dva .lt. dzero) dva = -dva
414
415 ! Check for a uniform zero velocity in this direction.
416 ! If so, set status = 2 and return (dt = 1.0d+20).
417 tol = 1.0d-15
418 if ((v2a .lt. tol) .and. (v1a .lt. tol)) then
419 v = dzero
420 dvdx = dzero
421 status = no_exit_stationary
422 itopbotexit = 0
423 return
424 end if
425
426 ! Check for uniform non-zero velocity in this direction.
427 ! If so, set compute dt using the constant velocity,
428 ! set status = 1 and return.
429 vv = v1a
430 if (v2a .gt. vv) vv = v2a
431 vvv = dva / vv
432 if (vvv .lt. 1.0d-4) then
433 zro = tol
434 zrom = -zro
435 v = v1
436 x = xl * dx
437 if (v1 .gt. zro) then
438 dt = (dx - x) / v1
439 itopbotexit = -2
440 end if
441 if (v1 .lt. zrom) then
442 dt = -x / v1
443 itopbotexit = -1
444 end if
445 dvdx = dzero
446 status = ok_exit_constant
447 return
448 end if
449
450 ! Velocity has a linear variation.
451 ! Compute velocity corresponding to particle position
452 dvdx = dv / dx
453 v = (done - xl) * v1 + xl * v2
454
455 ! If flow is into the cell from both sides there is no outflow.
456 ! In that case, set status = 3 and return
457 nooutflow = .true.
458 if (v1 .lt. dzero) nooutflow = .false.
459 if (v2 .gt. dzero) nooutflow = .false.
460 if (nooutflow) then
461 status = no_exit_no_outflow
462 itopbotexit = 0
463 return
464 end if
465
466 ! If there is a divide in the cell for this flow direction, check to see if the
467 ! particle is located exactly on the divide. If it is, move it very slightly to
468 ! get it off the divide. This avoids possible numerical problems related to
469 ! stagnation points.
470 if ((v1 .le. dzero) .and. (v2 .ge. dzero)) then
471 if (abs(v) .le. dzero) then
472 v = 1.0d-20
473 if (v2 .le. dzero) v = -v
474 end if
475 end if
476
477 ! If there is a flow divide, find out what side of the divide the particle
478 ! is on and set the value of vr appropriately to reflect that location.
479 vr1 = v1 / v
480 vr2 = v2 / v
481 vr = vr1
482 itopbotexit = -1
483 if (vr .le. dzero) then
484 vr = vr2
485 itopbotexit = -2
486 end if
487
488 ! Check if velocity is in the same direction throughout cell (i.e. no flow divide).
489 ! Check if product v1*v2 > 0 then the velocity is in the same direction throughout
490 ! the cell (i.e. no flow divide). If so, set vr to reflect appropriate direction.
491 v1v2 = v1 * v2
492 if (v1v2 .gt. dzero) then
493 if (v .gt. dzero) then
494 vr = vr2
495 itopbotexit = -2
496 end if
497 if (v .lt. dzero) then
498 vr = vr1
499 itopbotexit = -1
500 end if
501 end if
502
503 ! Compute travel time to exit face. Return with status = 0
504 dt = log(abs(vr)) / dvdx
505 status = ok_exit
506 end subroutine calculate_dt
507
508 !> @brief Calculate the particle's local unscaled xyz coordinates after dt.
509 subroutine calculate_xyz_position(dt, rxx, rxy, ryx, ryy, sxx, sxy, syy, &
510 izstatus, x0, y0, az, vzi, vzbot, &
511 ztop, zbot, zi, x, y, z, exitface)
512 ! dummy
513 real(DP) :: dt
514 real(DP) :: rxx
515 real(DP) :: rxy
516 real(DP) :: ryx
517 real(DP) :: ryy
518 real(DP) :: sxx
519 real(DP) :: sxy
520 real(DP) :: syy
521 integer(I4B) :: izstatus
522 real(DP) :: x0
523 real(DP) :: y0
524 real(DP) :: az
525 real(DP) :: vzi
526 real(DP) :: vzbot
527 real(DP) :: ztop
528 real(DP) :: zbot
529 real(DP) :: zi
530 real(DP) :: x
531 real(DP) :: y
532 real(DP) :: z
533 integer(I4B), optional :: exitface
534 ! local
535 integer(I4B) :: lexitface
536 real(DP) :: rot(2, 2), res(2), loc(2)
537 real(DP) :: alp
538 real(DP) :: bet
539
540 ! process optional exit face argument
541 if (present(exitface)) then
542 lexitface = exitface
543 else
544 lexitface = 0
545 end if
546
547 ! calculate alpha and beta
548 call step_analytical(dt, alp, bet)
549
550 ! if exit face is known, set alpha or beta coordinate
551 ! corresponding to the exit face exactly.
552 if (lexitface .eq. 1) then
553 bet = dzero
554 else if (lexitface .eq. 2) then
555 alp = done - bet
556 else if (lexitface .eq. 3) then
557 alp = dzero
558 end if
559
560 ! if exit face is top or bottom, set z coordinate exactly.
561 if (lexitface .eq. 4) then
562 z = zbot
563 else if (lexitface .eq. 5) then
564 z = ztop
565 else
566 ! otherwise calculate z.
567 if (izstatus .eq. 2) then
568 ! vz uniformly zero
569 z = zi
570 else if (izstatus .eq. 1) then
571 ! vz uniform, nonzero
572 z = zi + vzi * dt
573 else
574 ! vz nonuniform
575 z = zbot + (vzi * dexp(az * dt) - vzbot) / az
576 end if
577 end if
578
579 ! transform (alp, beta) to (x, y)
580 loc = (/alp, bet/)
581 loc = skew(loc, (/sxx, sxy, syy/), invert=.true.)
582 rot = reshape((/rxx, rxy, ryx, ryy/), shape(rot))
583 res = matmul(rot, loc) ! rotate vector
584 x = res(1) + x0
585 y = res(2) + y0
586
587 end subroutine calculate_xyz_position
588
This module contains simulation constants.
Definition Constants.f90:9
real(dp), parameter dsame
real constant for values that are considered the same based on machine precision
real(dp), parameter dep3
real constant 1000
Definition Constants.f90:88
real(dp), parameter donethird
real constant 1/3
Definition Constants.f90:67
real(dp), parameter dhalf
real constant 1/2
Definition Constants.f90:68
real(dp), parameter dzero
real constant zero
Definition Constants.f90:65
real(dp), parameter dtwo
real constant 2
Definition Constants.f90:79
real(dp), parameter done
real constant 1
Definition Constants.f90:76
subroutine pstop(status, message)
Stop the program, optionally specifying an error status code.
Definition ErrorUtil.f90:24
@ ok_exit_constant
exit found, constant velocity
@ ok_exit
exit found using velocity interpolation
@ no_exit_stationary
no exit, zero velocity
@ no_exit_no_outflow
no exit, no outflow
subroutine, public clamp_bary(alpha, beta, gamma, pad)
Clamp barycentric coordinates to the interior of a triangle, with optional padding some minimum dista...
Definition GeomUtil.f90:485
pure real(dp) function, dimension(2), public skew(v, s, invert)
Skew a 2D vector along the x-axis.
Definition GeomUtil.f90:158
This module defines variable data types.
Definition kind.f90:8
pure logical function, public is_close(a, b, rtol, atol, symmetric)
Check if a real value is approximately equal to another.
Definition MathUtil.f90:46
Particle tracking strategies.
Definition Method.f90:2
@ level_subfeature
Definition Method.f90:41
type(barycentricexitsolutiontype) function find_lateral_exit(isolv, tol, itrifaceenter, alp1, bet1, alp2, bet2, alpi, beti)
subroutine track_subcell(this, subcell, particle, tmax)
Track a particle across a triangular subcell.
subroutine apply_mst(this, particle, tmax)
Apply the ternary subcell tracking method.
subroutine calculate_xyz_position(dt, rxx, rxy, ryx, ryy, sxx, sxy, syy, izstatus, x0, y0, az, vzi, vzbot, ztop, zbot, zi, x, y, z, exitface)
Calculate the particle's local unscaled xyz coordinates after dt.
subroutine calculate_dt(v1, v2, dx, xl, v, dvdx, dt, status, itopbotexit)
Do calculations related to analytical z solution.
integer(i4b) function pick_exit(exit_solutions)
Determine earliest exit face.
subroutine, public create_method_subcell_ternary(method)
Create a new ternary subcell tracking method.
type(barycentricexitsolutiontype) function find_vertical_exit(v1, v2, dx, xl)
subroutine find_exits(particle, domain, exit_solutions, z0)
Calculate exit solutions for each coordinate direction.
@ usertime
user-specified tracking time
@ terminate
particle terminated
@ timestep
time step ended
@ featexit
particle exited a grid feature
@ term_no_exits_sub
terminated in a subcell with no exit face
Definition Particle.f90:39
subroutine, public create_subcell_tri(subcell)
Create a new triangular subcell.
subroutine, public traverse_triangle(isolv, tol, texit, alpexit, betexit, itrifaceenter, itrifaceexit, alp1, bet1, alp2, bet2, alpi, beti)
Traverse triangular cell.
subroutine, public step_analytical(t, alp, bet)
Step (evaluate) analytically depending on case.
subroutine, public canonical(x0, y0, x1, y1, x2, y2, v0x, v0y, v1x, v1y, v2x, v2y, xi, yi, rxx, rxy, ryx, ryy, sxx, sxy, syy, alp0, bet0, alp1, bet1, alp2, bet2, alpi, beti)
Set coordinates to "canonical" configuration.
Base type for grid cells of a concrete type. Contains a cell-definition which is information shared b...
Definition Cell.f90:12
A tracking domain.
Definition Domain.f90:8
Base type for exit solutions.
Linear velocity interpolation exit solution.
A generic heterogeneous doubly-linked list.
Definition List.f90:14
Abstract base type for subcell tracking methods.
Barycentric velocity interpolation exit solution. Inherit from LinearExitSolutionType to get around a...
Ternary triangular subcell tracking method.
Particle tracked by the PRT model.
Definition Particle.f90:64
A subcell of a cell.
Definition Subcell.f90:10