vec_mult_scal Function

private pure elemental function vec_mult_scal(a, b)

vec3 * scalar elementwise

Type Bound

vector

Arguments

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

input vec3

real(kind=wp), intent(in) :: b

Scalar to multiply by

Return Value type(vector)


Source Code

        type(vector) pure elemental function vec_mult_scal(a, b)
            !! vec3 * scalar elementwise
            !> input vec3
            class(vector), intent(IN) :: a
            !> Scalar to multiply by
            real(kind=wp), intent(IN) :: b

            vec_mult_scal = vector(a%x * b, a%y * b, a%z * b)

        end function vec_mult_scal