added option to suppress writing of material.config part in header

This commit is contained in:
Philip Eisenlohr 2016-12-06 21:36:25 -05:00
parent f5a10ae480
commit a2db7e9ba1
1 changed files with 18 additions and 12 deletions

View File

@ -178,6 +178,10 @@ parser.add_option_group(group)
group = OptionGroup(parser, "Configuration","")
group.add_option('--no-config',
dest = 'config',
action = 'store_false',
help = 'omit material configuration header')
group.add_option('--homogenization',
dest = 'homogenization',
type = 'int', metavar = 'int',
@ -203,6 +207,7 @@ parser.set_defaults(pos = 'pos',
cpus = 2,
laguerre = False,
nonperiodic = False,
config = True,
)
(options,filenames) = parser.parse_args()
@ -303,6 +308,7 @@ for name in filenames:
config_header = []
formatwidth = 1+int(math.log10(NgrainIDs))
if options.config:
config_header += ['<microstructure>']
for i,ID in enumerate(grainIDs):
config_header += ['[Grain{}]'.format(str(ID).zfill(formatwidth)),