From 96c4599dc791172872fcbd78958d739ec8eed76a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 10 Mar 2019 08:42:50 +0100 Subject: [PATCH] norm2 is (yet) not available in PGI --- src/plastic_nonlocal.f90 | 4 ++++ src/quaternions.f90 | 12 ++++++++++++ src/rotations.f90 | 20 ++++++++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/src/plastic_nonlocal.f90 b/src/plastic_nonlocal.f90 index 2a3b7f294..a76295fa1 100644 --- a/src/plastic_nonlocal.f90 +++ b/src/plastic_nonlocal.f90 @@ -1624,6 +1624,10 @@ use debug, only: debug_level, & debug_e #endif use math, only: math_mul3x3, & +#ifdef __PGI + norm2, & +#endif + math_mul33x3, & math_mul33xx33, & math_mul33x33, & diff --git a/src/quaternions.f90 b/src/quaternions.f90 index 39dc1d3cd..5fc35352c 100644 --- a/src/quaternions.f90 +++ b/src/quaternions.f90 @@ -354,6 +354,10 @@ end function pow_quat__ !> ToDo: Lacks any check for invalid operations !--------------------------------------------------------------------------------------------------- type(quaternion) elemental function exp__(self) +#ifdef __PGI + use math, only: & + norm2 +#endif implicit none class(quaternion), intent(in) :: self @@ -374,6 +378,10 @@ end function exp__ !> ToDo: Lacks any check for invalid operations !--------------------------------------------------------------------------------------------------- type(quaternion) elemental function log__(self) +#ifdef __PGI + use math, only: & + norm2 +#endif implicit none class(quaternion), intent(in) :: self @@ -393,6 +401,10 @@ end function log__ !> norm of a quaternion !--------------------------------------------------------------------------------------------------- real(pReal) elemental function abs__(a) +#ifdef __PGI + use math, only: & + norm2 +#endif implicit none class(quaternion), intent(in) :: a diff --git a/src/rotations.f90 b/src/rotations.f90 index 3f6778e1a..55602b557 100644 --- a/src/rotations.f90 +++ b/src/rotations.f90 @@ -157,6 +157,10 @@ end subroutine function rotVector(self,v,active) use prec, only: & dEq +#ifdef __PGI + use math, only: & + norm2 +#endif implicit none real(pReal), dimension(3) :: rotVector @@ -573,6 +577,9 @@ pure function ro2ax(ro) result(ax) use prec, only: & dEq0 use math, only: & +#ifdef __PGI + norm2, & +#endif PI implicit none @@ -662,6 +669,9 @@ pure function ro2ho(ro) result(ho) use prec, only: & dEq0 use math, only: & +#ifdef __PGI + norm2, & +#endif PI implicit none @@ -718,6 +728,10 @@ end function qu2om function om2qu(om) result(qu) use prec, only: & dEq +#ifdef __PGI + use math, only: & + norm2 +#endif implicit none real(pReal), intent(in), dimension(3,3) :: om @@ -791,6 +805,9 @@ pure function qu2ro(qu) result(ro) use prec, only: & dEq0 use math, only: & +#ifdef __PGI + norm2, & +#endif math_clip type(quaternion), intent(in) :: qu @@ -819,6 +836,9 @@ pure function qu2ho(qu) result(ho) use prec, only: & dEq0 use math, only: & +#ifdef __PGI + norm2, & +#endif math_clip implicit none