no need to inverse a rotation, transpose is faster

This commit is contained in:
Martin Diehl 2019-09-11 07:29:34 -07:00
parent 2fc66cff5b
commit bc893762ec
1 changed files with 1 additions and 1 deletions

View File

@ -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)