Particle release scheduling.
◆ advance()
subroutine releaseschedulemodule::advance |
( |
class(releasescheduletype), intent(inout) |
this, |
|
|
character(len=linelength), dimension(:), intent(in), optional |
lines |
|
) |
| |
|
private |
This involves several tasks: first, advance the time selection. Then, if period-block release setting lines are provided, reinitialize the time step selection for the given period. Finally, refresh the schedule array, deduplicating any times closer than the set tolerance.
This routine is idempotent.
Definition at line 110 of file ReleaseSchedule.f90.
112 class(ReleaseScheduleType),
intent(inout) :: this
113 character(len=LINELENGTH),
intent(in),
optional :: lines(:)
114 integer(I4B) :: it, i
115 real(DP) :: tprevious
119 call this%time_select%advance()
123 if (
present(lines))
then
124 call this%step_select%init()
125 do i = 1,
size(lines)
126 call this%step_select%read(lines(i))
131 if (
allocated(this%times))
deallocate (this%times)
132 allocate (this%times(0))
141 call this%schedule(trelease)
147 if (this%time_select%any())
then
148 do it = this%time_select%selection(1), this%time_select%selection(2)
149 trelease = this%time_select%times(it)
152 if (tprevious >= dzero .and. is_close( &
155 atol=this%tolerance)) cycle
156 call this%schedule(trelease)
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
◆ any()
Note: be sure to call advance() before calling this function, or the result may still be associated with a prior time step.
Definition at line 167 of file ReleaseSchedule.f90.
168 class(ReleaseScheduleType) :: this
◆ count()
Note: be sure to call advance() before calling this function, or the result may still be associated with a prior time step.
Definition at line 177 of file ReleaseSchedule.f90.
178 class(ReleaseScheduleType) :: this
◆ create_release_schedule()
type(releasescheduletype) function, pointer, public releaseschedulemodule::create_release_schedule |
( |
real(dp), intent(in) |
tol | ) |
|
- Parameters
-
[in] | tol | coincident release time tolerance |
- Returns
- schedule pointer
Definition at line 46 of file ReleaseSchedule.f90.
47 real(DP),
intent(in) :: tol
48 type(ReleaseScheduleType),
pointer :: sched
51 allocate (sched%times(0))
52 allocate (sched%time_select)
53 allocate (sched%step_select)
54 call sched%time_select%init()
55 call sched%step_select%init()
◆ deallocate()
- Parameters
-
[in,out] | this | this instance |
Definition at line 61 of file ReleaseSchedule.f90.
62 class(ReleaseScheduleType),
intent(inout) :: this
64 deallocate (this%times)
65 call this%time_select%deallocate()
66 call this%step_select%deallocate()
67 deallocate (this%time_select)
68 deallocate (this%step_select)
◆ log()
subroutine releaseschedulemodule::log |
( |
class(releasescheduletype), intent(inout) |
this, |
|
|
integer(i4b), intent(in) |
iout |
|
) |
| |
|
private |
- Parameters
-
[in,out] | this | this instance |
[in] | iout | output unit |
Definition at line 73 of file ReleaseSchedule.f90.
74 class(ReleaseScheduleType),
intent(inout) :: this
75 integer(I4B),
intent(in) :: iout
76 character(len=*),
parameter :: fmt = &
77 &
"(6x,A,': ',50(G0,' '))"
80 write (iout, fmt)
'RELEASE SCHEDULE', this%times
82 write (iout,
"(1x,a,1x,a)")
'NO RELEASES SCHEDULED'
◆ schedule()
subroutine releaseschedulemodule::schedule |
( |
class(releasescheduletype), intent(inout) |
this, |
|
|
real(dp), intent(in) |
trelease |
|
) |
| |
|
private |
To schedule multiple release times at once, expand and populate the time selection object by hand. DO NOT attempt to manipulate the times array; this is a read-only property which the schedule maintains.
Definition at line 93 of file ReleaseSchedule.f90.
94 class(ReleaseScheduleType),
intent(inout) :: this
95 real(DP),
intent(in) :: trelease
96 call expandarray(this%times)
97 this%times(
size(this%times)) = trelease