Skip to content

Commit

Permalink
Fixed bug that allowed the landing distance to be negative
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Dec 6, 2016
1 parent 2a23de7 commit fc155b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ejecta/ejecta_emplace.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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) )
Expand Down

0 comments on commit fc155b4

Please sign in to comment.