I want to solve an Allen - Cahn type PDE with an inequality constraint. More precisely, this equation reads  d/dt(u) = f(u) + d^2/dx^2(u)  (Please consider d/dt as total time derivative and d^2/dx^2 as partial second derivative of a function). Function f(u) is a nonlinear function. I want to impose the constraint 0<u<1 to the solution at each time step. Is there anyway to pass this condition to nonlinear solver of FEniCS?
Thanks in advance