30 character(len=40),
pointer,
public ::
type
31 logical(LGP),
public :: delegates
33 class(
celltype),
pointer,
public :: cell => null()
37 integer(I4B),
dimension(:),
pointer,
contiguous,
public :: izone => null()
38 real(dp),
dimension(:),
pointer,
contiguous,
public :: flowja => null()
39 real(dp),
dimension(:),
pointer,
contiguous,
public :: porosity => null()
40 real(dp),
dimension(:),
pointer,
contiguous,
public :: retfactor => null()
57 subroutine apply(this, particle, tmax)
63 real(DP),
intent(in) :: tmax
73 subroutine init(this, fmi, cell, subcell, trackfilectl, tracktimes, &
74 izone, flowja, porosity, retfactor)
76 type(
prtfmitype),
intent(in),
pointer,
optional :: fmi
77 class(
celltype),
intent(in),
pointer,
optional :: cell
78 class(
subcelltype),
intent(in),
pointer,
optional :: subcell
81 integer(I4B),
intent(in),
pointer,
optional :: izone(:)
82 real(DP),
intent(in),
pointer,
optional :: flowja(:)
83 real(DP),
intent(in),
pointer,
optional :: porosity(:)
84 real(DP),
intent(in),
pointer,
optional :: retfactor(:)
86 if (
present(fmi)) this%fmi => fmi
87 if (
present(cell)) this%cell => cell
88 if (
present(subcell)) this%subcell => subcell
89 if (
present(trackfilectl)) this%trackfilectl => trackfilectl
90 if (
present(tracktimes)) this%tracktimes => tracktimes
91 if (
present(izone)) this%izone => izone
92 if (
present(flowja)) this%flowja => flowja
93 if (
present(porosity)) this%porosity => porosity
94 if (
present(retfactor)) this%retfactor => retfactor
98 recursive subroutine track(this, particle, level, tmax)
102 integer(I4B) :: level
103 real(dp),
intent(in) :: tmax
105 logical(LGP) :: advancing
106 integer(I4B) :: nextlevel
110 nextlevel = level + 1
112 call this%load(particle, nextlevel, submethod)
113 call submethod%apply(particle, tmax)
114 call this%try_pass(particle, nextlevel, advancing)
119 subroutine try_pass(this, particle, nextlevel, advancing)
122 integer(I4B) :: nextlevel
123 logical(LGP) :: advancing
127 if (.not. particle%advancing)
then
128 particle%iboundary = 0
133 call this%pass(particle)
134 if (particle%iboundary(nextlevel - 1) .ne. 0) &
140 subroutine load(this, particle, next_level, submethod)
143 integer,
intent(in) :: next_level
144 class(
methodtype),
pointer,
intent(inout) :: submethod
145 call pstop(1,
"load must be overridden")
149 subroutine pass(this, particle)
152 call pstop(1,
"pass must be overridden")
156 subroutine save(this, particle, reason)
161 integer(I4B),
intent(in) :: reason
163 integer(I4B) :: per, stp
173 if (particle%ttrack ==
totimc .and. (per > 1 .or. stp > 1))
then
176 else if (per > 1)
then
183 call this%trackfilectl%save(particle,
kper=per, &
184 kstp=stp, reason=reason)
194 subroutine update(this, particle, cell_defn)
200 particle%izone = cell_defn%izone
201 if (cell_defn%izone .ne. 0)
then
202 if (particle%istopzone .eq. cell_defn%izone)
then
203 particle%advancing = .false.
205 call this%save(particle, reason=3)
209 if (cell_defn%inoexitface .ne. 0)
then
210 particle%advancing = .false.
212 call this%save(particle, reason=3)
215 if (cell_defn%iweaksink .ne. 0)
then
216 if (particle%istopweaksink .ne. 0)
then
217 particle%advancing = .false.
219 call this%save(particle, reason=3)
222 call this%save(particle, reason=4)
subroutine pstop(status, message)
Stop the program, optionally specifying an error status code.
This module defines variable data types.
Particle tracking strategies.
subroutine load(this, particle, next_level, submethod)
Load subdomain tracking method (submethod)
subroutine save(this, particle, reason)
Save a particle's current state.
recursive subroutine track(this, particle, level, tmax)
Track particle through subdomains.
subroutine update(this, particle, cell_defn)
Update particle state and check termination conditions.
subroutine try_pass(this, particle, nextlevel, advancing)
Try passing the particle to the next subdomain.
subroutine pass(this, particle)
Pass a particle to the next subdomain, internal use only.
real(dp), pointer, public totimc
simulation time at start of time step
integer(i4b), pointer, public kstp
current time step number
integer(i4b), pointer, public kper
current stress period number
Specify times for some event to occur.
Base grid cell definition.
Base type for grid cells of a concrete type. Contains a cell-definition which is information shared b...
Base type for particle tracking methods.
Particle tracked by the PRT model.
Represents a series of instants at which some event should occur.
Manages particle track (i.e. pathline) files.