Calculate the derivative of a Function with respect to a direction

See: How ufl.nabla_grad works? - #2 by dokken