skewSymm Function

public function skewSymm(a) result(out)

Calculate the Skew Symmetric matrix for a given vector

Arguments

Type IntentOptional Attributes Name
type(vector), intent(in) :: a

Vector to calculate the skew symmetric matrix for.

Return Value real(kind=wp), (4,4)


Source Code

    function skewSymm(a) result(out)
        !! Calculate the Skew Symmetric matrix for a given vector

        !> Vector to calculate the skew symmetric matrix for.
        type(vector), intent(in) :: a
        real(kind=wp) :: out(4,4)

        out(:, 1) = [0._wp, -a%z, a%y, 0._wp]
        out(:, 2) = [a%z, 0._wp, -a%x, 0._wp]
        out(:, 3) = [-a%y, a%x, 0._wp, 0._wp]
        out(:, 4) = [0._wp, 0._wp, 0._wp, 0._wp]

    end function skewSymm