Computes the outer product of the two vectors.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | a | ||
real(kind=wp), | intent(in), | dimension(:) | :: | b |
pure function outer_product(a,b) result(c) implicit none real(wp),dimension(:),intent(in) :: a real(wp),dimension(:),intent(in) :: b real(wp),dimension(size(a),size(b)) :: c integer :: i do i=1,size(b) c(:,i) = a*b(i) end do end function outer_product