Every spacing time units after the first time, before the last
(counted from the start or the end).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(MarkerArtist), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | n |
the points |
subroutine intermediates_by_time(self, n) type(MarkerArtist), intent(inout) :: self integer, intent(in) :: n !! the points real(wp) :: t_first, t_last, step, tm integer :: status, index t_first = self%traj%time(counted(self, 1, n)) t_last = self%traj%time(counted(self, n, n)) step = sign(self%spacing_, t_last - t_first) if (self%next_index == 0) then self%next_time = t_first + step self%next_index = 1 end if do while (sign(1.0_wp, step) * (t_last - self%next_time) > 0.0_wp) tm = self%next_time status = self%traj%time_index(tm, index) index = max(1, min(n - 1, index)) call push_intermediate(self, art_point_between(self, index, index + 1, tm, self%sources_), tm) self%next_time = self%next_time + step end do end subroutine intermediates_by_time