def METHOD_NAME(mesh, DGDPC1, W):
    velocity = as_vector((0.0, 0.0, 1.0))
    u0 = project(velocity, W)
    xs = SpatialCoordinate(mesh)
    inflowexpr = 0.5 + xs[0]
    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(un*D, phi)*ds_t  # outflow at top wall
    a = a1 + a2 + a3
    L = -inner(inflow*dot(u0, n), phi)*ds_b  # inflow at bottom wall
    out = Function(DGDPC1)
    solve(a == L, out)
    assert max(abs(out.dat.data - inflow.dat.data)) < 1e-13