From 7eb7a4e8cd7f9519a699448bfa6c4217546cbb4e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 4 Dec 2015 22:34:19 +0000 Subject: [PATCH] changed to use routine for symmetric matrices as ascii table cannot handle complex number anyway. further advantage: eigvals and eigvectors will be odered --- processing/post/addSpectralDecomposition.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/processing/post/addSpectralDecomposition.py b/processing/post/addSpectralDecomposition.py index 99ca7ac40..7b36bf4ab 100755 --- a/processing/post/addSpectralDecomposition.py +++ b/processing/post/addSpectralDecomposition.py @@ -14,7 +14,7 @@ scriptName = os.path.splitext(scriptID.split()[1])[0] # -------------------------------------------------------------------- parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """ -Add column(s) containing eigenvalues and eigenvectors of requested tensor column(s). +Add column(s) containing eigenvalues and eigenvectors of requested symmetric tensor column(s). """, version = scriptID) @@ -77,7 +77,7 @@ for name in filenames: while outputAlive and table.data_read(): # read next data line of ASCII table for type, data in items.iteritems(): for column in data['column']: - (u,v) = np.linalg.eig(np.array(map(float,table.data[column:column+data['dim']])).reshape(data['shape'])) + (u,v) = np.linalg.eigh(np.array(map(float,table.data[column:column+data['dim']])).reshape(data['shape'])) table.data_append(list(u)) table.data_append(list(v.transpose().reshape(data['dim']))) outputAlive = table.data_write() # output processed line