From 7e0b79a33c0bc835a7ebe8c4c6867d842a98f45e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 14 Apr 2015 11:43:31 +0000 Subject: [PATCH] also using isNaN function --- code/lattice.f90 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/code/lattice.f90 b/code/lattice.f90 index bd5893bc9..9b2555071 100644 --- a/code/lattice.f90 +++ b/code/lattice.f90 @@ -1688,16 +1688,18 @@ pure function lattice_symmetrize33(struct,T33) !> @brief figures whether unit quat falls into stereographic standard triangle !-------------------------------------------------------------------------------------------------- logical pure function lattice_qInSST(Q, struct) + use prec, only: & + prec_isNaN use math, only: & math_qToRodrig implicit none - real(pReal), dimension(4), intent(in) :: Q ! orientation - integer(kind(LATTICE_undefined_ID)), intent(in) :: struct ! lattice structure - real(pReal), dimension(3) :: Rodrig ! Rodrigues vector of Q + real(pReal), dimension(4), intent(in) :: Q ! orientation + integer(kind(LATTICE_undefined_ID)), intent(in) :: struct ! lattice structure + real(pReal), dimension(3) :: Rodrig ! Rodrigues vector of Q Rodrig = math_qToRodrig(Q) - if (any(Rodrig/=Rodrig)) then + if (any(prec_isNaN(Rodrig))) then lattice_qInSST = .false. else select case (struct)