def METHOD_NAME(mesh, DGDPC1, W):
    velocity = as_vector([0.0, -1.0])
    u0 = project(velocity, W)
    xs = SpatialCoordinate(mesh)
    inflowexpr = 0.5 + abs(xs[0] - 0.5)
    inflow = Function(DGDPC1)
    inflow.interpolate(inflowexpr)
    n = FacetNormal(mesh)
    un = 0.5*(dot(u0, n) + abs(dot(u0, n)))
    D = TrialFunction(DGDPC1)
    phi = TestFunction(DGDPC1)
    a1 = -inner(D, dot(u0, grad(phi)))*dx
    a2 = inner((un('+')*D('+') - un('-')*D('-')), jump(phi))*dS_h
    a3 = inner(D, phi*un)*ds_b  # outflow at bottom wall
    a = a1 + a2 + a3
    L = -inner(inflow*dot(u0, n), phi)*ds_t  # inflow at top wall
    out = Function(DGDPC1)
    solve(a == L, out)
    assert max(abs(out.dat.data - inflow.dat.data)) < 1e-14