From 0131e7e297c74af956396851a606834024aaf1fc Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 15 Feb 2012 16:05:34 -0500 Subject: [PATCH] Remove warning on mu outside of [-1,1). --- src/physics.F90 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/physics.F90 b/src/physics.F90 index d208e3f56b..40ca0a7901 100644 --- a/src/physics.F90 +++ b/src/physics.F90 @@ -1166,12 +1166,11 @@ contains call fatal_error() end if - if (abs(mu) > ONE) then - message = "Sampled cosine of angle outside [-1, 1)." - call warning() + ! Because of floating-point roundoff, it may be possible for mu to be + ! outside of the range [-1,1). In these cases, we just set mu to exactly + ! -1 or 1 - mu = sign(ONE,mu) - end if + if (abs(mu) > ONE) mu = sign(ONE,mu) else message = "Unknown angular distribution type: " // trim(to_str(type))