def coarsen_1D(u):
    """
    coarsen u(1D) by a factor of two
    """

    n = len(u)
    uc = 0.5 * ( u[0:n-1:2] + u[1:n:2] )

    #print ('u[1] - u[0] = {} {}'.format(type(u[0]), u[1]-u[0]))
    return uc