In structural engineering we are often interested in minimum and maximum principal stress. In NGSolve we are able to calculate the eigenstress by something like (assuming stresses to be a 3x3 matrix valued coefficient function):
Code:
eig_stresses = stresses.eig()
Then the first 9 entries of correspond to the stress eigenvectors and
Code:
eig_stresses[9], eig_stresses[10], eig_stresses[11]
are the eigenvalues. However, it seemed to be that the order of the eigenvalues is not fixed. Is there an efficient procedure to order them into maximal, middle and minimal principal values?
In 2D I could use
Code:
max_princ = IfPos(eig_stresses[4]-eig_stresses[5],eig_stresses[4],eig_stresses[5])
but in 3D this is very inefficient due to the need of multiple comparisons.
Best regards,
Nils