Hi all,

I’m working with an equation that has a term like this

\dot u_i + ... = \nabla_j(\nabla_i\phi\nabla_j\phi)

where u_i is the function I want to solve for, hich is a vector, and \phi is a scalar function.

My question, is how does Fenics interpret the product of two grads? If the term on the right hand side would translate, for a test function w_i, as:

\nabla_i\phi\nabla_j\phi \nabla_j w_i

can I write that in Fenics as

```
inner(grad(\phi)*grad(\phi) , grad(w))*dx
```

or like

```
inner( outer(grad(\phi) , grad(\phi)) , grad(w) )*dx
```

Or are those two things the same for Fenics?

Thank you!