polishing
This commit is contained in:
parent
5cdd603671
commit
9686014ce0
|
@ -33,24 +33,24 @@ module rotations
|
||||||
implicit none
|
implicit none
|
||||||
type, public :: rotation
|
type, public :: rotation
|
||||||
type(quaternion), private :: q
|
type(quaternion), private :: q
|
||||||
contains
|
contains
|
||||||
procedure, public :: asEulerAngles => asEulerAngles
|
procedure, public :: asEulerAngles
|
||||||
procedure, public :: asAxisAnglePair => asAxisAnglePair
|
procedure, public :: asAxisAnglePair
|
||||||
procedure, public :: asRodriguesFrankVector => asRodriguesFrankVector
|
procedure, public :: asRodriguesFrankVector
|
||||||
procedure, public :: asRotationMatrix => asRotationMatrix
|
procedure, public :: asRotationMatrix
|
||||||
procedure, public :: rotVector
|
procedure, public :: rotVector
|
||||||
procedure, public :: rotTensor
|
procedure, public :: rotTensor
|
||||||
end type
|
end type
|
||||||
|
|
||||||
interface rotation
|
interface rotation
|
||||||
module procedure init
|
module procedure :: init
|
||||||
end interface
|
end interface
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
type(rotation) function init(eu,ax,om,qu,cu,ho,ro)
|
type(rotation) function init(eu,ax,om,qu,cu,ho,ro)
|
||||||
real(pReal), intent(in), optional, dimension(3) :: eu, cu, ho
|
real(pReal), intent(in), optional, dimension(3) :: eu, cu, ho
|
||||||
real(pReal), intent(in), optional, dimension(4) :: qu, ax, ro
|
real(pReal), intent(in), optional, dimension(4) :: ax, qu, ro
|
||||||
real(pReal), intent(in), optional, dimension(3,3) :: om
|
real(pReal), intent(in), optional, dimension(3,3) :: om
|
||||||
|
|
||||||
if (count([present(eu),present(ax),present(om),present(qu),&
|
if (count([present(eu),present(ax),present(om),present(qu),&
|
||||||
|
@ -119,7 +119,6 @@ function asHomochoric(this)
|
||||||
|
|
||||||
end function asHomochoric
|
end function asHomochoric
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------
|
!--------------------------------------------------------------------------
|
||||||
!> @author Marc De Graef, Carnegie Mellon University
|
!> @author Marc De Graef, Carnegie Mellon University
|
||||||
!> @brief rotates a vector passively (default) or actively
|
!> @brief rotates a vector passively (default) or actively
|
||||||
|
@ -239,7 +238,9 @@ end function eu2ax
|
||||||
!> @brief Euler angles to Rodrigues vector
|
!> @brief Euler angles to Rodrigues vector
|
||||||
!--------------------------------------------------------------------------
|
!--------------------------------------------------------------------------
|
||||||
pure function eu2ro(eu) result(ro)
|
pure function eu2ro(eu) result(ro)
|
||||||
use, intrinsic :: IEEE_ARITHMETIC
|
use, intrinsic :: IEEE_ARITHMETIC, only: &
|
||||||
|
IEEE_value, &
|
||||||
|
IEEE_positive_inf
|
||||||
use math, only: &
|
use math, only: &
|
||||||
PI
|
PI
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue