store microstructure indices as integers
This commit is contained in:
parent
064dabe34b
commit
3caad0bdf4
|
@ -54,17 +54,16 @@ for name in filenames:
|
|||
np.in1d(microstructure,options.blacklist,invert=True) if options.blacklist else \
|
||||
np.full(geom.grid.prod(),True,dtype=bool))
|
||||
|
||||
seeds = np.concatenate((damask.grid_filters.cell_coord0(geom.grid,geom.size).reshape(-1,3),
|
||||
microstructure),
|
||||
axis=1)[mask]
|
||||
seeds = damask.grid_filters.cell_coord0(geom.grid,geom.size).reshape(-1,3)
|
||||
|
||||
comments = geom.comments \
|
||||
+ [scriptID + ' ' + ' '.join(sys.argv[1:]),
|
||||
"grid\ta {}\tb {}\tc {}".format(*geom.grid),
|
||||
"size\tx {}\ty {}\tz {}".format(*geom.size),
|
||||
"origin\tx {}\ty {}\tz {}".format(*geom.origin),
|
||||
"homogenization\t{}".format(geom.homogenization)]
|
||||
'grid\ta {}\tb {}\tc {}'.format(*geom.grid),
|
||||
'size\tx {}\ty {}\tz {}'.format(*geom.size),
|
||||
'origin\tx {}\ty {}\tz {}'.format(*geom.origin),
|
||||
'homogenization\t{}'.format(geom.homogenization)]
|
||||
|
||||
table = damask.Table(seeds,{'pos':(3,),'microstructure':(1,)},comments)
|
||||
table = damask.Table(seeds[mask],{'pos':(3,)},comments)
|
||||
table.add('microstructure',microstructure[mask])
|
||||
table.to_ASCII(sys.stdout if name is None else \
|
||||
os.path.splitext(name)[0]+'.seeds')
|
||||
|
|
Loading…
Reference in New Issue