Skip to content

Commit

Permalink
guard against a division by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
whaeck committed Oct 9, 2023
1 parent 707909c commit 678260b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aceth.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2039,7 +2039,7 @@ subroutine tplots(nout,hk)
if (k.eq.nang.and.un-u.gt.5*(u-ul)) un=u+3*(u-ul)
p=1
p=p/nang
p=p/(un-ul)
if (un.ne.ul) p=p/(un-ul)
ul=un
enddo
endif
Expand Down Expand Up @@ -2083,7 +2083,7 @@ subroutine tplots(nout,hk)
if (k.eq.nang.and.un-u.gt.5*(u-ul)) un=u+3*(u-ul)
p=1
p=p/nang
p=p/(un-ul)
if (un.ne.ul) p=p/(un-ul)
if (k.eq.1) write(nout,'(1p,2e14.6,''/'')') ul,zmin
write(nout,'(1p,2e14.6,''/'')') u,p
if (k.eq.nang) write(nout,'(1p,2e14.6,''/'')') un,zmin
Expand Down

0 comments on commit 678260b

Please sign in to comment.