Skip to content

Commit

Permalink
Merge pull request #117 from njoy/fix/unresr
Browse files Browse the repository at this point in the history
Fix/unresr
  • Loading branch information
whaeck authored Jan 23, 2019
2 parents f03b644 + d57f787 commit 3602036
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/unresr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -899,8 +899,11 @@ subroutine unresl(ee,tt,sig0,nsig0,sigbkg,sigu,arry)
real(kr),parameter::rc1=.123e0_kr
real(kr),parameter::rc2=.08e0_kr
real(kr),parameter::third=.333333333e0_kr
real(kr),parameter::zero=0
real(kr),parameter::one=1.e0_kr
real(kr),parameter::small=1.e-8_kr
logical::noissue=.true.
character(60)::strng1,strng2

cwaven=sqrt(2*amassn*amu*ev)*1.e-12_kr/hbar

Expand Down Expand Up @@ -941,6 +944,10 @@ subroutine unresl(ee,tt,sig0,nsig0,sigbkg,sigu,arry)
sigbt=sigbkg(1)+spot+sint
do is=1,nsig0
sigm(is)=sigbt+sig0(is)
if (sigm(is).lt.zero) then
call mess('unresl', 'Negative background xs in urr may cause issues',&
&'Check the evaluation')
endif
enddo
ispot=1

Expand Down Expand Up @@ -1103,6 +1110,11 @@ subroutine unresl(ee,tt,sig0,nsig0,sigbkg,sigu,arry)
sti=gg(5)/del(itp)
do is0=1,nsig0
beta=sigm(is0)/s0u
if (beta.lt.zero.and.abs(beta).lt.one.and.noissue) then
call mess('unresl','Square root of negative number detected',&
&'Probably caused by negative background xs in urr')
noissue=.false.
endif
call ajku(beta,sti,xj,xk)
if (mu.gt.0) xj=xj*qw(kf,mu)
if (mu.gt.0) xk=xk*qw(kf,mu)
Expand Down
4 changes: 2 additions & 2 deletions src/vers.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module version
! These values are updated during the NJOY revision-control process.
implicit none
private
character(8),public::vers='2016.47'
character(8),public::vday='20Nov18'
character(8),public::vers='2016.48'
character(8),public::vday='18Dec18'
end module version

0 comments on commit 3602036

Please sign in to comment.