P/epsijk parameter has nothing to do with precision

This commit is contained in:
Martin Diehl 2019-02-01 08:53:57 +01:00
parent 8a2689da0a
commit 17a682e883
2 changed files with 11 additions and 8 deletions

View File

@ -29,8 +29,6 @@ module prec
real(pReal), parameter, public :: tol_math_check = 1.0e-8_pReal !< tolerance for internal math self-checks (rotation)
integer(pInt), allocatable, dimension(:) :: realloc_lhs_test
real(pReal), parameter, public :: epsijk = -1.0_pReal !< parameter for orientation conversion. ToDo: Better place?
type, public :: group_float !< variable length datatype used for storage of state
real(pReal), dimension(:), pointer :: p

View File

@ -1,5 +1,6 @@
! ###################################################################
! Copyright (c) 2013-2015, Marc De Graef/Carnegie Mellon University
! Modified 2017-2019, Martin Diehl/Max-Planck-Institut für Eisenforschung GmbH
! All rights reserved.
!
! Redistribution and use in source and binary forms, with or without modification, are
@ -27,10 +28,14 @@
! ###################################################################
module quaternions
use prec
use prec, only: &
pReal
implicit none
public
real(pReal), parameter, public :: epsijk = -1.0_pReal !< parameter for orientation conversion. ToDo: Better place?
type, public :: quaternion
real(pReal) :: w = 0.0_pReal
real(pReal) :: x = 0.0_pReal
@ -73,9 +78,6 @@ module quaternions
procedure, public :: homomorphed => quat_homomorphed
!procedure,private :: quat_write
!generic :: write(formatted) => quat_write
end type
interface assignment (=)
@ -150,7 +152,7 @@ pure subroutine assign_vec__(self,other)
implicit none
type(quaternion), intent(out) :: self
real(pReal), intent(in), dimension(4) :: other
real(pReal), intent(in), dimension(4) :: other
self%w = other(1)
self%x = other(2)
@ -288,6 +290,9 @@ end function div_scal__
!> equality of two quaternions
!--------------------------------------------------------------------------
logical elemental function eq__(self,other)
use prec, only: &
dEq
implicit none
class(quaternion), intent(in) :: self,other
@ -346,7 +351,7 @@ type(quaternion) elemental function exp__(self)
implicit none
class(quaternion), intent(in) :: self
real(pReal) :: absImag
real(pReal) :: absImag
absImag = norm2([self%x, self%y, self%z])