From 0a36527f612380f8bb03d39c956d6a7553654d8a Mon Sep 17 00:00:00 2001 From: Christoph Kords Date: Tue, 4 May 2010 16:02:05 +0000 Subject: [PATCH] fixed bugs in math_quaternionDisorientation though running, there still seem to be some problems with the quaternion functions, since crystallite_grainRotation gives some dubious results! --- code/math.f90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/math.f90 b/code/math.f90 index 5bb35946c..bd422bc18 100644 --- a/code/math.f90 +++ b/code/math.f90 @@ -1521,10 +1521,10 @@ endfunction !************************************************************************** ! calculates the disorientation for 2 orientations Q1 and Q2 (needs quaternions) !************************************************************************** -pure function math_QuaternionDisorientation(Q1, Q2, symmetryType) +function math_QuaternionDisorientation(Q1, Q2, symmetryType) use prec, only: pReal, pInt - use IO, only: IO_warning + use IO, only: IO_error implicit none !*** input variables @@ -1544,8 +1544,8 @@ pure function math_QuaternionDisorientation(Q1, Q2, symmetryType) select case (symmetryType) case (0) - if (math_QuaternionMisorientation(1) < 0.0_pReal) & - math_QuaternionMisorientation = -math_QuaternionMisorientation ! keep omega within 0 to 180 deg + if (math_QuaternionDisorientation(1) < 0.0_pReal) & + math_QuaternionDisorientation = -math_QuaternionDisorientation ! keep omega within 0 to 180 deg case (1,2) s = sum(math_NsymOperations(1:symmetryType-1))