some comments

This commit is contained in:
Martin Diehl 2019-02-01 10:17:20 +01:00
parent 9d25d677e6
commit 11a509970b
3 changed files with 14 additions and 2 deletions

View File

@ -20,7 +20,8 @@ class Quaternion:
Convention 4: Euler angle triplets are implemented using the Bunge convention, Convention 4: Euler angle triplets are implemented using the Bunge convention,
with the angular ranges as [0, 2π],[0, π],[0, 2π] with the angular ranges as [0, 2π],[0, π],[0, 2π]
Convention 5: the rotation angle ω is limited to the interval [0, π] 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. w is the real part, (x, y, z) are the imaginary parts.
Vector "a" (defined in coordinate system "A") is passively rotated Vector "a" (defined in coordinate system "A") is passively rotated

View File

@ -31,6 +31,7 @@
!> @author Marc De Graef, Carnegie Mellon University !> @author Marc De Graef, Carnegie Mellon University
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH !> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
!> @brief general quaternion math, not limited to unit quaternions !> @brief general quaternion math, not limited to unit quaternions
!> @details w is the real part, (x, y, z) are the imaginary parts.
!--------------------------------------------------------------------------------------------------- !---------------------------------------------------------------------------------------------------
module quaternions module quaternions
use prec, only: & use prec, only: &
@ -39,7 +40,7 @@ module quaternions
implicit none implicit none
public 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 type, public :: quaternion
real(pReal) :: w = 0.0_pReal real(pReal) :: w = 0.0_pReal

View File

@ -33,6 +33,16 @@
!> @brief rotation storage and conversion !> @brief rotation storage and conversion
!> @details: rotation is internally stored as quaternion. It cabe inialized from different !> @details: rotation is internally stored as quaternion. It cabe inialized from different
!> represantations and also returns itself in different representations. !> 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 module rotations