Hi there,
I am trying to calculate the dot product of gradients of TestFunction(u) and TrialFunction(v). And I am working on 2D domain.
When I do;
dot(grad(u), grad(v))
it works perfectly. But when I customly define the grad function as;
def gradient(u):
return dolf.Dx(u, 0) + dolf.Dx(u, 1)
and using
dot(gradient(u), gradient(v))
giving completely different results. Could you please explain why?