How to find eigenvalues and eigenvectors of a tensor for post processing?

You can find principal components and principal directions using closed-form expression in UFL, see dolfiny/invariants.py at master · michalhabera/dolfiny · GitHub

These UFL expression have to be “evaluated” for specific FE functions as input (displacements or stress tensor is your case). In old FEniCS please use project() for this, in FEniCSX use Expressions and interpolation to get the exact point evaluations.

2 Likes