Skip to content

Commit

Permalink
Added check to make sure that sin and cos terms were within the corre…
Browse files Browse the repository at this point in the history
…ct bounds
  • Loading branch information
daminton committed Jul 14, 2022
1 parent 29e4b76 commit 7b427f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/regolith/regolith_melt_glass.f90
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ subroutine regolith_melt_glass(user,crater,age,age_resolution,ebh,rm,eradc,lrad,
newlayer%thickness = ebh ! default value: stream tube's volume = paraboloid shell's volume
newlayer%comp = 0.0_DP
rints = sqrt(rm**2 - (crater%imp/2.0)**2)
cosvints = eradi / (crater%imp + eradi)
cosvints = min(max(eradi / (crater%imp + eradi), -1.0_DP), 1.0_DP)
sinvints = sqrt(1.0 - cosvints**2)
xvints = eradi * ( 1.0 - cosvints) * sinvints
volv1 = regolith_streamtube_volume_func(eradi,0.0_DP,xvints,deltar)
Expand Down

0 comments on commit 7b427f6

Please sign in to comment.