mat_mult_mat Function

private function mat_mult_mat(a, b)

Uses

Matrix * vec4

Type Bound

mat

Arguments

Type IntentOptional Attributes Name
class(mat), intent(in) :: a

Input Matrix

type(vec4), intent(in) :: b

Vec4 to multiply by

Return Value type(vec4)


Source Code

    type(vec4) function mat_mult_mat(a, b)
        !! Matrix * vec4
        use vec4_class

        !> Input Matrix
        class(mat), intent(IN) :: a
        !> Vec4 to multiply by
        type(vec4), intent(IN) :: b

        real(kind=wp) :: tmp(4)

        tmp = matmul(a%vals, [b%x, b%y, b%z, b%p])
        mat_mult_mat = vec4(tmp(1), tmp(2), tmp(3), tmp(4))

    end function mat_mult_mat