Skip to content

Commit

Permalink
Fixed issue that caused exception with debug flags when ri = 0 (not s…
Browse files Browse the repository at this point in the history
…ure if ri is even supposed to be 0 though..)
  • Loading branch information
Austin Michael Blevins committed Jan 26, 2023
1 parent d01d308 commit efd00f5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/regolith/regolith_traverse_streamtube.f90
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ subroutine regolith_traverse_streamtube(user,surfi,deltar,ri,rip1,eradi,erado,ne

erad = (eradi + erado)/2.0
rzmax = erad * sqrt(3.0)/4.0
cosi = regolith_quartic_func(ri,erad)
if (ri .eq. 0) then
cosi = 0.0_DP
else
cosi = regolith_quartic_func(ri,erad)
end if
zri = erad * (1.0 - cosi) * cosi
coso = regolith_quartic_func(rip1,erad)
zrip1 = erad * (1.0 - coso) * coso
Expand Down

0 comments on commit efd00f5

Please sign in to comment.