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
43 integer(I4B),
public :: idrymeth
45 integer(I4B),
allocatable,
public :: idomain(:)
46 integer(I4B),
allocatable,
public :: iboundary(:)
47 integer(I4B),
public :: icp
48 integer(I4B),
public :: icu
49 integer(I4B),
public :: ilay
50 integer(I4B),
public :: izone
51 integer(I4B),
public :: izp
52 integer(I4B),
public :: istatus
56 real(dp),
public :: trelease
57 real(dp),
public :: tstop
58 real(dp),
public :: ttrack
59 real(dp),
public :: xorigin
60 real(dp),
public :: yorigin
61 real(dp),
public :: zorigin
62 real(dp),
public :: sinrot
63 real(dp),
public :: cosrot
64 real(dp),
public :: extol
65 logical(LGP),
public :: transformed
66 logical(LGP),
public :: advancing
67 integer(I4B),
public :: ifrctrn
68 integer(I4B),
public :: iexmeth
69 integer(I4B),
public :: iextend
81 character(len=LENBOUNDNAME),
dimension(:),
pointer,
public,
contiguous :: name
82 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: imdl
83 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: iprp
84 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: irpt
86 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: istopweaksink
87 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: istopzone
88 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: idrymeth
90 integer(I4B),
dimension(:, :),
pointer,
public,
contiguous :: idomain
91 integer(I4B),
dimension(:, :),
pointer,
public,
contiguous :: iboundary
92 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: icu
93 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: ilay
94 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: izone
95 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: izp
96 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: istatus
97 real(dp),
dimension(:),
pointer,
public,
contiguous :: x
98 real(dp),
dimension(:),
pointer,
public,
contiguous :: y
99 real(dp),
dimension(:),
pointer,
public,
contiguous :: z
100 real(dp),
dimension(:),
pointer,
public,
contiguous :: trelease
101 real(dp),
dimension(:),
pointer,
public,
contiguous :: tstop
102 real(dp),
dimension(:),
pointer,
public,
contiguous :: ttrack
103 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: ifrctrn
104 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: iexmeth
105 real(dp),
dimension(:),
pointer,
public,
contiguous :: extol
106 integer(LGP),
dimension(:),
pointer,
public,
contiguous :: extend
120 allocate (particle%idomain(
levelmax))
121 allocate (particle%iboundary(
levelmax))
127 integer(I4B),
intent(in) :: np
128 character(*),
intent(in) :: mempath
139 call mem_allocate(this%istatus, np,
'PLISTATUS', mempath)
143 call mem_allocate(this%trelease, np,
'PLTRELEASE', mempath)
146 call mem_allocate(this%istopweaksink, np,
'PLISTOPWEAKSINK', mempath)
147 call mem_allocate(this%istopzone, np,
'PLISTOPZONE', mempath)
148 call mem_allocate(this%idrymeth, np,
'PLIDRYMETH', mempath)
149 call mem_allocate(this%ifrctrn, np,
'PLIFRCTRN', mempath)
150 call mem_allocate(this%iexmeth, np,
'PLIEXMETH', mempath)
152 call mem_allocate(this%extend, np,
'PLIEXTEND', mempath)
160 character(*),
intent(in) :: mempath
177 call mem_deallocate(this%istopweaksink,
'PLISTOPWEAKSINK', mempath)
192 integer(I4B),
intent(in) :: np
193 character(*),
intent(in) :: mempath
211 call mem_reallocate(this%istopweaksink, np,
'PLISTOPWEAKSINK', mempath)
230 integer(I4B),
intent(in) :: imdl
231 integer(I4B),
intent(in) :: iprp
232 integer(I4B),
intent(in) :: ip
234 call this%reset_transform()
237 this%irpt = store%irpt(ip)
239 this%name = store%name(ip)
240 this%istopweaksink = store%istopweaksink(ip)
241 this%istopzone = store%istopzone(ip)
242 this%idrymeth = store%idrymeth(ip)
244 this%icu = store%icu(ip)
245 this%ilay = store%ilay(ip)
246 this%izone = store%izone(ip)
247 this%izp = store%izp(ip)
248 this%istatus = store%istatus(ip)
252 this%trelease = store%trelease(ip)
253 this%tstop = store%tstop(ip)
254 this%ttrack = store%ttrack(ip)
255 this%advancing = .true.
258 this%idomain(1) = imdl
261 this%ifrctrn = store%ifrctrn(ip)
262 this%iexmeth = store%iexmeth(ip)
263 this%extol = store%extol(ip)
264 this%iextend = store%extend(ip)
271 integer(I4B),
intent(in) :: ip
273 this%imdl(ip) = particle%imdl
274 this%iprp(ip) = particle%iprp
275 this%irpt(ip) = particle%irpt
276 this%name(ip) = particle%name
277 this%istopweaksink(ip) = particle%istopweaksink
278 this%istopzone(ip) = particle%istopzone
279 this%idrymeth(ip) = particle%idrymeth
280 this%icu(ip) = particle%icu
281 this%ilay(ip) = particle%ilay
282 this%izone(ip) = particle%izone
283 this%izp(ip) = particle%izp
284 this%istatus(ip) = particle%istatus
285 this%x(ip) = particle%x
286 this%y(ip) = particle%y
287 this%z(ip) = particle%z
288 this%trelease(ip) = particle%trelease
289 this%tstop(ip) = particle%tstop
290 this%ttrack(ip) = particle%ttrack
299 this%ifrctrn(ip) = particle%ifrctrn
300 this%iexmeth(ip) = particle%iexmeth
301 this%extol(ip) = particle%extol
302 this%extend(ip) = particle%iextend
312 sinrot, cosrot, invert)
315 real(DP),
intent(in),
optional :: xorigin
316 real(DP),
intent(in),
optional :: yorigin
317 real(DP),
intent(in),
optional :: zorigin
318 real(DP),
intent(in),
optional :: sinrot
319 real(DP),
intent(in),
optional :: cosrot
320 logical(LGP),
intent(in),
optional :: invert
323 this%x, this%y, this%z, &
324 xorigin, yorigin, zorigin, &
325 sinrot, cosrot, invert)
327 call compose(this%xorigin, this%yorigin, this%zorigin, &
328 this%sinrot, this%cosrot, &
329 xorigin, yorigin, zorigin, &
330 sinrot, cosrot, invert)
332 this%transformed = .true.
344 this%transformed = .false.
351 real(DP),
intent(out) :: x
352 real(DP),
intent(out) :: y
353 real(DP),
intent(out) :: z
355 if (this%transformed)
then
357 call transform(this%x, this%y, this%z, x, y, z, &
358 this%xorigin, this%yorigin, this%zorigin, &
359 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 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 get_model_coords(this, x, y, z)
Return the particle's model coordinates.
integer function num_stored(this)
subroutine save_particle(this, particle, ip)
Save a particle's state to the particle store.
subroutine reset_transform(this)
subroutine transform_coords(this, xorigin, yorigin, zorigin, sinrot, cosrot, invert)
Transform particle coordinates.
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.