Primal-dual active set strategy

Hi,

I would like to implement a primal-dual active set strategy. For the determination of the active sets, I need to find all x \in \Omega where the function value is below or above a bound, e.g. A = \{ x \in \Omega: f(x) < 1\}. How can I do this efficiently in Fenics? Extracting the vectors of a dolfin::functions seems to be not very reasonable. I am writing in c++

Best,
Moerni

Did you know how to do this ?