UFL - conditional for Tensor

I had the same kind of problem.
See this post : Integer part of UFL tensor