Cross product of two 3x1 vectors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(3) | :: | r | ||
real(kind=wp), | intent(in), | dimension(3) | :: | v |
pure function cross(r,v) result(rxv) implicit none real(wp),dimension(3),intent(in) :: r real(wp),dimension(3),intent(in) :: v real(wp),dimension(3) :: rxv rxv = [r(2)*v(3) - v(2)*r(3), & r(3)*v(1) - v(3)*r(1), & r(1)*v(2) - v(1)*r(2) ] end function cross