### Multiplication of a column and row vector.

75

views

0

Hi,

I have a column vector n=(n1,n2,n3)

I have a column vector n=(n1,n2,n3)

^{T }and a row vector n^{T}. I need to calculate nn^{T }in UFL format as a 3x3 matrix. However, I receive a syntax error when I use "n*n.T" and I know "dot(n,n.T)" is just going to give me scalar. Any help would be much appreciated.
Community: FEniCS Project

### 2 Answers

4

Look into

I assume you want to compute `n \otimes n`

https://fenicsproject.org/olddocs/ufl/1.5.0/ufl.html#ufl.operators.outer

`ufl.outer`

I assume you want to compute `n \otimes n`

https://fenicsproject.org/olddocs/ufl/1.5.0/ufl.html#ufl.operators.outer

2

Please login to add an answer/comment or follow this question.