introduced synonym "grains" for deprecated "grains" to ensure backward compatibility
This commit is contained in:
parent
9b6fdcfdae
commit
47577e3d11
|
@ -54,6 +54,7 @@ def meshgrid2(*arrs):
|
||||||
synonyms = {
|
synonyms = {
|
||||||
'grid': ['resolution'],
|
'grid': ['resolution'],
|
||||||
'size': ['dimension'],
|
'size': ['dimension'],
|
||||||
|
'microstructures': ['grains'],
|
||||||
}
|
}
|
||||||
identifiers = {
|
identifiers = {
|
||||||
'grid': ['a','b','c'],
|
'grid': ['a','b','c'],
|
||||||
|
@ -203,10 +204,10 @@ for file in files:
|
||||||
file['output'].write('\n<texture>\n')
|
file['output'].write('\n<texture>\n')
|
||||||
for i in grainIDs:
|
for i in grainIDs:
|
||||||
eulerID = numpy.nonzero(grain == i)[0][0] # find first occurrence of this grain id
|
eulerID = numpy.nonzero(grain == i)[0][0] # find first occurrence of this grain id
|
||||||
file['output'].write('\n[Grain%s]\n'%(str(i).zfill(formatwidth)) + \
|
file['output'].write('\n[Grain%s]\n'%(str(i).zfill(formatwidth))) #+ \
|
||||||
'(gauss)\tphi1 %g\tPhi %g\tphi2 %g\tscatter 0.0\tfraction 1.0\n'%(eulers[0,eulerID],
|
# '(gauss)\tphi1 %g\tPhi %g\tphi2 %g\tscatter 0.0\tfraction 1.0\n'%(eulers[0,eulerID],
|
||||||
eulers[1,eulerID],
|
# eulers[1,eulerID],
|
||||||
eulers[2,eulerID]))
|
# eulers[2,eulerID]))
|
||||||
|
|
||||||
else: # write geometry file
|
else: # write geometry file
|
||||||
x = (numpy.arange(info['grid'][0])+0.5)*info['size'][0]/info['grid'][0]
|
x = (numpy.arange(info['grid'][0])+0.5)*info['size'][0]/info['grid'][0]
|
||||||
|
|
Loading…
Reference in New Issue