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!
This commit is contained in:
Christoph Kords 2010-05-04 16:02:05 +00:00
parent ba48e5d3ab
commit 0a36527f61
1 changed files with 4 additions and 4 deletions

View File

@ -1521,10 +1521,10 @@ endfunction
!************************************************************************** !**************************************************************************
! calculates the disorientation for 2 orientations Q1 and Q2 (needs quaternions) ! 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 prec, only: pReal, pInt
use IO, only: IO_warning use IO, only: IO_error
implicit none implicit none
!*** input variables !*** input variables
@ -1544,8 +1544,8 @@ pure function math_QuaternionDisorientation(Q1, Q2, symmetryType)
select case (symmetryType) select case (symmetryType)
case (0) case (0)
if (math_QuaternionMisorientation(1) < 0.0_pReal) & if (math_QuaternionDisorientation(1) < 0.0_pReal) &
math_QuaternionMisorientation = -math_QuaternionMisorientation ! keep omega within 0 to 180 deg math_QuaternionDisorientation = -math_QuaternionDisorientation ! keep omega within 0 to 180 deg
case (1,2) case (1,2)
s = sum(math_NsymOperations(1:symmetryType-1)) s = sum(math_NsymOperations(1:symmetryType-1))