Skip to content

Commit

Permalink
Fixed bug in crater slope collapse routine
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Dec 6, 2016
1 parent d97c906 commit 2a23de7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/crater/crater_critical_slope.f90
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ function crater_critical_slope(user,crater,iradsq) result(critical)
if (r < 0.2_DP) then
critical = 0.0_DP
else if (r < 0.98_DP) then
critical = 0.228_DP + 2 * 0.083_DP * r - 3 * 0.039_DP * r**2
else if (r < 1.5_DP) then
critical = 0.187_DP - 2 * 0.018_DP * r - 3 * 0.015_DP * r**2
critical = abs(0.228_DP + 2 * 0.083_DP * r - 3 * 0.039_DP * r**2)
else
critical = CRITSLP
critical = max(abs(0.187_DP - 2 * 0.018_DP * r - 3 * 0.015_DP * r**2),CRITSLP)
end if

end function crater_critical_slope
Expand Down
2 changes: 1 addition & 1 deletion src/crater/crater_slope_collapse.f90
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ subroutine crater_slope_collapse(user,surf,crater,domain)

! Some preliminary setup
diffmax = 0.25_DP
looplim = 1000*crater%fcratpx
looplim = 1000 * crater%fcratpx

! determine area to effect
inc = max(min(crater%fcratpx,ceiling(SQRT2*user%gridsize)),1)
Expand Down

0 comments on commit 2a23de7

Please sign in to comment.