added option to suppress writing of material.config part in header
This commit is contained in:
parent
f5a10ae480
commit
a2db7e9ba1
|
@ -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)),
|
||||
|
|
Loading…
Reference in New Issue