59 character(len=LENBOUNDNAME),
public :: name =
''
60 integer(I4B),
public :: imdl
61 integer(I4B),
public :: iprp
62 integer(I4B),
public :: irpt
63 integer(I4B),
public :: ip
65 integer(I4B),
public :: istopweaksink
66 integer(I4B),
public :: istopzone
67 integer(I4B),
public :: idrymeth
71 integer(I4B),
public :: icp
72 integer(I4B),
public :: icu
73 integer(I4B),
public :: ilay
74 integer(I4B),
public :: izone
75 integer(I4B),
public :: izp
76 integer(I4B),
public :: istatus
80 real(dp),
public :: trelease
81 real(dp),
public :: tstop
82 real(dp),
public :: ttrack
83 real(dp),
public :: xorigin
84 real(dp),
public :: yorigin
85 real(dp),
public :: zorigin
86 real(dp),
public :: sinrot
87 real(dp),
public :: cosrot
88 real(dp),
public :: extol
89 logical(LGP),
public :: transformed
90 logical(LGP),
public :: advancing
91 integer(I4B),
public :: ifrctrn
92 integer(I4B),
public :: iexmeth
93 integer(I4B),
public :: iextend
94 integer(I4B),
public :: icycwin
107 character(len=LENBOUNDNAME),
dimension(:),
pointer,
public,
contiguous :: name
108 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: imdl
109 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: iprp
110 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: irpt
112 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: istopweaksink
113 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: istopzone
114 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: idrymeth
116 integer(I4B),
dimension(:, :),
pointer,
public,
contiguous :: itrdomain
117 integer(I4B),
dimension(:, :),
pointer,
public,
contiguous :: iboundary
118 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: icu
119 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: ilay
120 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: izone
121 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: izp
122 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: istatus
123 real(dp),
dimension(:),
pointer,
public,
contiguous :: x
124 real(dp),
dimension(:),
pointer,
public,
contiguous :: y
125 real(dp),
dimension(:),
pointer,
public,
contiguous :: z
126 real(dp),
dimension(:),
pointer,
public,
contiguous :: trelease
127 real(dp),
dimension(:),
pointer,
public,
contiguous :: tstop
128 real(dp),
dimension(:),
pointer,
public,
contiguous :: ttrack
129 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: ifrctrn
130 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: iexmeth
131 real(dp),
dimension(:),
pointer,
public,
contiguous :: extol
132 integer(LGP),
dimension(:),
pointer,
public,
contiguous :: extend
133 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: icycwin
148 allocate (particle%history)
154 integer(I4B),
intent(in) :: np
155 character(*),
intent(in) :: mempath
166 call mem_allocate(store%istatus, np,
'PLISTATUS', mempath)
170 call mem_allocate(store%trelease, np,
'PLTRELEASE', mempath)
172 call mem_allocate(store%ttrack, np,
'PLTTRACK', mempath)
173 call mem_allocate(store%istopweaksink, np,
'PLISTOPWEAKSINK', mempath)
174 call mem_allocate(store%istopzone, np,
'PLISTOPZONE', mempath)
175 call mem_allocate(store%idrymeth, np,
'PLIDRYMETH', mempath)
176 call mem_allocate(store%ifrctrn, np,
'PLIFRCTRN', mempath)
177 call mem_allocate(store%iexmeth, np,
'PLIEXMETH', mempath)
179 call mem_allocate(store%extend, np,
'PLIEXTEND', mempath)
180 call mem_allocate(store%icycwin, np,
'PLICYCWIN', mempath)
188 character(*),
intent(in) :: mempath
205 call mem_deallocate(this%istopweaksink,
'PLISTOPWEAKSINK', mempath)
220 deallocate (particle%history)
227 integer(I4B),
intent(in) :: np
228 character(*),
intent(in) :: mempath
246 call mem_reallocate(this%istopweaksink, np,
'PLISTOPWEAKSINK', mempath)
263 subroutine get(this, particle, imdl, iprp, ip)
266 integer(I4B),
intent(in) :: imdl
267 integer(I4B),
intent(in) :: iprp
268 integer(I4B),
intent(in) :: ip
270 call particle%reset_transform()
271 call particle%history%Clear()
274 particle%irpt = this%irpt(ip)
276 particle%name = this%name(ip)
277 particle%istopweaksink = this%istopweaksink(ip)
278 particle%istopzone = this%istopzone(ip)
279 particle%idrymeth = this%idrymeth(ip)
281 particle%icu = this%icu(ip)
282 particle%ilay = this%ilay(ip)
283 particle%izone = this%izone(ip)
284 particle%izp = this%izp(ip)
285 particle%istatus = this%istatus(ip)
286 particle%x = this%x(ip)
287 particle%y = this%y(ip)
288 particle%z = this%z(ip)
289 particle%trelease = this%trelease(ip)
290 particle%tstop = this%tstop(ip)
291 particle%ttrack = this%ttrack(ip)
292 particle%advancing = .true.
295 particle%itrdomain(1) = imdl
298 particle%ifrctrn = this%ifrctrn(ip)
299 particle%iexmeth = this%iexmeth(ip)
300 particle%extol = this%extol(ip)
301 particle%iextend = this%extend(ip)
302 particle%icycwin = this%icycwin(ip)
306 subroutine put(this, particle, ip)
309 integer(I4B),
intent(in) :: ip
311 this%imdl(ip) = particle%imdl
312 this%iprp(ip) = particle%iprp
313 this%irpt(ip) = particle%irpt
314 this%name(ip) = particle%name
315 this%istopweaksink(ip) = particle%istopweaksink
316 this%istopzone(ip) = particle%istopzone
317 this%idrymeth(ip) = particle%idrymeth
318 this%icu(ip) = particle%icu
319 this%ilay(ip) = particle%ilay
320 this%izone(ip) = particle%izone
321 this%izp(ip) = particle%izp
322 this%istatus(ip) = particle%istatus
323 this%x(ip) = particle%x
324 this%y(ip) = particle%y
325 this%z(ip) = particle%z
326 this%trelease(ip) = particle%trelease
327 this%tstop(ip) = particle%tstop
328 this%ttrack(ip) = particle%ttrack
337 this%ifrctrn(ip) = particle%ifrctrn
338 this%iexmeth(ip) = particle%iexmeth
339 this%extol(ip) = particle%extol
340 this%extend(ip) = particle%iextend
341 this%icycwin(ip) = particle%icycwin
351 sinrot, cosrot, invert)
354 real(DP),
intent(in),
optional :: xorigin
355 real(DP),
intent(in),
optional :: yorigin
356 real(DP),
intent(in),
optional :: zorigin
357 real(DP),
intent(in),
optional :: sinrot
358 real(DP),
intent(in),
optional :: cosrot
359 logical(LGP),
intent(in),
optional :: invert
362 this%x, this%y, this%z, &
363 xorigin, yorigin, zorigin, &
364 sinrot, cosrot, invert)
366 call compose(this%xorigin, this%yorigin, this%zorigin, &
367 this%sinrot, this%cosrot, &
368 xorigin, yorigin, zorigin, &
369 sinrot, cosrot, invert)
371 this%transformed = .true.
384 this%transformed = .false.
393 real(DP),
intent(out) :: x
394 real(DP),
intent(out) :: y
395 real(DP),
intent(out) :: z
397 if (this%transformed)
then
398 call transform(this%x, this%y, this%z, x, y, z, &
399 this%xorigin, this%yorigin, this%zorigin, &
400 this%sinrot, this%cosrot, invert=.true.)
This module contains simulation constants.
integer(i4b), parameter lenboundname
maximum length of a bound name
real(dp), parameter dzero
real constant zero
integer(i4b), parameter lenmempath
maximum length of the memory path
real(dp), parameter done
real constant 1
subroutine, public transform(xin, yin, zin, xout, yout, zout, xorigin, yorigin, zorigin, sinrot, cosrot, invert)
Apply a 3D translation and optional 2D rotation to coordinates.
subroutine, public compose(xorigin, yorigin, zorigin, sinrot, cosrot, xorigin_new, yorigin_new, zorigin_new, sinrot_new, cosrot_new, invert)
Apply a 3D translation and 2D rotation to an existing transformation.
This module defines variable data types.
subroutine get(this, particle, imdl, iprp, ip)
Load a particle from the particle store.
subroutine resize(this, np, mempath)
Reallocate particle storage to the given size.
subroutine create_particle_store(store, np, mempath)
Allocate particle store.
subroutine get_model_coords(this, x, y, z)
Return the particle's model coordinates, inverting any applied transformation if needed....
integer function num_stored(this)
Return the number of particles.
subroutine reset_transform(this)
Reset particle coordinate transformation properties.
@ term_weaksink
terminated in a weak sink cell
@ term_timeout
terminated at stop time or end of simulation
@ term_inactive
terminated in an inactive cell
@ term_no_exits
terminated in a cell with no exit face
@ term_stopzone
terminated in a cell with a stop zone number
@ term_no_exits_sub
terminated in a subcell with no exit face
@ term_unreleased
terminated permanently unreleased
@ term_boundary
terminated at a boundary face
subroutine transform_coords(this, xorigin, yorigin, zorigin, sinrot, cosrot, invert)
Transform particle coordinates.
subroutine destroy(this, mempath)
Destroy particle store after use.
subroutine create_particle(particle)
Create a new particle.
subroutine put(this, particle, ip)
Save a particle's state to the particle store.
integer, parameter max_level
Tracking "levels" defined in method modules. Currently only 3 used.
subroutine destroy_particle(particle)
Destroy a particle after use.
A generic heterogeneous doubly-linked list.
Structure of arrays to store particles.
Particle tracked by the PRT model.