Isotropic tensor functions

tmech implements isotropic tensor functions – exp, log, sqrt, pow, and positive/negative part operators – via spectral decomposition (Miehe 1993; Miehe and Lambrecht 2001). Given a symmetric rank-2 tensor \mathbf{A}, the library computes its eigenvalues \lambda_i and eigenvectors \mathbf{n}_i, applies the scalar function to each eigenvalue, and reconstructs the tensor result:

f(\mathbf{A}) = \sum_{i} f(\lambda_i)\, \mathbf{n}_i \otimes \mathbf{n}_i

First and second derivatives are computed analytically using the eigenbasis, with proper treatment of repeated eigenvalues to avoid singularities. These functions integrate with the symbolic differentiation module, enabling automatic tangent computation for models involving tensor logarithms or exponentials.