open_segments Function

private pure function open_segments(p) result(s)

Points along an open curve, as separate segments.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: p(:,:)

(3, n) points of the curve

Return Value real(kind=wp), (3,2*(size(p,2)-1))


Called by

proc~~open_segments~~CalledByGraph proc~open_segments open_segments proc~make_grid make_grid proc~make_grid->proc~open_segments proc~grid_build_contents LatLonGrid%grid_build_contents proc~grid_build_contents->proc~make_grid proc~grid_set_color LatLonGrid%grid_set_color proc~grid_set_color->proc~make_grid proc~grid_set_parameters LatLonGrid%grid_set_parameters proc~grid_set_parameters->proc~make_grid proc~set_line_widths LatLonGrid%set_line_widths proc~set_line_widths->proc~make_grid

Source Code

    pure function open_segments(p) result(s)
        real(wp), intent(in) :: p(:,:)                      !! (3, n) points of the curve
        real(wp) :: s(3, 2 * (size(p, 2) - 1))
        integer :: i
        do i = 1, size(p, 2) - 1
            s(:, 2*i-1) = p(:, i)
            s(:, 2*i) = p(:, i + 1)
        end do
    end function open_segments