throw error message when DAMASK output obviously not present in T16 file

This commit is contained in:
Philip Eisenlohr 2015-04-28 17:54:00 +00:00
parent f8e06b488a
commit c05df20370
1 changed files with 8 additions and 4 deletions

View File

@ -1176,10 +1176,14 @@ for incCount,position in enumerate(locations): # walk through locations
if assembleHeader: header += thisHead
if resultType != 'Homogenization':
thisHead = heading('_',[[g,component,label] for component in range(int(length>1),length+int(length>1))])
newby.append({'label':label,
'len':length,
'content':[ p.element_scalar(p.element_sequence(e),stat['IndexOfLabel'][head])[n_local].value
for head in thisHead ]})
try:
newby.append({'label':label,
'len':length,
'content':[ p.element_scalar(p.element_sequence(e),stat['IndexOfLabel'][head])[n_local].value
for head in thisHead ]})
except KeyError:
print '\nDAMASK outputs seem missing from "post" section of the *.dat file!'
sys.exit()
assembleHeader = False