structured according to family
This commit is contained in:
parent
96767e75a3
commit
bb5db3e79c
python/damask
|
@ -340,178 +340,183 @@ class Crystal():
|
|||
"""
|
||||
_kinematics = {
|
||||
'cF': {
|
||||
'slip' : np.array([
|
||||
[+0,+1,-1, +1,+1,+1],
|
||||
[-1,+0,+1, +1,+1,+1],
|
||||
[+1,-1,+0, +1,+1,+1],
|
||||
[+0,-1,-1, -1,-1,+1],
|
||||
[+1,+0,+1, -1,-1,+1],
|
||||
[-1,+1,+0, -1,-1,+1],
|
||||
[+0,-1,+1, +1,-1,-1],
|
||||
[-1,+0,-1, +1,-1,-1],
|
||||
[+1,+1,+0, +1,-1,-1],
|
||||
[+0,+1,+1, -1,+1,-1],
|
||||
[+1,+0,-1, -1,+1,-1],
|
||||
[-1,-1,+0, -1,+1,-1],
|
||||
[+1,+1,+0, +1,-1,+0],
|
||||
[+1,-1,+0, +1,+1,+0],
|
||||
[+1,+0,+1, +1,+0,-1],
|
||||
[+1,+0,-1, +1,+0,+1],
|
||||
[+0,+1,+1, +0,+1,-1],
|
||||
[+0,+1,-1, +0,+1,+1],
|
||||
],dtype=float),
|
||||
'twin' : np.array([
|
||||
[-2, 1, 1, 1, 1, 1],
|
||||
[ 1,-2, 1, 1, 1, 1],
|
||||
[ 1, 1,-2, 1, 1, 1],
|
||||
[ 2,-1, 1, -1,-1, 1],
|
||||
[-1, 2, 1, -1,-1, 1],
|
||||
[-1,-1,-2, -1,-1, 1],
|
||||
[-2,-1,-1, 1,-1,-1],
|
||||
[ 1, 2,-1, 1,-1,-1],
|
||||
[ 1,-1, 2, 1,-1,-1],
|
||||
[ 2, 1,-1, -1, 1,-1],
|
||||
[-1,-2,-1, -1, 1,-1],
|
||||
[-1, 1, 2, -1, 1,-1],
|
||||
],dtype=float),
|
||||
'slip' :[np.array([
|
||||
[+0,+1,-1, +1,+1,+1],
|
||||
[-1,+0,+1, +1,+1,+1],
|
||||
[+1,-1,+0, +1,+1,+1],
|
||||
[+0,-1,-1, -1,-1,+1],
|
||||
[+1,+0,+1, -1,-1,+1],
|
||||
[-1,+1,+0, -1,-1,+1],
|
||||
[+0,-1,+1, +1,-1,-1],
|
||||
[-1,+0,-1, +1,-1,-1],
|
||||
[+1,+1,+0, +1,-1,-1],
|
||||
[+0,+1,+1, -1,+1,-1],
|
||||
[+1,+0,-1, -1,+1,-1],
|
||||
[-1,-1,+0, -1,+1,-1]]),
|
||||
np.array([
|
||||
[+1,+1,+0, +1,-1,+0],
|
||||
[+1,-1,+0, +1,+1,+0],
|
||||
[+1,+0,+1, +1,+0,-1],
|
||||
[+1,+0,-1, +1,+0,+1],
|
||||
[+0,+1,+1, +0,+1,-1],
|
||||
[+0,+1,-1, +0,+1,+1]])],
|
||||
'twin' :[np.array([
|
||||
[-2, 1, 1, 1, 1, 1],
|
||||
[ 1,-2, 1, 1, 1, 1],
|
||||
[ 1, 1,-2, 1, 1, 1],
|
||||
[ 2,-1, 1, -1,-1, 1],
|
||||
[-1, 2, 1, -1,-1, 1],
|
||||
[-1,-1,-2, -1,-1, 1],
|
||||
[-2,-1,-1, 1,-1,-1],
|
||||
[ 1, 2,-1, 1,-1,-1],
|
||||
[ 1,-1, 2, 1,-1,-1],
|
||||
[ 2, 1,-1, -1, 1,-1],
|
||||
[-1,-2,-1, -1, 1,-1],
|
||||
[-1, 1, 2, -1, 1,-1]])]
|
||||
},
|
||||
'cI': {
|
||||
'slip' : np.array([
|
||||
[+1,-1,+1, +0,+1,+1],
|
||||
[-1,-1,+1, +0,+1,+1],
|
||||
[+1,+1,+1, +0,-1,+1],
|
||||
[-1,+1,+1, +0,-1,+1],
|
||||
[-1,+1,+1, +1,+0,+1],
|
||||
[-1,-1,+1, +1,+0,+1],
|
||||
[+1,+1,+1, -1,+0,+1],
|
||||
[+1,-1,+1, -1,+0,+1],
|
||||
[-1,+1,+1, +1,+1,+0],
|
||||
[-1,+1,-1, +1,+1,+0],
|
||||
[+1,+1,+1, -1,+1,+0],
|
||||
[+1,+1,-1, -1,+1,+0],
|
||||
[-1,+1,+1, +2,+1,+1],
|
||||
[+1,+1,+1, -2,+1,+1],
|
||||
[+1,+1,-1, +2,-1,+1],
|
||||
[+1,-1,+1, +2,+1,-1],
|
||||
[+1,-1,+1, +1,+2,+1],
|
||||
[+1,+1,-1, -1,+2,+1],
|
||||
[+1,+1,+1, +1,-2,+1],
|
||||
[-1,+1,+1, +1,+2,-1],
|
||||
[+1,+1,-1, +1,+1,+2],
|
||||
[+1,-1,+1, -1,+1,+2],
|
||||
[-1,+1,+1, +1,-1,+2],
|
||||
[+1,+1,+1, +1,+1,-2],
|
||||
[+1,+1,-1, +1,+2,+3],
|
||||
[+1,-1,+1, -1,+2,+3],
|
||||
[-1,+1,+1, +1,-2,+3],
|
||||
[+1,+1,+1, +1,+2,-3],
|
||||
[+1,-1,+1, +1,+3,+2],
|
||||
[+1,+1,-1, -1,+3,+2],
|
||||
[+1,+1,+1, +1,-3,+2],
|
||||
[-1,+1,+1, +1,+3,-2],
|
||||
[+1,+1,-1, +2,+1,+3],
|
||||
[+1,-1,+1, -2,+1,+3],
|
||||
[-1,+1,+1, +2,-1,+3],
|
||||
[+1,+1,+1, +2,+1,-3],
|
||||
[+1,-1,+1, +2,+3,+1],
|
||||
[+1,+1,-1, -2,+3,+1],
|
||||
[+1,+1,+1, +2,-3,+1],
|
||||
[-1,+1,+1, +2,+3,-1],
|
||||
[-1,+1,+1, +3,+1,+2],
|
||||
[+1,+1,+1, -3,+1,+2],
|
||||
[+1,+1,-1, +3,-1,+2],
|
||||
[+1,-1,+1, +3,+1,-2],
|
||||
[-1,+1,+1, +3,+2,+1],
|
||||
[+1,+1,+1, -3,+2,+1],
|
||||
[+1,+1,-1, +3,-2,+1],
|
||||
[+1,-1,+1, +3,+2,-1],
|
||||
],dtype=float),
|
||||
'twin' : np.array([
|
||||
[-1, 1, 1, 2, 1, 1],
|
||||
[ 1, 1, 1, -2, 1, 1],
|
||||
[ 1, 1,-1, 2,-1, 1],
|
||||
[ 1,-1, 1, 2, 1,-1],
|
||||
[ 1,-1, 1, 1, 2, 1],
|
||||
[ 1, 1,-1, -1, 2, 1],
|
||||
[ 1, 1, 1, 1,-2, 1],
|
||||
[-1, 1, 1, 1, 2,-1],
|
||||
[ 1, 1,-1, 1, 1, 2],
|
||||
[ 1,-1, 1, -1, 1, 2],
|
||||
[-1, 1, 1, 1,-1, 2],
|
||||
[ 1, 1, 1, 1, 1,-2],
|
||||
],dtype=float),
|
||||
'slip' :[np.array([
|
||||
[+1,-1,+1, +0,+1,+1],
|
||||
[-1,-1,+1, +0,+1,+1],
|
||||
[+1,+1,+1, +0,-1,+1],
|
||||
[-1,+1,+1, +0,-1,+1],
|
||||
[-1,+1,+1, +1,+0,+1],
|
||||
[-1,-1,+1, +1,+0,+1],
|
||||
[+1,+1,+1, -1,+0,+1],
|
||||
[+1,-1,+1, -1,+0,+1],
|
||||
[-1,+1,+1, +1,+1,+0],
|
||||
[-1,+1,-1, +1,+1,+0],
|
||||
[+1,+1,+1, -1,+1,+0],
|
||||
[+1,+1,-1, -1,+1,+0]]),
|
||||
np.array([
|
||||
[-1,+1,+1, +2,+1,+1],
|
||||
[+1,+1,+1, -2,+1,+1],
|
||||
[+1,+1,-1, +2,-1,+1],
|
||||
[+1,-1,+1, +2,+1,-1],
|
||||
[+1,-1,+1, +1,+2,+1],
|
||||
[+1,+1,-1, -1,+2,+1],
|
||||
[+1,+1,+1, +1,-2,+1],
|
||||
[-1,+1,+1, +1,+2,-1],
|
||||
[+1,+1,-1, +1,+1,+2],
|
||||
[+1,-1,+1, -1,+1,+2],
|
||||
[-1,+1,+1, +1,-1,+2],
|
||||
[+1,+1,+1, +1,+1,-2]]),
|
||||
np.array([
|
||||
[+1,+1,-1, +1,+2,+3],
|
||||
[+1,-1,+1, -1,+2,+3],
|
||||
[-1,+1,+1, +1,-2,+3],
|
||||
[+1,+1,+1, +1,+2,-3],
|
||||
[+1,-1,+1, +1,+3,+2],
|
||||
[+1,+1,-1, -1,+3,+2],
|
||||
[+1,+1,+1, +1,-3,+2],
|
||||
[-1,+1,+1, +1,+3,-2],
|
||||
[+1,+1,-1, +2,+1,+3],
|
||||
[+1,-1,+1, -2,+1,+3],
|
||||
[-1,+1,+1, +2,-1,+3],
|
||||
[+1,+1,+1, +2,+1,-3],
|
||||
[+1,-1,+1, +2,+3,+1],
|
||||
[+1,+1,-1, -2,+3,+1],
|
||||
[+1,+1,+1, +2,-3,+1],
|
||||
[-1,+1,+1, +2,+3,-1],
|
||||
[-1,+1,+1, +3,+1,+2],
|
||||
[+1,+1,+1, -3,+1,+2],
|
||||
[+1,+1,-1, +3,-1,+2],
|
||||
[+1,-1,+1, +3,+1,-2],
|
||||
[-1,+1,+1, +3,+2,+1],
|
||||
[+1,+1,+1, -3,+2,+1],
|
||||
[+1,+1,-1, +3,-2,+1],
|
||||
[+1,-1,+1, +3,+2,-1]])],
|
||||
'twin' :[np.array([
|
||||
[-1, 1, 1, 2, 1, 1],
|
||||
[ 1, 1, 1, -2, 1, 1],
|
||||
[ 1, 1,-1, 2,-1, 1],
|
||||
[ 1,-1, 1, 2, 1,-1],
|
||||
[ 1,-1, 1, 1, 2, 1],
|
||||
[ 1, 1,-1, -1, 2, 1],
|
||||
[ 1, 1, 1, 1,-2, 1],
|
||||
[-1, 1, 1, 1, 2,-1],
|
||||
[ 1, 1,-1, 1, 1, 2],
|
||||
[ 1,-1, 1, -1, 1, 2],
|
||||
[-1, 1, 1, 1,-1, 2],
|
||||
[ 1, 1, 1, 1, 1,-2]])]
|
||||
},
|
||||
'hP': {
|
||||
'slip' : np.array([
|
||||
[+2,-1,-1,+0, +0,+0,+0,+1],
|
||||
[-1,+2,-1,+0, +0,+0,+0,+1],
|
||||
[-1,-1,+2,+0, +0,+0,+0,+1],
|
||||
[+2,-1,-1,+0, +0,+1,-1,+0],
|
||||
[-1,+2,-1,+0, -1,+0,+1,+0],
|
||||
[-1,-1,+2,+0, +1,-1,+0,+0],
|
||||
[-1,+1,+0,+0, +1,+1,-2,+0],
|
||||
[+0,-1,+1,+0, -2,+1,+1,+0],
|
||||
[+1,+0,-1,+0, +1,-2,+1,+0],
|
||||
[-1,+2,-1,+0, +1,+0,-1,+1],
|
||||
[-2,+1,+1,+0, +0,+1,-1,+1],
|
||||
[-1,-1,+2,+0, -1,+1,+0,+1],
|
||||
[+1,-2,+1,+0, -1,+0,+1,+1],
|
||||
[+2,-1,-1,+0, +0,-1,+1,+1],
|
||||
[+1,+1,-2,+0, +1,-1,+0,+1],
|
||||
[-2,+1,+1,+3, +1,+0,-1,+1],
|
||||
[-1,-1,+2,+3, +1,+0,-1,+1],
|
||||
[-1,-1,+2,+3, +0,+1,-1,+1],
|
||||
[+1,-2,+1,+3, +0,+1,-1,+1],
|
||||
[+1,-2,+1,+3, -1,+1,+0,+1],
|
||||
[+2,-1,-1,+3, -1,+1,+0,+1],
|
||||
[+2,-1,-1,+3, -1,+0,+1,+1],
|
||||
[+1,+1,-2,+3, -1,+0,+1,+1],
|
||||
[+1,+1,-2,+3, +0,-1,+1,+1],
|
||||
[-1,+2,-1,+3, +0,-1,+1,+1],
|
||||
[-1,+2,-1,+3, +1,-1,+0,+1],
|
||||
[-2,+1,+1,+3, +1,-1,+0,+1],
|
||||
[-1,-1,+2,+3, +1,+1,-2,+2],
|
||||
[+1,-2,+1,+3, -1,+2,-1,+2],
|
||||
[+2,-1,-1,+3, -2,+1,+1,+2],
|
||||
[+1,+1,-2,+3, -1,-1,+2,+2],
|
||||
[-1,+2,-1,+3, +1,-2,+1,+2],
|
||||
[-2,+1,+1,+3, +2,-1,-1,+2],
|
||||
],dtype=float),
|
||||
'twin' : np.array([
|
||||
[-1, 0, 1, 1, 1, 0,-1, 2], # shear = (3-(c/a)^2)/(sqrt(3) c/a) <-10.1>{10.2}
|
||||
[ 0,-1, 1, 1, 0, 1,-1, 2],
|
||||
[ 1,-1, 0, 1, -1, 1, 0, 2],
|
||||
[ 1, 0,-1, 1, -1, 0, 1, 2],
|
||||
[ 0, 1,-1, 1, 0,-1, 1, 2],
|
||||
[-1, 1, 0, 1, 1,-1, 0, 2],
|
||||
[-1,-1, 2, 6, 1, 1,-2, 1], # shear = 1/(c/a) <11.6>{-1-1.1}
|
||||
[ 1,-2, 1, 6, -1, 2,-1, 1],
|
||||
[ 2,-1,-1, 6, -2, 1, 1, 1],
|
||||
[ 1, 1,-2, 6, -1,-1, 2, 1],
|
||||
[-1, 2,-1, 6, 1,-2, 1, 1],
|
||||
[-2, 1, 1, 6, 2,-1,-1, 1],
|
||||
[ 1, 0,-1,-2, 1, 0,-1, 1], # shear = (4(c/a)^2-9)/(4 sqrt(3) c/a) <10.-2>{10.1}
|
||||
[ 0, 1,-1,-2, 0, 1,-1, 1],
|
||||
[-1, 1, 0,-2, -1, 1, 0, 1],
|
||||
[-1, 0, 1,-2, -1, 0, 1, 1],
|
||||
[ 0,-1, 1,-2, 0,-1, 1, 1],
|
||||
[ 1,-1, 0,-2, 1,-1, 0, 1],
|
||||
[ 1, 1,-2,-3, 1, 1,-2, 2], # shear = 2((c/a)^2-2)/(3 c/a) <11.-3>{11.2}
|
||||
[-1, 2,-1,-3, -1, 2,-1, 2],
|
||||
[-2, 1, 1,-3, -2, 1, 1, 2],
|
||||
[-1,-1, 2,-3, -1,-1, 2, 2],
|
||||
[ 1,-2, 1,-3, 1,-2, 1, 2],
|
||||
[ 2,-1,-1,-3, 2,-1,-1, 2],
|
||||
],dtype=float),
|
||||
'slip' :[np.array([
|
||||
[+2,-1,-1,+0, +0,+0,+0,+1],
|
||||
[-1,+2,-1,+0, +0,+0,+0,+1],
|
||||
[-1,-1,+2,+0, +0,+0,+0,+1]]),
|
||||
np.array([
|
||||
[+2,-1,-1,+0, +0,+1,-1,+0],
|
||||
[-1,+2,-1,+0, -1,+0,+1,+0],
|
||||
[-1,-1,+2,+0, +1,-1,+0,+0]]),
|
||||
np.array([
|
||||
[-1,+1,+0,+0, +1,+1,-2,+0],
|
||||
[+0,-1,+1,+0, -2,+1,+1,+0],
|
||||
[+1,+0,-1,+0, +1,-2,+1,+0]]),
|
||||
np.array([
|
||||
[-1,+2,-1,+0, +1,+0,-1,+1],
|
||||
[-2,+1,+1,+0, +0,+1,-1,+1],
|
||||
[-1,-1,+2,+0, -1,+1,+0,+1],
|
||||
[+1,-2,+1,+0, -1,+0,+1,+1],
|
||||
[+2,-1,-1,+0, +0,-1,+1,+1],
|
||||
[+1,+1,-2,+0, +1,-1,+0,+1]]),
|
||||
np.array([
|
||||
[-2,+1,+1,+3, +1,+0,-1,+1],
|
||||
[-1,-1,+2,+3, +1,+0,-1,+1],
|
||||
[-1,-1,+2,+3, +0,+1,-1,+1],
|
||||
[+1,-2,+1,+3, +0,+1,-1,+1],
|
||||
[+1,-2,+1,+3, -1,+1,+0,+1],
|
||||
[+2,-1,-1,+3, -1,+1,+0,+1],
|
||||
[+2,-1,-1,+3, -1,+0,+1,+1],
|
||||
[+1,+1,-2,+3, -1,+0,+1,+1],
|
||||
[+1,+1,-2,+3, +0,-1,+1,+1],
|
||||
[-1,+2,-1,+3, +0,-1,+1,+1],
|
||||
[-1,+2,-1,+3, +1,-1,+0,+1],
|
||||
[-2,+1,+1,+3, +1,-1,+0,+1]]),
|
||||
np.array([
|
||||
[-1,-1,+2,+3, +1,+1,-2,+2],
|
||||
[+1,-2,+1,+3, -1,+2,-1,+2],
|
||||
[+2,-1,-1,+3, -2,+1,+1,+2],
|
||||
[+1,+1,-2,+3, -1,-1,+2,+2],
|
||||
[-1,+2,-1,+3, +1,-2,+1,+2],
|
||||
[-2,+1,+1,+3, +2,-1,-1,+2]])],
|
||||
'twin' :[np.array([
|
||||
[-1, 0, 1, 1, 1, 0,-1, 2], # shear = (3-(c/a)^2)/(sqrt(3) c/a) <-10.1>{10.2}
|
||||
[ 0,-1, 1, 1, 0, 1,-1, 2],
|
||||
[ 1,-1, 0, 1, -1, 1, 0, 2],
|
||||
[ 1, 0,-1, 1, -1, 0, 1, 2],
|
||||
[ 0, 1,-1, 1, 0,-1, 1, 2],
|
||||
[-1, 1, 0, 1, 1,-1, 0, 2]]),
|
||||
np.array([
|
||||
[-1,-1, 2, 6, 1, 1,-2, 1], # shear = 1/(c/a) <11.6>{-1-1.1}
|
||||
[ 1,-2, 1, 6, -1, 2,-1, 1],
|
||||
[ 2,-1,-1, 6, -2, 1, 1, 1],
|
||||
[ 1, 1,-2, 6, -1,-1, 2, 1],
|
||||
[-1, 2,-1, 6, 1,-2, 1, 1],
|
||||
[-2, 1, 1, 6, 2,-1,-1, 1]]),
|
||||
np.array([
|
||||
[ 1, 0,-1,-2, 1, 0,-1, 1], # shear = (4(c/a)^2-9)/(4 sqrt(3) c/a) <10.-2>{10.1}
|
||||
[ 0, 1,-1,-2, 0, 1,-1, 1],
|
||||
[-1, 1, 0,-2, -1, 1, 0, 1],
|
||||
[-1, 0, 1,-2, -1, 0, 1, 1],
|
||||
[ 0,-1, 1,-2, 0,-1, 1, 1],
|
||||
[ 1,-1, 0,-2, 1,-1, 0, 1]]),
|
||||
np.array([
|
||||
[ 1, 1,-2,-3, 1, 1,-2, 2], # shear = 2((c/a)^2-2)/(3 c/a) <11.-3>{11.2}
|
||||
[-1, 2,-1,-3, -1, 2,-1, 2],
|
||||
[-2, 1, 1,-3, -2, 1, 1, 2],
|
||||
[-1,-1, 2,-3, -1,-1, 2, 2],
|
||||
[ 1,-2, 1,-3, 1,-2, 1, 2],
|
||||
[ 2,-1,-1,-3, 2,-1,-1, 2]])]
|
||||
},
|
||||
}
|
||||
master = _kinematics[self.lattice][mode]
|
||||
if self.lattice == 'hP':
|
||||
return {'direction':util.Bravais_to_Miller(uvtw=master[:,0:4]),
|
||||
'plane': util.Bravais_to_Miller(hkil=master[:,4:8])}
|
||||
return {'direction':[util.Bravais_to_Miller(uvtw=m[:,0:4]) for m in master],
|
||||
'plane': [util.Bravais_to_Miller(hkil=m[:,4:8]) for m in master]}
|
||||
else:
|
||||
return {'direction':master[:,0:3],
|
||||
'plane': master[:,3:6]}
|
||||
return {'direction':[m[:,0:3] for m in master],
|
||||
'plane': [m[:,3:6] for m in master]}
|
||||
|
||||
|
||||
def relation_operations(self,model):
|
||||
|
|
|
@ -882,8 +882,8 @@ class Orientation(Rotation,Crystal):
|
|||
[ 0.000, 0.000, 0.000]])
|
||||
|
||||
"""
|
||||
d = self.to_frame(uvw=self.kinematics(mode)['direction'])
|
||||
p = self.to_frame(hkl=self.kinematics(mode)['plane'])
|
||||
d = self.to_frame(uvw=np.vstack(self.kinematics(mode)['direction']))
|
||||
p = self.to_frame(hkl=np.vstack(self.kinematics(mode)['plane']))
|
||||
P = np.einsum('...i,...j',d/np.linalg.norm(d,axis=1,keepdims=True),
|
||||
p/np.linalg.norm(p,axis=1,keepdims=True))
|
||||
|
||||
|
|
Loading…
Reference in New Issue