points Subroutine

private pure subroutine points(self, i1, i2, sources, v, stride)

Points i1, i1 + stride, ... (up to i2) with components from sources, into v(3, :) (as many columns as points; point for a range, a whole array slice per component). No checks: use verify_data and num_points first.

Type Bound

Trajectory

Arguments

Type IntentOptional Attributes Name
class(Trajectory), intent(in) :: self
integer, intent(in) :: i1

first and last points (1 to num_points(sources))

integer, intent(in) :: i2

first and last points (1 to num_points(sources))

type(DataSource), intent(in) :: sources(3)

where the components come from

real(kind=wp), intent(out) :: v(:,:)

(3, number of points)

integer, intent(in), optional :: stride

step between points (default 1)


Called by

proc~~points~~CalledByGraph proc~points Trajectory%points proc~art_points art_points proc~art_points->proc~points proc~update_bounds update_bounds proc~update_bounds->proc~art_points proc~write_curve CurveArtist%write_curve proc~write_curve->proc~art_points proc~write_ribbon RibbonArtist%write_ribbon proc~write_ribbon->proc~art_points proc~marker_update MarkerArtist%marker_update proc~marker_update->proc~update_bounds

Source Code

    pure subroutine points(self, i1, i2, sources, v, stride)
        class(Trajectory), intent(in) :: self
        integer, intent(in) :: i1, i2                   !! first and last points (1 to num_points(sources))
        type(DataSource), intent(in) :: sources(3)      !! where the components come from
        real(wp), intent(out) :: v(:,:)                 !! (3, number of points)
        integer, intent(in), optional :: stride         !! step between points (default 1)
        integer :: k, s
        s = 1
        if (present(stride)) s = stride
        do k = 1, 3
            associate (src => sources(k))
                select case (src%src)
                case (SOURCE_TIME)
                    v(k, :) = src%scale * self%t(i1:i2:s)
                case (SOURCE_POSOPT)
                    v(k, :) = src%scale * self%posopt(src%element, src%opt, i1:i2:s)
                case (SOURCE_ATTITUDE)
                    v(k, :) = src%scale * self%att(src%element, i1:i2:s)
                case default
                    v(k, :) = 0.0_wp
                end select
            end associate
        end do
    end subroutine points