Hi, I want to evaluate the gradient of the solution of my problem in a cartesian grid. I’m following the demo about computing the Von Mises stress, however, being my function complex, it doesn’t work.
Where both U and V are complex valued fem functions (of ("Lagrange", 2) type) . I’m working with the complex slepc and everything is working fine until that part where I get a TypeError: can't convert complex to float on the line calling Expression.
I have also tried changing 1j by ScalarType(1j) without sucess. How should I approach this?
To be honest, I don’t need the full expression for the TD field, but only its real part, so if there is a workaround taking the real part of TD it would also work.
Thank you, it “works” now (as in “it doesn’t throw any error and I’m able to plot things”) but I don’t get the expected results. I guess there is something wrong in my code.
Just to check, inner is performing conjugation in its second argument, right?
Thank you very much by the way
EDIT: sorry, you already answered that to me. Inner is indeed taking the conjugate of its second argument