Transport of the vector

hello
how can I write a transpose of the vector in fenics. we know that (A.T) is possible when A is a matrix of Rank 2. how can I write for a vector please?
thank.

Hello,
what do you need it for exactly ? The transpose operation is only defined for tensors of rank 2. Usually it is not needed for vectors.

Hello, I need to transpose a vector, in fact I would like to multiply a vector by the same vector.

-’--------------
Djoumessi René Thierry
PhD student
university of Dschang
department of physics
heart and complex system modelling.

What do you mean by “multiply” ? Do you mean a dot product ? then it’s just dot(v, v)

Not a dot product. Something like f(i)*f(j) where f is a vector.

Djoumessi René Thierry
PhD student
university of Dschang
department of physics
heart and complex system modelling.

OK so it’s an outer product, the result yielding a 2nd rank tensor:

outer(v, v)

thank bleyerj, but I’ve the following error:
TypeError: unsupported operand type(s) for +: ‘ComponentTensor’ and ‘tuple’
please can you helps me on this?

Please post a minimal working example reproducing your error with proper formatting using ```
if you want people answering this kind of question.