I want only "u_x" or "u_y" instead of the vector "grad(u)" . Does someone know this ,thanks!
Hi, you can use
du_dxi = Dx(u, i) du_dxi = u.dx(i) du_dxi = grad(u)[i]
to get the derivative of scalar function or expression with respect to x_i. There is more about the differential operators in the UFL manual here.
Thanks a lot ! :-)