From d8b57680ec0c43520f045954c7edc01c81fcb7df Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Mon, 21 Dec 2020 15:46:07 -0500 Subject: [PATCH] raise NotImplemented when using R*b instead of R@b --- python/damask/_rotation.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/damask/_rotation.py b/python/damask/_rotation.py index f4d2cf248..780e81891 100644 --- a/python/damask/_rotation.py +++ b/python/damask/_rotation.py @@ -144,6 +144,11 @@ class Rotation: return self.copy(rotation=Rotation(np.block([np.cos(pwr*phi),np.sin(pwr*phi)*p]))._standardize()) + def __mul__(self,other): + """Standard multiplication is not implemented.""" + raise NotImplementedError('Use "R@b", i.e. matmul, to apply rotation "R" to object "b"') + + def __matmul__(self,other): """ Rotation of vector, second or fourth order tensor, or rotation object.