From 98f677916ccb1f87eb73c0ec47faa5049a4cd82f Mon Sep 17 00:00:00 2001 From: Franz Roters Date: Wed, 15 Jan 2014 08:32:43 +0000 Subject: [PATCH] =?UTF-8?q?fixed=20crash=20in=20RtoEuler=20for=20PHI=3D180?= =?UTF-8?q?=C2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/math.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/math.f90 b/code/math.f90 index a31fd57da..18e31f1f0 100644 --- a/code/math.f90 +++ b/code/math.f90 @@ -1418,7 +1418,7 @@ pure function math_RtoEuler(R) math_RtoEuler(2) = acos(myVal) - if(math_RtoEuler(2) < 1.0e-8_pReal) then + if((math_RtoEuler(2) < 1.0e-8_pReal) .or. (pi-math_RtoEuler(2) < 1.0e-8_pReal)) then ! calculate phi2 math_RtoEuler(3) = 0.0_pReal ! calculate phi1