Calculate the derivative of a Function with respect to a direction

I would check what the estimated polynomial degree of the term is using ufl: