Vector cross product.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(3) | :: | a | ||
real(kind=wp), | intent(in), | dimension(3) | :: | b |
pure function cross(a,b) result(axb) implicit none real(wp),dimension(3) :: axb real(wp),dimension(3),intent(in) :: a real(wp),dimension(3),intent(in) :: b axb(1) = a(2)*b(3) - a(3)*b(2) axb(2) = a(3)*b(1) - a(1)*b(3) axb(3) = a(1)*b(2) - a(2)*b(1) end function cross