35 character(len=LENBOUNDNAME),
public :: name =
''
36 integer(I4B),
public :: imdl
37 integer(I4B),
public :: iprp
38 integer(I4B),
public :: irpt
39 integer(I4B),
public :: ip
41 integer(I4B),
public :: istopweaksink
42 integer(I4B),
public :: istopzone
44 integer(I4B),
allocatable,
public :: idomain(:)
45 integer(I4B),
allocatable,
public :: iboundary(:)
46 integer(I4B),
public :: icu
47 integer(I4B),
public :: ilay
48 integer(I4B),
public :: izone
49 integer(I4B),
public :: istatus
53 real(dp),
public :: trelease
54 real(dp),
public :: tstop
55 real(dp),
public :: ttrack
56 real(dp),
public :: xorigin
57 real(dp),
public :: yorigin
58 real(dp),
public :: zorigin
59 real(dp),
public :: sinrot
60 real(dp),
public :: cosrot
61 real(dp),
public :: extol
62 logical(LGP),
public :: transformed
63 logical(LGP),
public :: advancing
64 integer(I4B),
public :: ifrctrn
65 integer(I4B),
public :: iexmeth
66 integer(I4B),
public :: iextend
77 character(len=LENBOUNDNAME),
dimension(:),
pointer,
public,
contiguous :: name
78 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: imdl
79 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: iprp
80 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: irpt
82 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: istopweaksink
83 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: istopzone
85 integer(I4B),
dimension(:, :),
pointer,
public,
contiguous :: idomain
86 integer(I4B),
dimension(:, :),
pointer,
public,
contiguous :: iboundary
87 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: icu
88 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: ilay
89 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: izone
90 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: istatus
91 real(dp),
dimension(:),
pointer,
public,
contiguous :: x
92 real(dp),
dimension(:),
pointer,
public,
contiguous :: y
93 real(dp),
dimension(:),
pointer,
public,
contiguous :: z
94 real(dp),
dimension(:),
pointer,
public,
contiguous :: trelease
95 real(dp),
dimension(:),
pointer,
public,
contiguous :: tstop
96 real(dp),
dimension(:),
pointer,
public,
contiguous :: ttrack
97 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: ifrctrn
98 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: iexmeth
99 real(dp),
dimension(:),
pointer,
public,
contiguous :: extol
100 integer(LGP),
dimension(:),
pointer,
public,
contiguous :: extend
114 allocate (particle%idomain(
levelmax))
115 allocate (particle%iboundary(
levelmax))
121 integer(I4B),
intent(in) :: np
122 character(*),
intent(in) :: mempath
132 call mem_allocate(this%istatus, np,
'PLISTATUS', mempath)
136 call mem_allocate(this%trelease, np,
'PLTRELEASE', mempath)
139 call mem_allocate(this%istopweaksink, np,
'PLISTOPWEAKSINK', mempath)
140 call mem_allocate(this%istopzone, np,
'PLISTOPZONE', mempath)
141 call mem_allocate(this%ifrctrn, np,
'PLIFRCTRN', mempath)
142 call mem_allocate(this%iexmeth, np,
'PLIEXMETH', mempath)
144 call mem_allocate(this%extend, np,
'PLIEXTEND', mempath)
152 character(*),
intent(in) :: mempath
168 call mem_deallocate(this%istopweaksink,
'PLISTOPWEAKSINK', mempath)
182 integer(I4B),
intent(in) :: np
183 character(*),
intent(in) :: mempath
200 call mem_reallocate(this%istopweaksink, np,
'PLISTOPWEAKSINK', mempath)
218 integer(I4B),
intent(in) :: imdl
219 integer(I4B),
intent(in) :: iprp
220 integer(I4B),
intent(in) :: ip
222 call this%transform(reset=.true.)
225 this%irpt = store%irpt(ip)
227 this%name = store%name(ip)
228 this%istopweaksink = store%istopweaksink(ip)
229 this%istopzone = store%istopzone(ip)
230 this%icu = store%icu(ip)
231 this%ilay = store%ilay(ip)
232 this%izone = store%izone(ip)
233 this%istatus = store%istatus(ip)
237 this%trelease = store%trelease(ip)
238 this%tstop = store%tstop(ip)
239 this%ttrack = store%ttrack(ip)
240 this%advancing = .true.
243 this%idomain(1) = imdl
246 this%ifrctrn = store%ifrctrn(ip)
247 this%iexmeth = store%iexmeth(ip)
248 this%extol = store%extol(ip)
249 this%iextend = store%extend(ip)
256 integer(I4B),
intent(in) :: ip
258 this%imdl(ip) = particle%imdl
259 this%iprp(ip) = particle%iprp
260 this%irpt(ip) = particle%irpt
261 this%name(ip) = particle%name
262 this%istopweaksink(ip) = particle%istopweaksink
263 this%istopzone(ip) = particle%istopzone
264 this%icu(ip) = particle%icu
265 this%ilay(ip) = particle%ilay
266 this%izone(ip) = particle%izone
267 this%istatus(ip) = particle%istatus
268 this%x(ip) = particle%x
269 this%y(ip) = particle%y
270 this%z(ip) = particle%z
271 this%trelease(ip) = particle%trelease
272 this%tstop(ip) = particle%tstop
273 this%ttrack(ip) = particle%ttrack
282 this%ifrctrn(ip) = particle%ifrctrn
283 this%iexmeth(ip) = particle%iexmeth
284 this%extol(ip) = particle%extol
285 this%extend(ip) = particle%iextend
290 sinrot, cosrot, invert, reset)
293 real(DP),
intent(in),
optional :: xorigin
294 real(DP),
intent(in),
optional :: yorigin
295 real(DP),
intent(in),
optional :: zorigin
296 real(DP),
intent(in),
optional :: sinrot
297 real(DP),
intent(in),
optional :: cosrot
298 logical(LGP),
intent(in),
optional :: invert
299 logical(LGP),
intent(in),
optional :: reset
302 if (
present(reset))
then
310 this%transformed = .false.
317 this%x, this%y, this%z, &
318 xorigin, yorigin, zorigin, &
319 sinrot, cosrot, invert)
323 call compose(this%xorigin, this%yorigin, this%zorigin, &
324 this%sinrot, this%cosrot, &
325 xorigin, yorigin, zorigin, &
326 sinrot, cosrot, invert)
333 this%transformed = .true.
340 real(DP),
intent(out) :: x
341 real(DP),
intent(out) :: y
342 real(DP),
intent(out) :: z
344 if (this%transformed)
then
346 call transform(this%x, this%y, this%z, x, y, z, &
347 this%xorigin, this%yorigin, this%zorigin, &
348 this%sinrot, this%cosrot, .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 load_particle(this, store, imdl, iprp, ip)
Load a particle from the particle store.
subroutine, public allocate_particle_store(this, np, mempath)
Create a new particle store.
subroutine resize(this, np, mempath)
Reallocate particle arrays.
subroutine transform_coords(this, xorigin, yorigin, zorigin, sinrot, cosrot, invert, reset)
Apply the given global-to-local transformation to the particle.
subroutine get_model_coords(this, x, y, z)
Return the particle's model (global) coordinates.
integer function num_stored(this)
subroutine save_particle(this, particle, ip)
Save a particle's state to the particle store.
integer, parameter, public levelmax
subroutine deallocate(this, mempath)
Deallocate particle arrays.
subroutine, public create_particle(particle)
Create a new particle.
Structure of arrays to store particles.
Particle tracked by the PRT model.