more appropriate names
This commit is contained in:
parent
cc20fd0809
commit
04aefa84bc
|
@ -26,9 +26,9 @@ parser.add_argument('filenames', nargs='+',
|
||||||
parser.add_argument('-d','--dir', dest='dir',default='postProc',metavar='string',
|
parser.add_argument('-d','--dir', dest='dir',default='postProc',metavar='string',
|
||||||
help='name of subdirectory to hold output')
|
help='name of subdirectory to hold output')
|
||||||
parser.add_argument('--mat', nargs='+',
|
parser.add_argument('--mat', nargs='+',
|
||||||
help='labels for materialpoint/homogenization',dest='mat')
|
help='labels for materialpoint',dest='mat')
|
||||||
parser.add_argument('--con', nargs='+',
|
parser.add_argument('--con', nargs='+',
|
||||||
help='labels for constituent/crystallite/constitutive',dest='con')
|
help='labels for constituent',dest='con')
|
||||||
|
|
||||||
options = parser.parse_args()
|
options = parser.parse_args()
|
||||||
|
|
||||||
|
|
|
@ -49,24 +49,24 @@ class DADF5():
|
||||||
self.constituents = [c.decode() for c in np.unique(f['mapping/cellResults/constituent'] ['Name'])]
|
self.constituents = [c.decode() for c in np.unique(f['mapping/cellResults/constituent'] ['Name'])]
|
||||||
|
|
||||||
|
|
||||||
self.c_output_types = []
|
self.con_physics = []
|
||||||
for c in self.constituents:
|
for c in self.constituents:
|
||||||
for o in f['inc{:05}/constituent/{}'.format(self.increments[0]['inc'],c)].keys():
|
for o in f['inc{:05}/constituent/{}'.format(self.increments[0]['inc'],c)].keys():
|
||||||
self.c_output_types.append(o)
|
self.con_physics.append(o)
|
||||||
self.c_output_types = list(set(self.c_output_types)) # make unique
|
self.con_physics = list(set(self.con_physics)) # make unique
|
||||||
|
|
||||||
self.m_output_types = []
|
self.mat_physics = []
|
||||||
for m in self.materialpoints:
|
for m in self.materialpoints:
|
||||||
for o in f['inc{:05}/materialpoint/{}'.format(self.increments[0]['inc'],m)].keys():
|
for o in f['inc{:05}/materialpoint/{}'.format(self.increments[0]['inc'],m)].keys():
|
||||||
self.m_output_types.append(o)
|
self.mat_physics.append(o)
|
||||||
self.m_output_types = list(set(self.m_output_types)) # make unique
|
self.mat_physics = list(set(self.mat_physics)) # make unique
|
||||||
|
|
||||||
self.visible= {'increments': self.increments, # ToDo:simplify, activity only positions that translate into (no complex types)
|
self.visible= {'increments': self.increments, # ToDo:simplify, activity only positions that translate into (no complex types)
|
||||||
'constituents': self.constituents,
|
'constituents': self.constituents,
|
||||||
'materialpoints': self.materialpoints,
|
'materialpoints': self.materialpoints,
|
||||||
'constituent': range(self.Nconstituents), # ToDo: stupid naming
|
'constituent': range(self.Nconstituents), # ToDo: stupid naming
|
||||||
'c_output_types': self.c_output_types,
|
'con_physics': self.con_physics,
|
||||||
'm_output_types': self.m_output_types}
|
'mat_physics': self.mat_physics}
|
||||||
|
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
|
|
||||||
|
@ -146,35 +146,35 @@ class DADF5():
|
||||||
|
|
||||||
|
|
||||||
def constituent_output_iter(self):
|
def constituent_output_iter(self):
|
||||||
return self.__visible_iter('c_output_types')
|
return self.__visible_iter('con_physics')
|
||||||
|
|
||||||
|
|
||||||
def constituent_output_set(self,output):
|
def constituent_output_set(self,output):
|
||||||
self.__visible_set(output,'c_output_types',self.c_output_types)
|
self.__visible_set(output,'con_physics',self.con_physics)
|
||||||
|
|
||||||
|
|
||||||
def constituent_output_add(self,output):
|
def constituent_output_add(self,output):
|
||||||
self.__visible_add(output,'c_output_types',self.c_output_types)
|
self.__visible_add(output,'con_physics',self.con_physics)
|
||||||
|
|
||||||
|
|
||||||
def constituent_output_del(self,output):
|
def constituent_output_del(self,output):
|
||||||
self.__visible_del(output,'c_output_types')
|
self.__visible_del(output,'con_physics')
|
||||||
|
|
||||||
|
|
||||||
def materialpoint_output_iter(self):
|
def materialpoint_output_iter(self):
|
||||||
return self.__visible_iter('m_output_types')
|
return self.__visible_iter('mat_physics')
|
||||||
|
|
||||||
|
|
||||||
def materialpoint_output_set(self,output):
|
def materialpoint_output_set(self,output):
|
||||||
self.__visible_set(output,'m_output_types',self.m_output_types)
|
self.__visible_set(output,'mat_physics',self.mat_physics)
|
||||||
|
|
||||||
|
|
||||||
def materialpoint_output_add(self,output):
|
def materialpoint_output_add(self,output):
|
||||||
self.__visible_add(output,'m_output_types',self.m_output_types)
|
self.__visible_add(output,'mat_physics',self.mat_physics)
|
||||||
|
|
||||||
|
|
||||||
def materialpoint_output_del(self,output):
|
def materialpoint_output_del(self,output):
|
||||||
self.__visible_del(output,'m_output_types')
|
self.__visible_del(output,'mat_physics')
|
||||||
|
|
||||||
|
|
||||||
def constituent_iter(self):
|
def constituent_iter(self):
|
||||||
|
@ -271,7 +271,7 @@ class DADF5():
|
||||||
for c in self.visible['constituents']:
|
for c in self.visible['constituents']:
|
||||||
print('\n'+c)
|
print('\n'+c)
|
||||||
group_constituent = group_inc+'/constituent/'+c
|
group_constituent = group_inc+'/constituent/'+c
|
||||||
for t in self.visible['c_output_types']:
|
for t in self.visible['con_physics']:
|
||||||
print(' {}'.format(t))
|
print(' {}'.format(t))
|
||||||
group_output_types = group_constituent+'/'+t
|
group_output_types = group_constituent+'/'+t
|
||||||
try:
|
try:
|
||||||
|
@ -281,7 +281,7 @@ class DADF5():
|
||||||
pass
|
pass
|
||||||
for m in self.visible['materialpoints']:
|
for m in self.visible['materialpoints']:
|
||||||
group_materialpoint = group_inc+'/materialpoint/'+m
|
group_materialpoint = group_inc+'/materialpoint/'+m
|
||||||
for t in self.visible['m_output_types']:
|
for t in self.visible['mat_physics']:
|
||||||
print(' {}'.format(t))
|
print(' {}'.format(t))
|
||||||
group_output_types = group_materialpoint+'/'+t
|
group_output_types = group_materialpoint+'/'+t
|
||||||
try:
|
try:
|
||||||
|
@ -299,7 +299,7 @@ class DADF5():
|
||||||
group_inc = 'inc{:05}'.format(i['inc'])
|
group_inc = 'inc{:05}'.format(i['inc'])
|
||||||
|
|
||||||
for c in self.visible['constituents']:
|
for c in self.visible['constituents']:
|
||||||
for t in self.visible['c_output_types']:
|
for t in self.visible['con_physics']:
|
||||||
try:
|
try:
|
||||||
p = '/'.join([group_inc,'constituent',c,t,label])
|
p = '/'.join([group_inc,'constituent',c,t,label])
|
||||||
f[p]
|
f[p]
|
||||||
|
@ -308,7 +308,7 @@ class DADF5():
|
||||||
print('unable to locate constituents dataset: '+ str(e))
|
print('unable to locate constituents dataset: '+ str(e))
|
||||||
|
|
||||||
for m in self.visible['materialpoints']:
|
for m in self.visible['materialpoints']:
|
||||||
for t in self.visible['m_output_types']:
|
for t in self.visible['mat_physics']:
|
||||||
try:
|
try:
|
||||||
p = '/'.join([group_inc,'materialpoint',m,t,label])
|
p = '/'.join([group_inc,'materialpoint',m,t,label])
|
||||||
f[p]
|
f[p]
|
||||||
|
|
Loading…
Reference in New Issue