tail_ends Subroutine

private subroutine tail_ends(traj, n, i1, i2, k, k2)

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.

Arguments

Type IntentOptional 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


Calls

proc~~tail_ends~~CallsGraph proc~tail_ends tail_ends proc~decreasing_times decreasing_times proc~tail_ends->proc~decreasing_times

Called by

proc~~tail_ends~~CalledByGraph proc~tail_ends tail_ends proc~draw_written draw_written proc~draw_written->proc~tail_ends proc~chain_update ChainArtist%chain_update proc~chain_update->proc~draw_written proc~curve_update CurveArtist%curve_update proc~curve_update->proc~draw_written

Source Code

    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