After solving the Stokes equation, I got the approximated solution u_h. Now I want to create a matrix
[tex]K=\frac{u_hu_h^T}{|u_h|^2}[/tex]
where $u_h^T$ is the transpose of $u_h$ for another problem.
I did as follows. Please see the attached file.
Code:
uh=SolveStokes()
print("uh",uh)
I = Id(2)
K = uh*uh.trans()/(uh*uh)
Z = I + K
Then I got an error.
Code:
uh gridfunction 'gfu.1' on space 'CompoundFESpaces'
nested = 0
---------------------------------------------------------------------------
NgException Traceback (most recent call last)
<ipython-input-5-34ba77e77d8f> in <module>
95
96 I = Id(2)
---> 97 K = uh*uh.trans()/(uh*uh)
98 Z = I + K
NgException: Transpose of non-matrix called
Could you please tell me how to define the transpose of the grid function $u_h$ in this case?
Thank you so much.