diff --git a/python/damask/dadf5.py b/python/damask/dadf5.py index 841029af8..eed5907e5 100644 --- a/python/damask/dadf5.py +++ b/python/damask/dadf5.py @@ -48,16 +48,24 @@ class DADF5(): for o in f['inc{:05}/constituent/{}'.format(self.increments[0]['inc'],c)].keys(): self.c_output_types.append(o) self.c_output_types = list(set(self.c_output_types)) # make unique + + self.m_output_types = [] + for m in self.materialpoints: + for o in f['inc{:05}/materialpoint/{}'.format(self.increments[0]['inc'],m)].keys(): + self.m_output_types.append(o) + self.m_output_types = list(set(self.m_output_types)) # make unique self.active= {'increments': self.increments, 'constituents': self.constituents, 'materialpoints': self.materialpoints, 'constituent': self.Nconstituents, - 'c_output_types': self.c_output_types} + 'c_output_types': self.c_output_types, + 'm_output_types': self.m_output_types} self.filename = filename self.mode = mode - + + def list_data(self): """Shows information on all datasets in the file""" with h5py.File(self.filename,'r') as f: @@ -73,6 +81,17 @@ class DADF5(): print(' {} ({})'.format(x,f[group_output_types+'/'+x].attrs['Description'].decode())) except: pass + for m in self.active['materialpoints']: + print('\n'+m) + group_materialpoint = group_inc+'/materialpoint/'+m + for t in self.active['m_output_types']: + print(' {}'.format(t)) + group_output_types = group_materialpoint+'/'+t + try: + for x in f[group_output_types].keys(): + print(' {} ({})'.format(x,f[group_output_types+'/'+x].attrs['Description'].decode())) + except: + pass def get_dataset_location(self,label):