R not needed

This commit is contained in:
Martin Diehl 2019-09-13 06:33:00 -07:00
parent 49b3cd2145
commit 79d2432c6c
1 changed files with 3 additions and 3 deletions

View File

@ -136,9 +136,9 @@ for name in filenames:
for column in items['tensor']['column']: # loop over all requested defgrads
F = np.array(list(map(float,table.data[column:column+items['tensor']['dim']])),'d').reshape(items['tensor']['shape'])
(U,S,Vh) = np.linalg.svd(F) # singular value decomposition
R = np.dot(U,Vh) # rotation of polar decomposition
stretch['U'] = np.dot(R.T,F) # F = RU
stretch['V'] = np.dot(F,R.T) # F = VR
R_inv = np.dot(U,Vh).T # rotation of polar decomposition
stretch['U'] = np.dot(R_inv,F) # F = RU
stretch['V'] = np.dot(F,R_inv) # F = VR
for theStretch in stretches:
stretch[theStretch] = np.where(abs(stretch[theStretch]) < 1e-12, 0, stretch[theStretch]) # kill nasty noisy data