Point i as written: read back from the buffers (zero if not held).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(LineChain), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | i |
chain index |
function point(self, i) result(v) class(LineChain), intent(in) :: self integer, intent(in) :: i !! chain index real(wp) :: v(3) real(c_float), dimension(:,:,:), pointer :: p integer :: j v = 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)) v = real(p(1:3, 1, i-c%first+1), wp) + real(p(1:3, 2, i-c%first+1), wp) return end associate end do end function point