From a93b56495c9b3b6e9f00c05b4e7fd76bb31e4e07 Mon Sep 17 00:00:00 2001 From: Lorenzo Figini Date: Wed, 17 Apr 2013 15:59:34 +0000 Subject: [PATCH] added check in ic_gb for the case Nx0t=Ny0t=0 --- src/gray.f | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gray.f b/src/gray.f index 20aa448..46505e2 100644 --- a/src/gray.f +++ b/src/gray.f @@ -3895,8 +3895,14 @@ c c pppx=x0t*rcixx+y0t*rcixy pppy=x0t*rcixy+y0t*rciyy - ppx=-pppx*gzt/(pppx*gxt+pppy*gyt) - ppy=-pppy*gzt/(pppx*gxt+pppy*gyt) + denpp=pppx*gxt+pppy*gyt + if (denpp.ne.0.0d0) then + ppx=-pppx*gzt/denpp + ppy=-pppy*gzt/denpp + else + ppx=0.0d0 + ppy=0.0d0 + end if c anzt=sqrt((1.0d0+gr2)/(1.0d0+ppx**2+ppy**2)) anxt=ppx*anzt