texture is typically the more interesting information

therefore, but it to the top
This commit is contained in:
Martin Diehl 2019-05-30 14:05:45 +02:00
parent 8380071564
commit d0c7f8b934
4 changed files with 46 additions and 41 deletions

View File

@ -137,19 +137,18 @@ for name in filenames:
damask.util.croak(errors)
continue
config_header = ['<microstructure>']
config_header = ['<texture>']
for i in range(np.nanmax(microstructure)):
config_header += ['[{}{}]'.format(label,i+1),
'(gauss)\tphi1 {:.2f}\tPhi {:.2f}\tphi2 {:.2f}'.format(*rot[i].asEulers(degrees = True)),
]
config_header += ['<microstructure>']
for i in range(np.nanmax(microstructure)):
config_header += ['[{}{}]'.format(label,i+1),
'crystallite 1',
'(constituent)\tphase {}\ttexture {}\tfraction 1.0'.format(phase[i],i+1),
]
config_header += ['<texture>']
for i in range(np.nanmax(microstructure)):
config_header += ['[{}{}]'.format(label,i+1),
'(gauss)\tphi1 {:.2f}\tPhi {:.2f}\tphi2 {:.2f}'.format(*rot[i].asEulers(degrees = True)),
]
header = [scriptID + ' ' + ' '.join(sys.argv[1:])]\
+ config_header
geom = damask.Geom(microstructure,size,origin,

View File

@ -114,25 +114,28 @@ for y in range(grid[1]):
Beta [i] = beta [x,y]
i+=1
config_header = []
config_header.append('<microstructure>')
config_header.append('[canal]')
config_header.append('crystallite 1')
config_header.append('(constituent)\tphase 1\ttexture 1\tfraction 1.0')
config_header.append('[interstitial]')
config_header.append('crystallite 1')
config_header.append('(constituent)\tphase 2\ttexture 2\tfraction 1.0')
config_header = ['<texture>',
'[canal]',
'[interstitial]'
]
for i in range(3,np.max(microstructure)):
config_header.append('[Point{}]'.format(i-2))
config_header.append('crystallite 1')
config_header.append('(constituent)\tphase 3\ttexture {}\tfraction 1.0'.format(i))
config_header += ['[Point{}]'.format(i-2),
'(gauss)\tphi1 {:.2f}\tPhi {:.2f}\tphi2 0'.format(Alpha[i],Beta[i])
]
config_header.append('<texture>')
config_header.append('[canal]')
config_header.append('[interstitial]')
config_header = ['<microstructure>',
'[canal]',
'crystallite 1',
'(constituent)\tphase 1\ttexture 1\tfraction 1.0',
'[interstitial]',
'crystallite 1',
'(constituent)\tphase 2\ttexture 2\tfraction 1.0'
]
for i in range(3,np.max(microstructure)):
config_header.append('[Point{}]'.format(i-2))
config_header.append('(gauss)\tphi1 {:.2f}\tPhi {:.2f}\tphi2 0'.format(Alpha[i],Beta[i]))
config_header += ['[Point{}]'.format(i-2),
'crystallite 1',
'(constituent)\tphase 3\ttexture {}\tfraction 1.0'.format(i)
]
header = [scriptID + ' ' + ' '.join(sys.argv[1:])]\
+ config_header

View File

@ -131,14 +131,7 @@ for name in filenames:
microstructure[x,y,z] = unique_inverse[indices[i]]+1
i+=1
config_header = ['<microstructure>']
for i,data in enumerate(unique):
config_header += ['[Grain{}]'.format(i+1),
'crystallite 1',
'(constituent)\tphase {}\ttexture {}\tfraction 1.0'.format(int(data[4]),i+1),
]
config_header += ['<texture>']
config_header = ['<texture>']
for i,data in enumerate(unique):
ori = damask.Rotation(data[0:4])
config_header += ['[Grain{}]'.format(i+1),
@ -146,6 +139,13 @@ for name in filenames:
]
if options.axes is not None: config_header += ['axes\t{} {} {}'.format(*options.axes)]
config_header += ['<microstructure>']
for i,data in enumerate(unique):
config_header += ['[Grain{}]'.format(i+1),
'crystallite 1',
'(constituent)\tphase {}\ttexture {}\tfraction 1.0'.format(int(data[4]),i+1),
]
header = [scriptID + ' ' + ' '.join(sys.argv[1:])]\
+ config_header
geom = damask.Geom(microstructure,size,origin,

View File

@ -277,12 +277,7 @@ for name in filenames:
config_header = []
if options.config:
config_header += ['<microstructure>']
for ID in grainIDs:
config_header += ['[Grain{}]'.format(ID),
'crystallite 1',
'(constituent)\tphase {}\ttexture {}\tfraction 1.0'.format(options.phase,ID)
]
if hasEulers:
config_header += ['<texture>']
for ID in grainIDs:
@ -291,6 +286,14 @@ for name in filenames:
'(gauss)\tphi1 {:.2f}\tPhi {:.2f}\tphi2 {:.2f}'.format(*eulers[eulerID])
]
if options.axes is not None: config_header += ['axes\t{} {} {}'.format(*options.axes)]
config_header += ['<microstructure>']
for ID in grainIDs:
config_header += ['[Grain{}]'.format(ID),
'crystallite 1',
'(constituent)\tphase {}\ttexture {}\tfraction 1.0'.format(options.phase,ID)
]
config_header += ['<!skip>']
header = [scriptID + ' ' + ' '.join(sys.argv[1:])]\