mat_add_scal Function

private function mat_add_scal(a, b)

Matrix + Scalar = Matrix

Type Bound

mat

Arguments

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

Input Matrix

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

Scalar to add

Return Value type(mat)


Source Code

    type(mat) function mat_add_scal(a, b)
        !! Matrix + Scalar = Matrix

        !> Input Matrix
        class(mat),    intent(IN) :: a
        !> Scalar to add
        real(kind=wp), intent(IN) :: b

        mat_add_scal%vals = a%vals + b

    end function mat_add_scal