Extract a vector from the vector and update the index
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(out), | dimension(:) | :: | vals | ||
real(kind=wp), | intent(in), | dimension(:) | :: | x | ||
integer, | intent(inout) | :: | i |
should be initialized to 0 before the first call |
subroutine extract_vector_from_vector(vals, x, i) implicit none real(wp),dimension(:),intent(out) :: vals real(wp),dimension(:),intent(in) :: x integer,intent(inout) :: i !! should be initialized to 0 before the first call integer :: j !! counter do j = 1, size(vals) call extract_vector(vals(j),x,i) end do end subroutine extract_vector_from_vector