30 real(dp),
allocatable :: times(:)
47 real(dp),
intent(in) :: tolerance
51 allocate (schedule_%times(0))
52 allocate (schedule_%time_select)
53 allocate (schedule_%step_select)
54 call schedule_%time_select%init()
55 call schedule_%step_select%init()
56 schedule_%tolerance = tolerance
63 deallocate (this%times)
64 call this%time_select%deallocate()
65 call this%step_select%deallocate()
66 deallocate (this%time_select)
67 deallocate (this%step_select)
71 subroutine log(this, iout)
73 integer(I4B),
intent(in) :: iout
74 character(len=*),
parameter :: fmt = &
75 &
"(6x,A,': ',50(G0,' '))"
78 write (iout, fmt)
'RELEASE SCHEDULE', this%times
80 write (iout,
"(1x,a,1x,a)")
'NO RELEASES SCHEDULED'
93 real(DP),
intent(in) :: trelease
95 this%times(
size(this%times)) = trelease
109 character(len=LINELENGTH),
intent(in),
optional :: lines(:)
110 integer(I4B) :: it, i
111 real(DP) :: tprevious
115 call this%time_select%advance()
119 if (
present(lines))
then
120 call this%step_select%init()
121 do i = 1,
size(lines)
122 call this%step_select%read(lines(i))
127 if (
allocated(this%times))
deallocate (this%times)
128 allocate (this%times(0))
138 if (.not. this%time_select%contains_close(trelease, this%tolerance))
then
139 call this%schedule(trelease)
146 if (this%time_select%any())
then
147 do it = this%time_select%selection(1), this%time_select%selection(2)
148 trelease = this%time_select%times(it)
152 atol=this%tolerance)) cycle
154 call this%schedule(trelease)
165 logical function any(this)
result(a)
175 integer function count(this)
result(n)
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
real(dp), parameter dzero
real constant zero
real(dp), parameter done
real constant 1
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 release scheduling.
subroutine log(this, iout)
Write the release schedule to the given output unit.
subroutine destroy(this)
Deallocate the release schedule.
subroutine advance(this, lines)
Refresh the schedule for the current time step.
logical function any(this)
Check if any releases are scheduled.
subroutine schedule(this, trelease)
Add a release time to the schedule.
integer function count(this)
Return the number of releases scheduled.
type(particlereleasescheduletype) function, pointer, public create_release_schedule(tolerance)
Create a new release schedule.
logical(lgp), pointer, public endofperiod
flag indicating end of stress period
real(dp), pointer, public totimc
simulation time at start of time step
integer(i4b), pointer, public kstp
current time step number
Specify times for some event to occur.
Time step selection module.
Particle release scheduling utility.
Represents a series of instants at which some event should occur.
Time step selection type.