Hi,
Can the grad operator be written in terms of its components in FEniCS? I.e. Instead of
$$ \nabla u $$
which is coded as grad(u), is there some way to code
$$ \partial_x u + \partial_y u$$
Thanks
You can try
Dx(u, 0) + Dx(u, 1)
You can also index the grad operator:
grad(u)[0]+grad(u)[1]
or write it as
u.dx(0)+u.dx(1)
Index notation is also supported, I prefer
Dx(u,i)
Personally.