ufl team mailing list archive
-
ufl team
-
Mailing list archive
-
Message #01509
Definition of grad
This is something we've discussed before, but I want to discuss it
again.
Could we change the definition of the gradient of a vector to be the
"normal" definition:
grad(u) = du_i / dx_j
?
Then grad would be the derivative of u, and not as today the transpose
of the derivative of u.
u(x + dx) = u(x) + u' du + h.o.t.
With the current definition, I need to do this in various places:
from ufl import grad as ufl_grad
def grad(v):
if v.rank() == 1:
return ufl_grad(v).T
else:
return ufl_grad(v)
--
Anders
Attachment:
signature.asc
Description: Digital signature
Follow ups