Skip to content

Commit

Permalink
Fixed bad indices
Browse files Browse the repository at this point in the history
  • Loading branch information
MintoDA1 authored and MintoDA1 committed Sep 1, 2023
1 parent 2c9bb29 commit 2b3dd3e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/ejecta/ejecta_emplace.f90
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ subroutine ejecta_emplace(user,surf,crater,domain,ejb,ejtble,deltaMtot,cumulativ
if (bigej) then
kdiff(xpi,ypi) = kdiff(xpi,ypi) + areafrac * diffi * kdiffmax
else
kdiff(xpi,ypi) = areafrac * diffi * kdiffmax
kdiff(i,j) = areafrac * diffi * kdiffmax
end if

end if
Expand Down Expand Up @@ -340,8 +340,13 @@ subroutine ejecta_emplace(user,surf,crater,domain,ejb,ejtble,deltaMtot,cumulativ
lradsq = (crater%xl - xp)**2 + (crater%yl - yp)**2
lrad = sqrt(lradsq)
if (lrad < crater%ejrad) cycle

ebh = cumulative_elchange(i,j) - crater_profile(user, crater, lrad)

if (bigej) then
ebh = cumulative_elchange(xpi,ypi) - crater_profile(user, crater, lrad)
else
ebh = cumulative_elchange(i,j) - crater_profile(user, crater, lrad)
end if


if (user%doregotrack .and. ebh>1.0e-8_DP) then
call regolith_streamtube(user,surf,crater,domain,ejb,ejtble,xp,yp,xpi,ypi,lrad,ebh,rm,vsq,volm)
Expand Down

0 comments on commit 2b3dd3e

Please sign in to comment.