55 character(len=40),
pointer,
public :: name
56 logical(LGP),
public :: delegates
58 class(
celltype),
pointer,
public :: cell => null()
62 integer(I4B),
dimension(:),
pointer,
contiguous,
public :: izone => null()
63 real(dp),
dimension(:),
pointer,
contiguous,
public :: flowja => null()
64 real(dp),
dimension(:),
pointer,
contiguous,
public :: porosity => null()
65 real(dp),
dimension(:),
pointer,
contiguous,
public :: retfactor => null()
88 subroutine apply(this, particle, tmax)
94 real(DP),
intent(in) :: tmax
96 subroutine assess(this, particle, cell_defn, tmax)
104 real(DP),
intent(in) :: tmax
114 subroutine init(this, fmi, cell, subcell, events, tracktimes, &
115 izone, flowja, porosity, retfactor)
117 type(
prtfmitype),
intent(in),
pointer,
optional :: fmi
118 class(
celltype),
intent(in),
pointer,
optional :: cell
119 class(
subcelltype),
intent(in),
pointer,
optional :: subcell
122 integer(I4B),
intent(in),
pointer,
optional :: izone(:)
123 real(DP),
intent(in),
pointer,
optional :: flowja(:)
124 real(DP),
intent(in),
pointer,
optional :: porosity(:)
125 real(DP),
intent(in),
pointer,
optional :: retfactor(:)
127 if (
present(fmi)) this%fmi => fmi
128 if (
present(cell)) this%cell => cell
129 if (
present(subcell)) this%subcell => subcell
130 if (
present(events)) this%events => events
131 if (
present(tracktimes)) this%tracktimes => tracktimes
132 if (
present(izone)) this%izone => izone
133 if (
present(flowja)) this%flowja => flowja
134 if (
present(porosity)) this%porosity => porosity
135 if (
present(retfactor)) this%retfactor => retfactor
140 recursive subroutine track(this, particle, level, tmax)
144 integer(I4B) :: level
145 real(dp),
intent(in) :: tmax
147 logical(LGP) :: advancing
148 integer(I4B) :: nextlevel
152 nextlevel = level + 1
154 call this%load(particle, nextlevel, submethod)
155 call submethod%apply(particle, tmax)
156 call this%try_pass(particle, nextlevel, advancing)
161 subroutine try_pass(this, particle, nextlevel, advancing)
164 integer(I4B) :: nextlevel
165 logical(LGP) :: advancing
167 if (particle%advancing)
then
170 call this%pass(particle)
171 if (particle%iboundary(nextlevel - 1) .ne. 0) &
177 particle%iboundary = 0
182 subroutine load(this, particle, next_level, submethod)
185 integer,
intent(in) :: next_level
186 class(
methodtype),
pointer,
intent(inout) :: submethod
187 call pstop(1,
"load must be overridden")
193 integer(I4B) :: level
195 call pstop(1,
"get_level must be overridden")
199 subroutine pass(this, particle)
202 call pstop(1,
"pass must be overridden")
211 call this%events%dispatch(particle, event)
219 integer(I4B),
intent(in),
optional :: status
221 particle%advancing = .false.
222 if (
present(status)) particle%istatus = status
224 call this%events%dispatch(particle, event)
234 call this%events%dispatch(particle, event)
244 call this%events%dispatch(particle, event)
254 call this%events%dispatch(particle, event)
This module contains simulation constants.
real(dp), parameter dzero
real constant zero
subroutine pstop(status, message)
Stop the program, optionally specifying an error status code.
This module defines variable data types.
pure logical function, public is_close(a, b, rtol, atol, symmetric)
Check if a real value is approximately equal to another.
Particle tracking strategies.
subroutine load(this, particle, next_level, submethod)
Load the subdomain tracking method (submethod).
subroutine terminate(this, particle, status)
Particle terminates.
subroutine release(this, particle)
Particle is released.
recursive subroutine track(this, particle, level, tmax)
Track the particle over subdomains of the given.
subroutine weaksink(this, particle)
Particle leaves a weak sink.
subroutine try_pass(this, particle, nextlevel, advancing)
Try passing the particle to the next subdomain.
integer(i4b) function get_level(this)
Get the tracking method's level.
subroutine timestep(this, particle)
Time step ends.
subroutine usertime(this, particle)
User-defined tracking time occurs.
@, public level_subfeature
subroutine pass(this, particle)
Pass the particle to the next subdomain.
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.
Base type for particle events.
Particle tracked by the PRT model.
Represents a series of instants at which some event should occur.