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

@ -30,8 +30,6 @@ module prec
integer(pInt), allocatable, dimension(:) :: realloc_lhs_test 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 type, public :: group_float !< variable length datatype used for storage of state
real(pReal), dimension(:), pointer :: p real(pReal), dimension(:), pointer :: p
end type group_float end type group_float

View File

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