Skip to content

Commit

Permalink
FIxed issue that happens when a crater isn't big enough to affect the…
Browse files Browse the repository at this point in the history
… surface
  • Loading branch information
daminton committed Dec 14, 2022
1 parent a6249f2 commit 88dd83b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/crater/crater_populate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ subroutine crater_populate(user,surf,crater,domain,prod,production_list,vdist,nt

! Place crater onto the surface
call crater_emplace(user,surf,crater,domain,ejbmass)
if (abs(ejbmass) < 2*tiny(1.0_DP)) cycle

call ejecta_distance_estimate(user,crater,domain,crater%ejdis) ! Fast but imprecise estimate of the total ejecta distance
! For very steep size distributions, only a fraction of the
Expand Down
1 change: 1 addition & 0 deletions src/ejecta/ejecta_emplace.f90
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ subroutine ejecta_emplace(user,surf,crater,domain,ejb,ejtble,deltaMtot,age,age_r
fmasscons = (-deltaMtot)/ ejbmass
cumulative_elchange = cumulative_elchange * fmasscons
crater%ejrim = crater%ejrim * fmasscons
if (abs(fmasscons) < tiny(1.0_DP)) return
ejb(:)%thick = ejb(:)%thick + log(fmasscons)
maxhits = 1
! Create box for soften calculation (will be no bigger than the grid itself)
Expand Down

0 comments on commit 88dd83b

Please sign in to comment.