p-vector outer (=vector=cross) product.
Status: vector/matrix support routine.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(3) | :: | a | first p-vector |
|
real(kind=wp), | intent(in), | dimension(3) | :: | b | second p-vector |
|
real(kind=wp), | intent(out), | dimension(3) | :: | axb | A x B |
subroutine PXP ( a, b, axb )
implicit none
real(wp),dimension(3),intent(in) :: a !! first p-vector
real(wp),dimension(3),intent(in) :: b !! second p-vector
real(wp),dimension(3),intent(out) :: axb !! A x B
real(wp) :: xa, ya, za, xb, yb, zb
xa = a(1)
ya = a(2)
za = a(3)
xb = b(1)
yb = b(2)
zb = b(3)
axb(1) = ya*zb - za*yb
axb(2) = za*xb - xa*zb
axb(3) = xa*yb - ya*xb
end subroutine PXP