vec_dot_vec Function

private pure elemental function vec_dot_vec(a, b) result(dot)

vec3 . vec3

Type Bound

vector

Arguments

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

Input vec3

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

vec3 to dot

Return Value real(kind=wp)


Source Code

        pure elemental function vec_dot_vec(a, b) result (dot)
            !! vec3 . vec3
            !> Input vec3
            class(vector), intent(IN) :: a
            !> vec3 to dot
            type(vector),  intent(IN) :: b
            
            real(kind=wp) :: dot

            dot = (a%x * b%x) + (a%y * b%y) + (a%z * b%z)

        end function vec_dot_vec