From bc893762eca13b0a0928c944a476839ecd0bfc24 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 11 Sep 2019 07:29:34 -0700 Subject: [PATCH] no need to inverse a rotation, transpose is faster --- python/damask/dadf5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/dadf5.py b/python/damask/dadf5.py index fcfa9ccd1..2ec1da286 100644 --- a/python/damask/dadf5.py +++ b/python/damask/dadf5.py @@ -267,7 +267,7 @@ class DADF5(): """Adds a strain definition""" def strain(defgrad): (U,S,Vh) = np.linalg.svd(defgrad) # singular value decomposition - R_inv = np.linalg.inv(np.dot(U,Vh)) # inverse rotation of polar decomposition + R_inv = np.dot(U,Vh).T # inverse rotation of polar decomposition U = np.dot(R_inv,defgrad) # F = RU U = np.where(abs(U) < 1e-12, 0, U) # kill nasty noisy data (D,V) = np.linalg.eig(U) # eigen decomposition (of symmetric matrix)