81 character(len=LENBOUNDNAME),
public :: name =
''
82 integer(I4B),
public :: imdl
83 integer(I4B),
public :: iprp
84 integer(I4B),
public :: irpt
85 integer(I4B),
public :: ip
87 integer(I4B),
public :: istopweaksink
88 integer(I4B),
public :: istopzone
89 integer(I4B),
public :: idrymeth
91 integer(I4B),
allocatable,
public :: idomain(:)
92 integer(I4B),
allocatable,
public :: iboundary(:)
93 integer(I4B),
public :: icp
94 integer(I4B),
public :: icu
95 integer(I4B),
public :: ilay
96 integer(I4B),
public :: izone
97 integer(I4B),
public :: izp
98 integer(I4B),
public :: istatus
100 real(dp),
public :: y
101 real(dp),
public :: z
102 real(dp),
public :: trelease
103 real(dp),
public :: tstop
104 real(dp),
public :: ttrack
105 real(dp),
public :: xorigin
106 real(dp),
public :: yorigin
107 real(dp),
public :: zorigin
108 real(dp),
public :: sinrot
109 real(dp),
public :: cosrot
110 real(dp),
public :: extol
111 logical(LGP),
public :: transformed
112 logical(LGP),
public :: advancing
113 integer(I4B),
public :: ifrctrn
114 integer(I4B),
public :: iexmeth
115 integer(I4B),
public :: iextend
126 character(len=LENBOUNDNAME),
dimension(:),
pointer,
public,
contiguous :: name
127 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: imdl
128 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: iprp
129 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: irpt
131 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: istopweaksink
132 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: istopzone
133 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: idrymeth
135 integer(I4B),
dimension(:, :),
pointer,
public,
contiguous :: idomain
136 integer(I4B),
dimension(:, :),
pointer,
public,
contiguous :: iboundary
137 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: icu
138 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: ilay
139 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: izone
140 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: izp
141 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: istatus
142 real(dp),
dimension(:),
pointer,
public,
contiguous :: x
143 real(dp),
dimension(:),
pointer,
public,
contiguous :: y
144 real(dp),
dimension(:),
pointer,
public,
contiguous :: z
145 real(dp),
dimension(:),
pointer,
public,
contiguous :: trelease
146 real(dp),
dimension(:),
pointer,
public,
contiguous :: tstop
147 real(dp),
dimension(:),
pointer,
public,
contiguous :: ttrack
148 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: ifrctrn
149 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: iexmeth
150 real(dp),
dimension(:),
pointer,
public,
contiguous :: extol
151 integer(LGP),
dimension(:),
pointer,
public,
contiguous :: extend
173 integer(I4B),
intent(in) :: np
174 character(*),
intent(in) :: mempath
185 call mem_allocate(store%istatus, np,
'PLISTATUS', mempath)
189 call mem_allocate(store%trelease, np,
'PLTRELEASE', mempath)
191 call mem_allocate(store%ttrack, np,
'PLTTRACK', mempath)
192 call mem_allocate(store%istopweaksink, np,
'PLISTOPWEAKSINK', mempath)
193 call mem_allocate(store%istopzone, np,
'PLISTOPZONE', mempath)
194 call mem_allocate(store%idrymeth, np,
'PLIDRYMETH', mempath)
195 call mem_allocate(store%ifrctrn, np,
'PLIFRCTRN', mempath)
196 call mem_allocate(store%iexmeth, np,
'PLIEXMETH', mempath)
198 call mem_allocate(store%extend, np,
'PLIEXTEND', mempath)
206 character(*),
intent(in) :: mempath
223 call mem_deallocate(this%istopweaksink,
'PLISTOPWEAKSINK', mempath)
238 integer(I4B),
intent(in) :: np
239 character(*),
intent(in) :: mempath
257 call mem_reallocate(this%istopweaksink, np,
'PLISTOPWEAKSINK', mempath)
273 subroutine get(this, particle, imdl, iprp, ip)
276 integer(I4B),
intent(in) :: imdl
277 integer(I4B),
intent(in) :: iprp
278 integer(I4B),
intent(in) :: ip
280 call particle%reset_transform()
283 particle%irpt = this%irpt(ip)
285 particle%name = this%name(ip)
286 particle%istopweaksink = this%istopweaksink(ip)
287 particle%istopzone = this%istopzone(ip)
288 particle%idrymeth = this%idrymeth(ip)
290 particle%icu = this%icu(ip)
291 particle%ilay = this%ilay(ip)
292 particle%izone = this%izone(ip)
293 particle%izp = this%izp(ip)
294 particle%istatus = this%istatus(ip)
295 particle%x = this%x(ip)
296 particle%y = this%y(ip)
297 particle%z = this%z(ip)
298 particle%trelease = this%trelease(ip)
299 particle%tstop = this%tstop(ip)
300 particle%ttrack = this%ttrack(ip)
301 particle%advancing = .true.
304 particle%idomain(1) = imdl
307 particle%ifrctrn = this%ifrctrn(ip)
308 particle%iexmeth = this%iexmeth(ip)
309 particle%extol = this%extol(ip)
310 particle%iextend = this%extend(ip)
314 subroutine put(this, particle, ip)
317 integer(I4B),
intent(in) :: ip
319 this%imdl(ip) = particle%imdl
320 this%iprp(ip) = particle%iprp
321 this%irpt(ip) = particle%irpt
322 this%name(ip) = particle%name
323 this%istopweaksink(ip) = particle%istopweaksink
324 this%istopzone(ip) = particle%istopzone
325 this%idrymeth(ip) = particle%idrymeth
326 this%icu(ip) = particle%icu
327 this%ilay(ip) = particle%ilay
328 this%izone(ip) = particle%izone
329 this%izp(ip) = particle%izp
330 this%istatus(ip) = particle%istatus
331 this%x(ip) = particle%x
332 this%y(ip) = particle%y
333 this%z(ip) = particle%z
334 this%trelease(ip) = particle%trelease
335 this%tstop(ip) = particle%tstop
336 this%ttrack(ip) = particle%ttrack
345 this%ifrctrn(ip) = particle%ifrctrn
346 this%iexmeth(ip) = particle%iexmeth
347 this%extol(ip) = particle%extol
348 this%extend(ip) = particle%iextend
358 sinrot, cosrot, invert)
361 real(DP),
intent(in),
optional :: xorigin
362 real(DP),
intent(in),
optional :: yorigin
363 real(DP),
intent(in),
optional :: zorigin
364 real(DP),
intent(in),
optional :: sinrot
365 real(DP),
intent(in),
optional :: cosrot
366 logical(LGP),
intent(in),
optional :: invert
369 this%x, this%y, this%z, &
370 xorigin, yorigin, zorigin, &
371 sinrot, cosrot, invert)
373 call compose(this%xorigin, this%yorigin, this%zorigin, &
374 this%sinrot, this%cosrot, &
375 xorigin, yorigin, zorigin, &
376 sinrot, cosrot, invert)
378 this%transformed = .true.
391 this%transformed = .false.
400 real(DP),
intent(out) :: x
401 real(DP),
intent(out) :: y
402 real(DP),
intent(out) :: z
404 if (this%transformed)
then
405 call transform(this%x, this%y, this%z, x, y, z, &
406 this%xorigin, this%yorigin, this%zorigin, &
407 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.
@ terminate
particle terminated
@ release
particle was released
@ usertime
user-specified tracking time
@ timestep
time step ended
@ weaksink
particle entered a weak sink cell
@ exit
particle exited a cell
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" (1: model, 2: cell, 3: subcell). A level identifies the domain through which a trac...
Structure of arrays to store particles.
Particle tracked by the PRT model.