fixed strange behavior for inSST without given symmetry
np.all() on dict (with keys 'proper' and 'improper') always returns 'False', and not, as (most likely) intended 'True' in the case of no symmetry. Removed this comparison and simply setting inSST=False for no symmetry, color will be (0,0,0) in that case
This commit is contained in:
parent
1346efbef0
commit
b128b15abf
lib/damask
|
@ -774,15 +774,12 @@ class Symmetry:
|
|||
[-1., 0., 0.],
|
||||
[ 0., 1., 0.] ]),
|
||||
}
|
||||
else: # direct exit for unspecified symmetry
|
||||
if color:
|
||||
return (True,np.zeros(3,'d'))
|
||||
else:
|
||||
basis = {'improper': np.zeros((3,3),dtype=float),
|
||||
'proper': np.zeros((3,3),dtype=float),
|
||||
}
|
||||
return True
|
||||
|
||||
if np.all(basis == 0.0):
|
||||
theComponents = -np.ones(3,'d')
|
||||
inSST = np.all(theComponents >= 0.0)
|
||||
else:
|
||||
v = np.array(vector,dtype = float)
|
||||
if proper: # check both improper ...
|
||||
theComponents = np.dot(basis['improper'],v)
|
||||
|
|
Loading…
Reference in New Issue