Diagonal Form of a Symmetric Tensor
Hello everyone,
I'm trying to calculate the diagonal of a symmetric tensor, but without success. The part of code I wrote is this one: Code:
Foam::symmTensor Furthermore I have extracted the tensor a_ from the symmTensorField Code:
A_ Code:
Foam::symmTensor This is the error message I get when I compile Quote:
Does anyone have an idea about what might be the problem? Many thanks in advantage. Regards, Paolo |
I have just found another thread about the same topic.
It seems that the problem can be solved by using DiagTensor instead of diag(). However, I had a look into the file DiagTensor.H and it seems that it returns a tensor whose elements are only the diagonal of the original tensor. In other words, the result is a tensor whose out diagonal elements have been deleted. In my case, I need the diagonal form of the tensor as a solution of the eigenvalues problem, therefore the previous method does not work for me. Sorry for the useless question. Regards, Paolo |
I hope I found a way to get the tensor I was looking for. I also used it to calculate the logartihm of the tensor A_. The code I wrote is this one
Code:
Foam::tensor However, I have a couple of (more) doubts: 1. Is it normal that the code prints on screen just one tensor teta_? I expected it to be an array of tensors. 2. Since I have to solve a trasport equation for teta_, does anyone know how to re-create a volTensorField from the teta_ tensors? Thanks Paolo |
All times are GMT -4. The time now is 05:20. |