From 19ca99e0331273d2714e1718fc4a276c0ef10e1c Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 18 Jul 2021 16:39:52 +0200 Subject: [PATCH] matching name --- python/damask/_crystal.py | 2 +- python/damask/_orientation.py | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/python/damask/_crystal.py b/python/damask/_crystal.py index 5769fc9c2..09e480709 100644 --- a/python/damask/_crystal.py +++ b/python/damask/_crystal.py @@ -168,7 +168,7 @@ class Crystal(): @property - def basis(self): + def standard_triangle(self): """ Corners of the standard triangle. diff --git a/python/damask/_orientation.py b/python/damask/_orientation.py index a78b6a189..545205c0a 100644 --- a/python/damask/_orientation.py +++ b/python/damask/_orientation.py @@ -668,21 +668,21 @@ class Orientation(Rotation,Crystal): if not isinstance(vector,np.ndarray) or vector.shape[-1] != 3: raise ValueError('input is not a field of three-dimensional vectors') - if self.basis is None: # direct exit for no symmetry + if self.standard_triangle is None: # direct exit for no symmetry return np.ones_like(vector[...,0],bool) if proper: components_proper = np.around(np.einsum('...ji,...i', - np.broadcast_to(self.basis['proper'], vector.shape+(3,)), + np.broadcast_to(self.standard_triangle['proper'], vector.shape+(3,)), vector), 12) components_improper = np.around(np.einsum('...ji,...i', - np.broadcast_to(self.basis['improper'], vector.shape+(3,)), + np.broadcast_to(self.standard_triangle['improper'], vector.shape+(3,)), vector), 12) return np.all(components_proper >= 0.0,axis=-1) \ | np.all(components_improper >= 0.0,axis=-1) else: components = np.around(np.einsum('...ji,...i', - np.broadcast_to(self.basis['improper'], vector.shape+(3,)), + np.broadcast_to(self.standard_triangle['improper'], vector.shape+(3,)), np.block([vector[...,:2],np.abs(vector[...,2:3])])), 12) return np.all(components >= 0.0,axis=-1) @@ -723,15 +723,15 @@ class Orientation(Rotation,Crystal): vector_ = self.to_SST(vector,proper) if in_SST else \ self @ np.broadcast_to(vector,self.shape+(3,)) - if self.basis is None: # direct exit for no symmetry + if self.standard_triangle is None: # direct exit for no symmetry return np.zeros_like(vector_) if proper: components_proper = np.around(np.einsum('...ji,...i', - np.broadcast_to(self.basis['proper'], vector_.shape+(3,)), + np.broadcast_to(self.standard_triangle['proper'], vector_.shape+(3,)), vector_), 12) components_improper = np.around(np.einsum('...ji,...i', - np.broadcast_to(self.basis['improper'], vector_.shape+(3,)), + np.broadcast_to(self.standard_triangle['improper'], vector_.shape+(3,)), vector_), 12) in_SST = np.all(components_proper >= 0.0,axis=-1) \ | np.all(components_improper >= 0.0,axis=-1) @@ -739,7 +739,7 @@ class Orientation(Rotation,Crystal): components_proper,components_improper) else: components = np.around(np.einsum('...ji,...i', - np.broadcast_to(self .basis['improper'], vector_.shape+(3,)), + np.broadcast_to(self .standard_triangle['improper'], vector_.shape+(3,)), np.block([vector_[...,:2],np.abs(vector_[...,2:3])])), 12) in_SST = np.all(components >= 0.0,axis=-1)