added output of script ID do material.config

This commit is contained in:
Martin Diehl 2014-12-03 10:09:47 +00:00
parent db17a0c954
commit 47685ac7c4
1 changed files with 2 additions and 1 deletions

View File

@ -199,7 +199,8 @@ for file in files:
phase[0:int(float(info['microstructures'])*options.secondphase)] = options.phase+1
np.random.shuffle(phase)
formatwidth = 1+int(math.log10(info['microstructures']))
file['output'].write('<microstructure>\n')
file['output'].write('#' + scriptID + ' ' + ' '.join(sys.argv[1:]))
file['output'].write('\n<microstructure>\n')
for i,ID in enumerate(grainIDs):
file['output'].write('\n[Grain%s]\n'%(str(ID).zfill(formatwidth)) + \
'crystallite %i\n'%options.crystallite + \