Trace mode's tail, for the points passed i1 .. i2 of the n written: from the latest passed (k) toward the next in time (k2: i2 + 1, or i1 - 1 for decreasing times); none (0, 0) without a trajectory.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Trajectory), | intent(in), | pointer | :: | traj |
the trajectory (null: none) |
|
| integer, | intent(in) | :: | n |
the points written |
||
| integer, | intent(in) | :: | i1 |
the points passed |
||
| integer, | intent(in) | :: | i2 |
the points passed |
||
| integer, | intent(out) | :: | k |
the tail's ends |
||
| integer, | intent(out) | :: | k2 |
the tail's ends |
subroutine tail_ends(traj, n, i1, i2, k, k2) type(Trajectory), pointer, intent(in) :: traj !! the trajectory (null: none) integer, intent(in) :: n !! the points written integer, intent(in) :: i1, i2 !! the points passed integer, intent(out) :: k, k2 !! the tail's ends k = 0 k2 = 0 if (.not. associated(traj)) return if (decreasing_times(traj, n)) then k = i1 k2 = i1 - 1 else k = i2 k2 = i2 + 1 end if end subroutine tail_ends