def get_bmd(input_values, x):
    """ 
        Take input and position on the bar and gets the resulting bmd.

        :param input_values: Dict containing all the values given at input.

        :param x: position along the length of the bar.

    """
    bmd = 0
    udls = input_values.get('UDLs')
    for i in range(len(udls)):
        udl = udls[i]
        if max(x, float(udl[1])) >= x and float(udl[2]) >= x:
            bmd += float(udl[0]) * (float(udl[2]) - max(x, float(udl[1]))) * (
                (float(udl[2]) + max(x, float(udl[1]))) / 2 - x)
    point_loads = input_values.get('point_loads')
    for i in range(len(point_loads)):
        point_load = point_loads[i]
        if float(point_load[1]) >= x:
            bmd += float(point_load[0]) * (float(point_load[1]) - x)
    return bmd
