unified behavior
extra dimensions (here: slip systems) are added to the left, inline with .equivalent and .related
This commit is contained in:
parent
d1c3d767cc
commit
e95157f039
|
@ -865,7 +865,7 @@ class Orientation(Rotation,Crystal):
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
-------
|
-------
|
||||||
P : numpy.ndarray of shape (...,N,3,3)
|
P : numpy.ndarray of shape (N,...,3,3)
|
||||||
Schmid matrix for each of the N deformation systems.
|
Schmid matrix for each of the N deformation systems.
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
|
@ -887,8 +887,9 @@ class Orientation(Rotation,Crystal):
|
||||||
P = np.einsum('...i,...j',d/np.linalg.norm(d,axis=1,keepdims=True),
|
P = np.einsum('...i,...j',d/np.linalg.norm(d,axis=1,keepdims=True),
|
||||||
p/np.linalg.norm(p,axis=1,keepdims=True))
|
p/np.linalg.norm(p,axis=1,keepdims=True))
|
||||||
|
|
||||||
return ~self.broadcast_to( self.shape+P.shape[:-2],mode='right') \
|
shape = P.shape[0:1]+self.shape+(3,3)
|
||||||
@ np.broadcast_to(P,self.shape+P.shape)
|
return ~self.broadcast_to(shape[:-2]) \
|
||||||
|
@ np.broadcast_to(P.reshape(util.shapeshifter(P.shape,shape)),shape)
|
||||||
|
|
||||||
|
|
||||||
def related(self,model):
|
def related(self,model):
|
||||||
|
|
Loading…
Reference in New Issue