From e8ab495a6c004b61ac8f816d4b748ec7f4cb9a6f Mon Sep 17 00:00:00 2001 From: Claudio Zambaldi Date: Mon, 19 Apr 2010 13:40:22 +0000 Subject: [PATCH] Introduced new parameter NaN, not a number. It should be assigned for invalid results, such as currently for misorientation of unknown crystal symmetry. --- code/math.f90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/math.f90 b/code/math.f90 index c83f430ec..fb6ddf52c 100644 --- a/code/math.f90 +++ b/code/math.f90 @@ -10,6 +10,7 @@ real(pReal), parameter :: pi = 3.14159265358979323846264338327950288419716939937510_pReal real(pReal), parameter :: inDeg = 180.0_pReal/pi real(pReal), parameter :: inRad = pi/180.0_pReal + real(pReal), parameter :: NaN = 0.0_pReal/0.0_pReal ! Not a number ! *** 3x3 Identity *** real(pReal), dimension(3,3), parameter :: math_I3 = & reshape( (/ & @@ -171,7 +172,8 @@ subroutine math_misorientation(dQ, Q1, Q2, symmetryType) dQ = 0.0_pReal if (symmetryType < 1_pInt .or. symmetryType > 2_pInt) then - call IO_warning(700) + dQ=NaN + !call IO_warning(700) return endif