Merge branch 'development' into texture-components-in-rotation-class2
This commit is contained in:
commit
70911b64ea
|
@ -687,6 +687,15 @@ class TestRotation:
|
||||||
print(u,c)
|
print(u,c)
|
||||||
assert np.allclose(single(u),c) and np.allclose(single(u),vectorized(u))
|
assert np.allclose(single(u),c) and np.allclose(single(u),vectorized(u))
|
||||||
|
|
||||||
|
@pytest.mark.parametrize('func',[Rotation.from_axis_angle])
|
||||||
|
def test_normalization_vectorization(self,func):
|
||||||
|
"""Check vectorized implementation normalization."""
|
||||||
|
vec = np.random.rand(5,4)
|
||||||
|
ori = func(vec,normalize=True)
|
||||||
|
for v,o in zip(vec,ori):
|
||||||
|
assert np.allclose(func(v,normalize=True).as_quaternion(),o.as_quaternion())
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('degrees',[True,False])
|
@pytest.mark.parametrize('degrees',[True,False])
|
||||||
def test_Eulers(self,set_of_rotations,degrees):
|
def test_Eulers(self,set_of_rotations,degrees):
|
||||||
for rot in set_of_rotations:
|
for rot in set_of_rotations:
|
||||||
|
|
|
@ -433,7 +433,7 @@ subroutine readVTR(grid,geomSize,origin,microstructure)
|
||||||
coords = as_pReal(base64_str,headerType,compressed,dataType)
|
coords = as_pReal(base64_str,headerType,compressed,dataType)
|
||||||
|
|
||||||
delta = coords(2:) - coords(:size(coords)-1)
|
delta = coords(2:) - coords(:size(coords)-1)
|
||||||
if(any(delta<0.0_pReal) .or. dNeq(maxval(delta),minval(delta))) &
|
if(any(delta<0.0_pReal) .or. dNeq(maxval(delta),minval(delta),1.0e-8_pReal*maxval(abs(coords)))) &
|
||||||
call IO_error(error_ID = 844, ext_msg = 'grid spacing')
|
call IO_error(error_ID = 844, ext_msg = 'grid spacing')
|
||||||
|
|
||||||
grid(direction) = size(coords)-1
|
grid(direction) = size(coords)-1
|
||||||
|
|
Loading…
Reference in New Issue