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 | Intent | Optional | 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) |
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