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 :: icp
93 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: icu
94 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: ilay
95 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: izone
96 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: izp
97 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: istatus
98 real(dp),
dimension(:),
pointer,
public,
contiguous :: x
99 real(dp),
dimension(:),
pointer,
public,
contiguous :: y
100 real(dp),
dimension(:),
pointer,
public,
contiguous :: z
101 real(dp),
dimension(:),
pointer,
public,
contiguous :: trelease
102 real(dp),
dimension(:),
pointer,
public,
contiguous :: tstop
103 real(dp),
dimension(:),
pointer,
public,
contiguous :: ttrack
104 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: ifrctrn
105 integer(I4B),
dimension(:),
pointer,
public,
contiguous :: iexmeth
106 real(dp),
dimension(:),
pointer,
public,
contiguous :: extol
107 integer(LGP),
dimension(:),
pointer,
public,
contiguous :: extend
121 allocate (particle%idomain(
levelmax))
122 allocate (particle%iboundary(
levelmax))
128 integer(I4B),
intent(in) :: np
129 character(*),
intent(in) :: mempath
141 call mem_allocate(this%istatus, np,
'PLISTATUS', mempath)
145 call mem_allocate(this%trelease, np,
'PLTRELEASE', mempath)
148 call mem_allocate(this%istopweaksink, np,
'PLISTOPWEAKSINK', mempath)
149 call mem_allocate(this%istopzone, np,
'PLISTOPZONE', mempath)
150 call mem_allocate(this%idrymeth, np,
'PLIDRYMETH', mempath)
151 call mem_allocate(this%ifrctrn, np,
'PLIFRCTRN', mempath)
152 call mem_allocate(this%iexmeth, np,
'PLIEXMETH', mempath)
154 call mem_allocate(this%extend, np,
'PLIEXTEND', mempath)
162 character(*),
intent(in) :: mempath
180 call mem_deallocate(this%istopweaksink,
'PLISTOPWEAKSINK', mempath)
195 integer(I4B),
intent(in) :: np
196 character(*),
intent(in) :: mempath
215 call mem_reallocate(this%istopweaksink, np,
'PLISTOPWEAKSINK', mempath)
234 integer(I4B),
intent(in) :: imdl
235 integer(I4B),
intent(in) :: iprp
236 integer(I4B),
intent(in) :: ip
238 call this%reset_transform()
241 this%irpt = store%irpt(ip)
243 this%name = store%name(ip)
244 this%istopweaksink = store%istopweaksink(ip)
245 this%istopzone = store%istopzone(ip)
246 this%idrymeth = store%idrymeth(ip)
247 this%icp = store%icp(ip)
248 this%icu = store%icu(ip)
249 this%ilay = store%ilay(ip)
250 this%izone = store%izone(ip)
251 this%izp = store%izp(ip)
252 this%istatus = store%istatus(ip)
256 this%trelease = store%trelease(ip)
257 this%tstop = store%tstop(ip)
258 this%ttrack = store%ttrack(ip)
259 this%advancing = .true.
262 this%idomain(1) = imdl
265 this%ifrctrn = store%ifrctrn(ip)
266 this%iexmeth = store%iexmeth(ip)
267 this%extol = store%extol(ip)
268 this%iextend = store%extend(ip)
275 integer(I4B),
intent(in) :: ip
277 this%imdl(ip) = particle%imdl
278 this%iprp(ip) = particle%iprp
279 this%irpt(ip) = particle%irpt
280 this%name(ip) = particle%name
281 this%istopweaksink(ip) = particle%istopweaksink
282 this%istopzone(ip) = particle%istopzone
283 this%idrymeth(ip) = particle%idrymeth
284 this%icp(ip) = particle%icp
285 this%icu(ip) = particle%icu
286 this%ilay(ip) = particle%ilay
287 this%izone(ip) = particle%izone
288 this%izp(ip) = particle%izp
289 this%istatus(ip) = particle%istatus
290 this%x(ip) = particle%x
291 this%y(ip) = particle%y
292 this%z(ip) = particle%z
293 this%trelease(ip) = particle%trelease
294 this%tstop(ip) = particle%tstop
295 this%ttrack(ip) = particle%ttrack
304 this%ifrctrn(ip) = particle%ifrctrn
305 this%iexmeth(ip) = particle%iexmeth
306 this%extol(ip) = particle%extol
307 this%extend(ip) = particle%iextend
317 sinrot, cosrot, invert)
320 real(DP),
intent(in),
optional :: xorigin
321 real(DP),
intent(in),
optional :: yorigin
322 real(DP),
intent(in),
optional :: zorigin
323 real(DP),
intent(in),
optional :: sinrot
324 real(DP),
intent(in),
optional :: cosrot
325 logical(LGP),
intent(in),
optional :: invert
328 this%x, this%y, this%z, &
329 xorigin, yorigin, zorigin, &
330 sinrot, cosrot, invert)
332 call compose(this%xorigin, this%yorigin, this%zorigin, &
333 this%sinrot, this%cosrot, &
334 xorigin, yorigin, zorigin, &
335 sinrot, cosrot, invert)
337 this%transformed = .true.
349 this%transformed = .false.
356 real(DP),
intent(out) :: x
357 real(DP),
intent(out) :: y
358 real(DP),
intent(out) :: z
360 if (this%transformed)
then
362 call transform(this%x, this%y, this%z, x, y, z, &
363 this%xorigin, this%yorigin, this%zorigin, &
364 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.