def METHOD_NAME(f):
    c, d = f
    x = SpatialCoordinate(d.function_space().mesh())
    d.interpolate(x[0])
    domain = "{[i]: 0 <= i < c.dofs}"
    instructions = """
    for i
        <float64> real_c = real(c[i, 0])
        <float64> real_d = real(d[0, 0])
        c[i, 0] = fmax(real_c, real_d)
    end
    """
    par_loop((domain, instructions), dx, {'c': (c, RW), 'd': (d, READ)})
    assert (c.dat.data == [1./4, 3./4, 3./4]).all()