my_minval Function

public pure function my_minval(vec, target_state)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: vec(:)
integer, intent(in), optional :: target_state

Return Value real(kind=dp)


Contents

Source Code


Source Code

    pure real(dp) function my_minval(vec, target_state)
        real(dp), intent(in) :: vec(:)
        integer, intent(in), optional :: target_state

        if (present(target_state)) then
            my_minval = vec(my_minloc(vec,target_state))
        else
            my_minval = minval(vec)
        end if

    end function my_minval