Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NJOY2016.73 #321

Merged
merged 40 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ebbd426
Increasing the size of an internal leapr array
whaeck Oct 5, 2023
fc4b056
Making a change as indicated by Dan Roubtsov
whaeck Oct 9, 2023
4ba4093
Updating release notes and version
whaeck Oct 9, 2023
ca8da4f
Updating ...
whaeck Oct 9, 2023
b98ebc7
Updating release notes
whaeck Oct 9, 2023
707909c
Remove an unused variable in thermr
whaeck Oct 9, 2023
678260b
guard against a division by zero
whaeck Oct 9, 2023
8d5e6a9
Saving work
whaeck Oct 10, 2023
b55d4ec
Fixing an issue in acer thermal scattering plots
whaeck Oct 10, 2023
43634ac
Updating test results
whaeck Oct 10, 2023
b7ba1e6
Fixing another issue in leapr due to delta being too low
whaeck Oct 11, 2023
423926a
Editing spacing
whaeck Oct 11, 2023
c06704b
Merge branch 'fix/acer-plots' into fix/leapr-segfault
whaeck Oct 12, 2023
f04210b
Updating release notes
whaeck Oct 12, 2023
b60ae79
Adding test 80
whaeck Oct 12, 2023
1ad7ab3
Replace the if statement with a do while
whaeck Oct 12, 2023
0f472cf
Updating
whaeck Oct 12, 2023
6db4a88
Merge pull request #314 from njoy/fix/acer-plots
whaeck Oct 16, 2023
fb2ca6f
Merge pull request #315 from njoy/fix/leapr-segfault
whaeck Oct 16, 2023
648f69b
Merge pull request #316 from njoy/fix/intel
whaeck Oct 16, 2023
d9ea99f
Make hard coded array maxt allocatable based on nbeta.
HunterBelanger Oct 16, 2023
da70d8b
Ups hard coded size of scr in leapr to 10k.
HunterBelanger Oct 16, 2023
766e2b1
Updates mscr for any general nalpha.
HunterBelanger Oct 17, 2023
e96a5f7
Update comment on mscr.
HunterBelanger Oct 17, 2023
4fed055
Fix bug when processing material with coherent elastic scattering.
HunterBelanger Oct 17, 2023
943c2fe
Merge remote-tracking branch 'origin/develop' into fix/leapr_array
HunterBelanger Oct 19, 2023
19994ab
Fix bug to have enough space for MF1 comment cards in leapr scratch.
HunterBelanger Oct 19, 2023
537b8b0
Adding the necessary logic to read background rmatrix elements
whaeck Oct 25, 2023
e57f653
Implementing the sammy background rmatrix
whaeck Oct 26, 2023
1273464
Adding the other background options, adding a few error messages
whaeck Oct 26, 2023
65ac20f
Adding test 81
whaeck Oct 26, 2023
858fbea
Making the changes for the partial derivatives using the Sammy backgr…
whaeck Oct 26, 2023
50d4205
Adding a missing test file
whaeck Oct 26, 2023
72c3e46
Updating release notes
whaeck Oct 26, 2023
1668e55
Merge pull request #317 from HunterBelanger/fix/leapr_array
whaeck Oct 26, 2023
58422a8
Updating test file and test results
whaeck Oct 27, 2023
11dbf95
Merge pull request #320 from njoy/fix/leapr_array
whaeck Oct 30, 2023
3354993
Merge pull request #319 from njoy/feature/kbk
whaeck Oct 31, 2023
83499e5
Setting release date
whaeck Nov 3, 2023
3b263d5
Update release notes
whaeck Nov 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Release Notes—NJOY2016
Given here are some release notes for NJOY2016. Each release is made through a formal [Pull Request](https://github.com/njoy/NJOY2016/pulls) made on GitHub. There are links in this document that point to each of those Pull Requests, where you can see in great details the changes that were made. Often the Pull Requests are made in response to an [issue](https://github.com/njoy/NJOY2016/issues). In such cases, links to those issues are also given.

## [NJOY2016.73](https://github.com/njoy/NJOY2016/pull/321)
This update fixes the following issues:
- Fix an issue in ACER for thermal scattering leading to energy values being out of order when plotting the coherent elastic scattering cross section (this issue only affects plots, the thermal scattering ACE files do not change).
- Increased allocation of an array in LEAPR to accommodate ENDF/B-VIII.1 thermal scattering evaluations and added a check to avoid an infinite loop when using a very fine beta grid. In addition, LEAPR will now warn the user about potential excessive calculation times and print out progression in the phonon expansion sum when the phonon expansion order is large.
- Added logic to MODER to read background R-matrix element information from LRF=7 resonance parameter data.
- Updated RECONR to use background R-matrix element information from LRF=7 and added test 81 using ENDF/B-VIII.1 Sr88.
- Fixing a few thing related to intel compiler warnings and errors.

## [NJOY2016.72](https://github.com/njoy/NJOY2016/pull/308)
This update fixes the following issues:
- Fixed an issue in GROUPR related to an error coming up in production matrix calculations. Depending on when a user asks for a production matrix associated to a reaction, it is possible that the reference frame of the previous reaction is used instead (caused by erronously defining an already declared global variable as local with a "save" attribute). In some circumstances, this causes NJOY2016 to error out (with a message related to unsupported reference frames). No test results had to be updated due to this change.
Expand Down
12 changes: 6 additions & 6 deletions src/aceth.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ subroutine tplots(nout,hk)
endif
write(nout,'(''0/'')')
if (idpnc.eq.4.or.idpnc.eq.5) then
e=xss(itce+1)-xss(itce+1)/1000
e=xss(itce+1)
xs=xss(itce+nee+1)/e
xs=xs/100
write(nout,'(1p,2e14.6,''/'')') e,xs
Expand All @@ -1220,7 +1220,7 @@ subroutine tplots(nout,hk)
if (idpnc.eq.4.or.idpnc.eq.5) xs=xs/e
write(nout,'(1p,2e14.6,''/'')') e,xs
if ((idpnc.eq.4.or.idpnc.eq.5).and.i.lt.nee) then
e=xss(itce+i+1)-xss(itce+i+1)/1000
e=xss(itce+i+1)
xs=xss(itce+nee+i)/e
write(nout,'(1p,2e14.6,''/'')') e,xs
endif
Expand Down Expand Up @@ -1280,7 +1280,7 @@ subroutine tplots(nout,hk)
endif
enddo
if (idpnc.eq.4.or.idpnc.eq.5) then
e=xss(itce+1)-xss(itce+1)/1000
e=xss(itce+1)
j=0
do while (j.lt.nie)
j=j+1
Expand Down Expand Up @@ -1333,7 +1333,7 @@ subroutine tplots(nout,hk)
tot=xs+xn+xielas
write(nout,'(1p,2e14.6,''/'')') e,tot
if (i.lt.nee.and.(idpnc.eq.4.or.idpnc.eq.5)) then
e=xss(itce+i+1)-xss(itce+i+1)/1000
e=xss(itce+i+1)
xs=xss(itce+nee+i)/e
j=0
do while (j.lt.nie)
Expand Down 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
2 changes: 1 addition & 1 deletion src/groupr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7444,7 +7444,7 @@ subroutine getmf6(ans,ed,enext,idisc,yld,eg,ng,nl,iglo,ng2,nq,&
real(kr)::zad,elo,ehi,apsx,enow,eihi,ep,epnext,en
real(kr)::pspmax,yldd,el,eh,e0,g0,e1,e2,test,pe,disc102
real(kr)::val,fx,ex,cx,cxx,rn,dx
integer(kr)::nx,ncyc,n,ix
integer::nx,ncyc,n,ix
integer,parameter::mxlg=65
real(kr)::term(mxlg),terml(mxlg)
integer,parameter::maxss=500
Expand Down
59 changes: 49 additions & 10 deletions src/leapr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ module leapm
real(kr),dimension(:),allocatable::dwpix,dwp1
real(kr),dimension(:),allocatable::tempf,tempf1

! min phonon expansion for time warning message
integer,parameter,public::maxnphon=250

contains

subroutine leapr
Expand Down Expand Up @@ -220,6 +223,7 @@ subroutine leapr
integer::isym,mscr,maxb,isecs
real(kr)::time
character(4)::title(20)
character(60)::strng
real(kr)::temp,emax
character::text*80
real(kr),dimension(:),allocatable::bragg
Expand Down Expand Up @@ -294,6 +298,12 @@ subroutine leapr
read(nsysi,*) (alpha(i),i=1,nalpha)
read(nsysi,*) (beta(i),i=1,nbeta)

! warn for excessive computation time
if (nphon.gt.maxnphon) then
write(strng,'('' phonon expansion order is larger than '',i3)') maxnphon
call mess('leapr',strng,'calculation time may be excessive')
endif

!--open the output unit
call openz(nout,1)

Expand Down Expand Up @@ -373,11 +383,11 @@ subroutine leapr
if (nd.gt.0) call discre(itemp)

!--check for special hydrogen and deuterium options
if (ncold.gt.0) call coldh(itemp,temp)
if (ncold.gt.0) call coldh(itemp,temp)

!--check for skold option for correlations
if ((nsk.eq.2) .and. (ncold.eq.0))&
call skold(itemp,temp,ssm,nalpha,nbeta,ntempr)
if ((nsk.eq.2) .and. (ncold.eq.0))&
call skold(itemp,temp,ssm,nalpha,nbeta,ntempr)

!--continue temperature loop
enddo
Expand Down Expand Up @@ -413,7 +423,13 @@ subroutine leapr
isym=0
if (ncold.ne.0) isym=1
if (isabt.eq.1) isym=isym+2
mscr=4000

! Based on endout, to write the actual TSL data, the max number of entries
! needed in scr is either 8+2*nalpha, or 8+2*nedge. However, we have no way
! of knowing how many comment lines were added to the leaper input. The
! previous hard coded limit of 4000 is also used as a possible max as this
! has apparently been sufficient to hold all comments in the past.
mscr = max(8 + 2*nalpha, 8 + 2*nedge, 4000)
allocate(scr(mscr))
call endout(ntempr,bragg,nedge,maxb,scr,mscr,isym,ilog)

Expand Down Expand Up @@ -445,14 +461,15 @@ subroutine contin(temp,itemp,np,maxn)
!--------------------------------------------------------------------
use physics ! provides pi
use mainio ! provides nsyso
use util ! provides timer
! externals
real(kr)::temp
integer::itemp,np,maxn
! internals
integer::i,j,k,n,npn,npl,iprt,jprt
integer,dimension(1000)::maxt
integer,allocatable,dimension(:)::maxt
character(3)::tag
real(kr)::al,be,bel,ex,exx,st,add,sc,alp,alw,ssct,ckk
real(kr)::al,be,bel,ex,exx,st,add,sc,alp,alw,ssct,ckk,time
real(kr)::ff0,ff1,ff2,ff1l,ff2l,sum0,sum1
real(kr),dimension(:),allocatable::p,tlast,tnow,xa
real(kr),parameter::therm=0.0253e0_kr
Expand All @@ -468,6 +485,7 @@ subroutine contin(temp,itemp,np,maxn)
allocate(tlast(nphon*np1))
allocate(tnow(nphon*np1))
allocate(xa(nalpha))
allocate(maxt(nbeta))

!--calculate various parameters for this temperature
call start(itemp,p,np,deltab,tev)
Expand Down Expand Up @@ -498,8 +516,14 @@ subroutine contin(temp,itemp,np,maxn)
do j=1,nbeta
maxt(j)=nalpha+1
enddo
if (iprint.eq.2)&
write(nsyso,'(/'' normalization check for phonon expansion'')')
if (iprint.eq.2) then
write(nsyso,'(/'' normalization check for phonon expansion'')')
endif
if (maxn.gt.maxnphon) then
call timer(time)
write(nsyse,'(/'' performing phonon expansion sum'',&
&37x,f8.1,''s'')'),time
endif
do n=2,maxn
npn=np+npl-1
call convol(p,tlast,tnow,np,npl,npn,deltab,ckk)
Expand All @@ -525,7 +549,18 @@ subroutine contin(temp,itemp,np,maxn)
tlast(i)=tnow(i)
enddo
npl=npn
if (mod(n,maxnphon).eq.0) then
call timer(time)
write(nsyse,'(2x,i5,'' of '',i5,&
&'' loops done for phonon expansion sum'',17x,f8.1,''s'')')&
&n,maxn,time
endif
enddo
if (maxn.gt.maxnphon) then
call timer(time)
write(nsyse,'(/'' done with phonon expansion sum'',&
&38x,f8.1,''s'')'),time
endif

!--print out start of sct range for each beta
if (iprint.ne.0) then
Expand Down Expand Up @@ -865,8 +900,8 @@ subroutine trans(itemp)
if (ded.lt.delta) delta=ded
nu=1
if (iprt.eq.1.and.iprint.eq.2) write(nsyso,&
'(/'' delta d='',f12.6,5x,''delta b='',f12.6,&
&10x,''delta='',f12.6)') ded,deb,delta
'(/'' delta d='',e18.5,5x,''delta b='',e18.5,&
&10x,''delta='',e18.5)') ded,deb,delta

!--make table of s-diffusion or s-free on this interval
call stable(ap,sd,nsd,al,delta,iprt,nu,ndmax)
Expand Down Expand Up @@ -1206,6 +1241,10 @@ subroutine sbfill(sb,nbt,delta,be,s,betan,nbeta,nbe,ndmax)
else
sb(i)=0
endif
! if delta is to small for the current value of beta, increase it
do while (bet.eq.(bet+delta))
delta=delta*10
end do
bet=bet+delta
enddo
return
Expand Down
31 changes: 19 additions & 12 deletions src/moder.f90
Original file line number Diff line number Diff line change
Expand Up @@ -693,18 +693,25 @@ subroutine file2a(nin,nout,nscr,a)
call moreio(nin,nout,nscr,a,nb,nw)
enddo
if (kbk.gt.0) then
call listio(nin,nout,nscr,a,nb,nw)
lbk=n1h
if (lbk.eq.1) then
call tab1io(nin,nout,nscr,a,nb,nw)
do while (nb.ne.0)
call moreio(nin,nout,nscr,a,nb,nw)
enddo
call tab1io(nin,nout,nscr,a,nb,nw)
do while (nb.ne.0)
call moreio(nin,nout,nscr,a,nb,nw)
enddo
endif
do l=1,kbk
call contio(nin,nout,nscr,a,nb,nw)
lbk=l2h
if (lbk.eq.1) then
call tab1io(nin,nout,nscr,a,nb,nw)
do while (nb.ne.0)
call moreio(nin,nout,nscr,a,nb,nw)
enddo
call tab1io(nin,nout,nscr,a,nb,nw)
do while (nb.ne.0)
call moreio(nin,nout,nscr,a,nb,nw)
enddo
else if (lbk.eq.2.or.lbk.eq.3) then
call listio(nin,nout,nscr,a,nb,nw)
do while (nb.ne.0)
call moreio(nin,nout,nscr,a,nb,nw)
enddo
endif
enddo
endif
if (kps.eq.1)then
call listio(nin,nout,nscr,a,nb,nw)
Expand Down
Loading