scal_add_vec Function

private pure elemental function scal_add_vec(a, b)

Elementwise scalar + vec4

Type Bound

vec4

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: a

Scalar to add

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

Input vec4

Return Value type(vec4)


Source Code

        type(vec4) pure elemental function scal_add_vec(a, b)
            !! Elementwise scalar + vec4
            !> Input vec4
            class(vec4),   intent(IN) :: b
            !> Scalar to add
            real(kind=wp), intent(IN) :: a

            scal_add_vec = vec4(b%x + a, b%y + a, b%z + a,  b%p + a)

        end function scal_add_vec