A strip's distance along it at point i, as written.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(LineChain), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | i |
chain index |
function distance(self, i) result(s) class(LineChain), intent(in) :: self integer, intent(in) :: i !! chain index real(wp) :: s real(c_float), dimension(:,:,:), pointer :: p integer :: j s = 0.0_wp do j = 1, self%n_chunks associate (c => self%chunks(j)) if (i < c%first .or. i > c%first + c%capacity - 1) cycle call line_buffer(c%line, p) if (associated(p)) s = real(p(4, 1, i-c%first+1), wp) + real(p(4, 2, i-c%first+1), wp) return end associate end do end function distance