From 16f30a10d0f85bdd277b372f2cfbee47e69d3e2a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 20 May 2020 23:50:08 +0200 Subject: [PATCH] polishing --- python/damask/_orientation.py | 8 ++++---- python/damask/_rotation.py | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/python/damask/_orientation.py b/python/damask/_orientation.py index c145dc42b..7c3c614fb 100644 --- a/python/damask/_orientation.py +++ b/python/damask/_orientation.py @@ -65,8 +65,8 @@ class Orientation: r = b*aInv for k in range(2): r.inverse() - breaker = self.lattice.symmetry.inFZ(r.asRodrigues(vector=True)) \ - and (not SST or other.lattice.symmetry.inDisorientationSST(r.asRodrigues(vector=True))) + breaker = self.lattice.symmetry.inFZ(r.as_Rodrigues(vector=True)) \ + and (not SST or other.lattice.symmetry.inDisorientationSST(r.as_Rodrigues(vector=True))) if breaker: break if breaker: break if breaker: break @@ -75,7 +75,7 @@ class Orientation: # ... own sym, other sym, # self-->other: True, self<--other: False def inFZ(self): - return self.lattice.symmetry.inFZ(self.rotation.asRodrigues(vector=True)) + return self.lattice.symmetry.inFZ(self.rotation.as_Rodrigues(vector=True)) def equivalentOrientations(self,members=[]): @@ -97,7 +97,7 @@ class Orientation: def reduced(self): """Transform orientation to fall into fundamental zone according to symmetry.""" for me in self.equivalentOrientations(): - if self.lattice.symmetry.inFZ(me.rotation.asRodrigues(vector=True)): break + if self.lattice.symmetry.inFZ(me.rotation.as_Rodrigues(vector=True)): break return self.__class__(me.rotation,self.lattice) diff --git a/python/damask/_rotation.py b/python/damask/_rotation.py index cac0cec3e..387ee84cb 100644 --- a/python/damask/_rotation.py +++ b/python/damask/_rotation.py @@ -119,7 +119,7 @@ class Rotation: R = self.as_matrix() return np.einsum('...im,...jn,...ko,...lp,...mnop',R,R,R,R,other) else: - raise ValueError('Can only rotate vectors, 2nd order ternsors, and 4th order tensors') + raise ValueError('Can only rotate vectors, 2nd order tensors, and 4th order tensors') else: raise TypeError('Cannot rotate {}'.format(type(other))) @@ -464,7 +464,6 @@ class Rotation: fromQuaternion = from_quaternion fromEulers = from_Eulers asAxisAngle = as_axis_angle - asRodrigues = as_Rodrigues __mul__ = __matmul__ ####################################################################################################