diff --git a/VERSION b/VERSION index 6f2aeecd0..7ed5d9358 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v3.0.0-alpha-160-g117f85ec +v3.0.0-alpha-164-g7cda092a diff --git a/python/tests/test_Rotation.py b/python/tests/test_Rotation.py index 448a8261c..5435895a2 100644 --- a/python/tests/test_Rotation.py +++ b/python/tests/test_Rotation.py @@ -687,6 +687,15 @@ class TestRotation: print(u,c) 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]) def test_Eulers(self,set_of_rotations,degrees): for rot in set_of_rotations: diff --git a/src/grid/discretization_grid.f90 b/src/grid/discretization_grid.f90 index 7c089cc88..89e0cce23 100644 --- a/src/grid/discretization_grid.f90 +++ b/src/grid/discretization_grid.f90 @@ -433,7 +433,7 @@ subroutine readVTR(grid,geomSize,origin,microstructure) coords = as_pReal(base64_str,headerType,compressed,dataType) 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') grid(direction) = size(coords)-1