diff --git a/processing/post/DADF5_postResults.py b/processing/post/DADF5_postResults.py index 1af8c2aa9..fa47805bb 100755 --- a/processing/post/DADF5_postResults.py +++ b/processing/post/DADF5_postResults.py @@ -78,7 +78,7 @@ for filename in options.filenames: else: header+=' '+label - for label in options.mat: + for label in options.mat: for o in results.m_output_types: results.active['m_output_types'] = [o] for m in results.materialpoints: diff --git a/processing/post/DADF5_vtk_cells.py b/processing/post/DADF5_vtk_cells.py index 0e79209e2..ef27a973c 100755 --- a/processing/post/DADF5_vtk_cells.py +++ b/processing/post/DADF5_vtk_cells.py @@ -59,7 +59,9 @@ for filename in options.filenames: print('Output step {}/{}'.format(i+1,len(results.increments))) vtk_data = [] results.active['increments'] = [inc] + for label in options.con: + for o in results.c_output_types: results.active['c_output_types'] = [o] if o != 'generic': diff --git a/python/damask/dadf5.py b/python/damask/dadf5.py index 0abde662b..4aa31ec56 100644 --- a/python/damask/dadf5.py +++ b/python/damask/dadf5.py @@ -99,22 +99,25 @@ class DADF5(): with h5py.File(self.filename,'r') as f: for i in self.active['increments']: group_inc = 'inc{:05}'.format(i['inc']) + for c in self.active['constituents']: group_constituent = group_inc+'/constituent/'+c for t in self.active['c_output_types']: try: f[group_constituent+'/'+t+'/'+label] path.append(group_constituent+'/'+t+'/'+label) - except: - pass - for m in self.active['materialpoints']: + except Exception as e: + print('unable to locate constituents dataset: '+ str(e)) + + for m in []: #self.active['materialpoints']: group_materialpoint = group_inc+'/materialpoint/'+m for t in self.active['m_output_types']: try: f[group_materialpoint+'/'+t+'/'+label] path.append(group_materialpoint+'/'+t+'/'+label) - except: - pass + except Exception as e: + print('unable to locate materialpoints dataset: '+ str(e)) + return path @@ -136,9 +139,9 @@ class DADF5(): a = np.array(f[pa]) if len(a.shape) == 1: a=a.reshape([a.shape[0],1]) - dataset - except: - pass + dataset[p,:] = a[u,:] + except Exception as e: + print('unable to read constituent: '+ str(e)) try: p = np.where(f['mapping/cellResults/materialpoint']['Name'] == str.encode(label))[0] u = (f['mapping/cellResults/materialpoint'][p.tolist()]['Position']) @@ -146,8 +149,8 @@ class DADF5(): if len(a.shape) == 1: a=a.reshape([a.shape[0],1]) dataset[p,:] = a[u,:] - except: - pass + except Exception as e: + print('unable to read materialpoint: '+ str(e)) return dataset