From cd6a4d1cfd655581fbb022f0d52a868bf2144db8 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 13 Sep 2019 06:37:47 -0700 Subject: [PATCH] that's all we need --- processing/post/addStrainTensors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processing/post/addStrainTensors.py b/processing/post/addStrainTensors.py index 5a10f7d6e..2c5d2505e 100755 --- a/processing/post/addStrainTensors.py +++ b/processing/post/addStrainTensors.py @@ -146,7 +146,7 @@ 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,eigval in enumerate(D): + for i in [0,1,2]: if np.dot(V[:,i],V[:,(i+1)%3]) != 0.0: # check each vector for orthogonality V[:,(i+1)%3] = np.cross(V[:,(i+2)%3],V[:,i]) # correct next vector V[:,(i+1)%3] /= np.sqrt(np.dot(V[:,(i+1)%3],V[:,(i+1)%3])) # and renormalize (hyperphobic?)