Logarithm of a matrix

Hi everyone,

I am using FEniCS to solve an elasto-viscoplastic problem, and would be nice to use a constitutive law which includes the Hencky logarithmic strain. So, for the implementation, it would be needed to calculate the logarithm of a matrix (the right stretch tensor, V).

As I have seen in UFL documentation, the logarithm included there is only valid for scalar functions. Is it possible to directly calculate the logarithm of a matrix (which will contain unknowns of the problem) in FEniCS? Is there a way to calculate the eigenvalues and eigenvectors of the matrix so then the logarithm will be easier to calculate?

Thanks in advance.

it is possible to have explicit formulas for eigenvalues and eigenvectors in 2D using UFL. In 3D also but formulas are much more involved.
However, regarding elasoviscoplastic computations, suggest using MFront and the corresponding interface in FEniCS. See Overview of the mgis.fenics module and the logarithmic plasticity demo Finite-strain elastoplasticity within the logarithmic strain framework