From 11a509970b8870736f816b90a721ed399323972d Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 1 Feb 2019 10:17:20 +0100 Subject: [PATCH] some comments --- python/damask/orientation.py | 3 ++- src/quaternions.f90 | 3 ++- src/rotations.f90 | 10 ++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/python/damask/orientation.py b/python/damask/orientation.py index 63880a3e6..6a2685a2b 100644 --- a/python/damask/orientation.py +++ b/python/damask/orientation.py @@ -20,7 +20,8 @@ class Quaternion: Convention 4: Euler angle triplets are implemented using the Bunge convention, with the angular ranges as [0, 2π],[0, π],[0, 2π] Convention 5: the rotation angle ω is limited to the interval [0, π] - + Convention 6: P = 1 (as default) + w is the real part, (x, y, z) are the imaginary parts. Vector "a" (defined in coordinate system "A") is passively rotated diff --git a/src/quaternions.f90 b/src/quaternions.f90 index b0dd37291..b3a92ffdf 100644 --- a/src/quaternions.f90 +++ b/src/quaternions.f90 @@ -31,6 +31,7 @@ !> @author Marc De Graef, Carnegie Mellon University !> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH !> @brief general quaternion math, not limited to unit quaternions +!> @details w is the real part, (x, y, z) are the imaginary parts. !--------------------------------------------------------------------------------------------------- module quaternions use prec, only: & @@ -39,7 +40,7 @@ module quaternions implicit none public - real(pReal), parameter, public :: epsijk = -1.0_pReal !< parameter for orientation conversion. ToDo: Better place? + real(pReal), parameter, public :: epsijk = -1.0_pReal !< parameter for orientation conversion. type, public :: quaternion real(pReal) :: w = 0.0_pReal diff --git a/src/rotations.f90 b/src/rotations.f90 index e58963dea..a0e6e9250 100644 --- a/src/rotations.f90 +++ b/src/rotations.f90 @@ -33,6 +33,16 @@ !> @brief rotation storage and conversion !> @details: rotation is internally stored as quaternion. It cabe inialized from different !> represantations and also returns itself in different representations. +! +! All methods and naming conventions based on Rowenhorst_etal2015 +! Convention 1: coordinate frames are right-handed +! Convention 2: a rotation angle ω is taken to be positive for a counterclockwise rotation +! when viewing from the end point of the rotation axis towards the origin +! Convention 3: rotations will be interpreted in the passive sense +! Convention 4: Euler angle triplets are implemented using the Bunge convention, +! with the angular ranges as [0, 2π],[0, π],[0, 2π] +! Convention 5: the rotation angle ω is limited to the interval [0, π] +! Convention 6: epsijk/P = -1 !--------------------------------------------------------------------------------------------------- module rotations