From a3c6f6682e7f91de665830d3f5c564c85092cd6d Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 13 Sep 2019 06:42:01 -0700 Subject: [PATCH] using eigh should ensure orthogonal eigenvectors --- processing/post/addStrainTensors.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/processing/post/addStrainTensors.py b/processing/post/addStrainTensors.py index c210291d9..d2dece05e 100755 --- a/processing/post/addStrainTensors.py +++ b/processing/post/addStrainTensors.py @@ -146,9 +146,6 @@ for name in filenames: neg = np.where(D < 0.0) # find negative eigenvalues ... D[neg] *= -1. # ... flip value ... V[:,neg] *= -1. # ... and vector - for i in [0,1,2]: - V[:,(i+1)%3] = np.cross(V[:,(i+2)%3],V[:,i]) # correct next vector - V[:,(i+1)%3] /= np.linalg.norm(V[:,(i+1)%3]) # and renormalize (hyperphobic?) for theStrain in strains: d = operator(theStretch,theStrain,D) # operate on eigenvalues of U or V eps = np.dot(V,np.dot(np.diag(d),V.T)).reshape(9) # build tensor back from eigenvalue/vector basis