From fc155b4beb7197a7d1fbaab8a15c873268fd7789 Mon Sep 17 00:00:00 2001 From: daminton Date: Tue, 6 Dec 2016 17:36:06 +0000 Subject: [PATCH] Fixed bug that allowed the landing distance to be negative --- src/ejecta/ejecta_emplace.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ejecta/ejecta_emplace.f90 b/src/ejecta/ejecta_emplace.f90 index 754cc6e5..adab74b6 100644 --- a/src/ejecta/ejecta_emplace.f90 +++ b/src/ejecta/ejecta_emplace.f90 @@ -300,7 +300,7 @@ subroutine ejecta_emplace(user,surf,crater,domain,ejb,ejtble,ejbmass) lradsq = lrad**2 - if ((lradsq <= ejdissq) .and. (lradsq >= radsq)) then + if ((lradsq <= ejdissq) .and. (lradsq >= radsq) .and. (lrad > 0.0_DP)) then theta = atan2(j * 1._DP,i * 1._DP) + 2.0_DP * PI mag = ( ( (abs(cos(nrays * theta / 4.0_DP)))**n2 + & (abs(sin(nrays * theta / 4.0_DP)))**n2 )**(-1.0_DP/n1) )