Directional derivative
Hi folks,
Just a quick question:
I have a 2D domain and I need to have \partial (\partial u / \partial x) / \partial x. In other words, div(grad(u)) in x direction only.
Can (u.dx(0)).dx(0) do the job?
I have also tried u[0].dx(0), but I got the following error:
Invalid number of indices (1) for tensor expression of rank 0:
Argument(
Traceback (most recent call last):
File "adv_diff_
r = u.dx(0) - nu*(u[0].dx(0)) # L(u)
File "/usr/lib/
a = Indexed(self, indices)
File "/usr/lib/
% (len(indices), expression.rank(), expression))
File "/usr/lib/
raise self._exception
ufl.log.
Argument(
Any help is deeply appreciated.
Best,
Mo
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Martin Sandve Alnæs
- Solved:
- Last query:
- Last reply: