set threshold for values treated as zero to 1.e-12 (was 1.e-15) to avoid flip in strain direction

This commit is contained in:
Martin Diehl 2013-11-19 19:39:14 +00:00
parent 9083aa53fb
commit feaccae652
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ for file in files:
stretch['V'] = numpy.dot(F,numpy.linalg.inv(R)) stretch['V'] = numpy.dot(F,numpy.linalg.inv(R))
for theStretch in stretches: for theStretch in stretches:
for i in range(9): for i in range(9):
if abs(stretch[theStretch][i%3,i//3]) < 1e-15: # kill nasty noisy data if abs(stretch[theStretch][i%3,i//3]) < 1e-12: # kill nasty noisy data
stretch[theStretch][i%3,i//3] = 0.0 stretch[theStretch][i%3,i//3] = 0.0
(D,V) = numpy.linalg.eig(stretch[theStretch]) # eigen decomposition (of symmetric matrix) (D,V) = numpy.linalg.eig(stretch[theStretch]) # eigen decomposition (of symmetric matrix)
for i,eigval in enumerate(D): for i,eigval in enumerate(D):