Skip to content

Commit

Permalink
Merge pull request #119 from njoy/fix/groupr
Browse files Browse the repository at this point in the history
Fix/groupr
  • Loading branch information
jlconlin authored Feb 21, 2019
2 parents 3602036 + 79e2705 commit 38c1573
Show file tree
Hide file tree
Showing 20 changed files with 35,687 additions and 8 deletions.
25 changes: 25 additions & 0 deletions docs/testDescription.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,28 @@ title: NJOY2016 Test Descriptions

The tests cover all possible combinations of the competition flags (no competition, only inelastic competition, only absorption competition and both) for each possible value of the LSSF flag (0 or 1). These tests are related to test 31.

## Test Problem 43-44

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/43/input)]
[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/44/input)]

Tests 43 and 44 were added to test an issue encountered when using `BROADR`. A high value of thnmax close to the upper energy value of the energy range lead to `BROADR` crashing. This appeared to happen when the actual temperature was zero (in that case, broadr will only thin the cross sections) and non zero (in which case broadr will apply broadening). Both cases needed their own fix so a specific test for each was added to detect this problem in the future.

## Test Problem 45

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/45/input)]

This test was added following an issue identified in `GASPR` concerning the charged particle production cros ssections when the original ENDF tape does not contain the summation cross section when individual levels are present. This lead to double counting of these levels. This test was added to detect this problem in the future.

## Test Problem 46

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/46/input)]

This test was added following a fix in `ERRORR`. NJOY set the number of subsections to be treated for MF34 to 1, even though the ENDF-6 format allows using more than 1 subsection in MF34. This test was added to detect this problem in the future.

## Test Problem 47

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/47/input)]

This test is added following a change in `GROUPR` for the MF6 MT18 part of the GENDF file. Versions prior to NJOY 2016.49 only gave the infinite dilute fission matrix, independent of the number of sigma0 values requested by the user. This test runs two `GROUPR` runs, one with only infinite dilute and another one with two sigma0 values (including infinite dilute). The test also contains `ERRORR` runs for MF35 covariances to verify that the `ERRORR` module still gives the same results (only infinite dilute data is used) when using either of the produced GENDF files.

21 changes: 15 additions & 6 deletions src/groupr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,9 @@ subroutine groupr
502 continue
if (mtd.eq.455) then
do i=1,ndelg
ans(i,1,1)=dntc(i)
do iz=1,nz
ans(i,iz,1)=dntc(i)
enddo
enddo
nll=ndelg
endif
Expand All @@ -716,7 +718,9 @@ subroutine groupr
do i=1,ng2
j=i
if (mtd.eq.455) j=i+1
ans(il,1,j)=ff(il,i)
do iz=1,nz
ans(il,iz,j)=ff(il,i)
enddo
enddo
enddo
if (mfd.eq.5) ig=ngi
Expand Down Expand Up @@ -755,8 +759,12 @@ subroutine groupr

!--accumulate production below econst, and print it
if (econst.gt.0.and.mfd.ne.5.and.ig.ne.0.and.ig.le.jconst) then
ans(1,1,2)=ans(1,1,2)/ans(1,1,1)
prod(1,1,ig)=ans(1,1,2)
do iz=1,nz
do il=1,nl
ans(il,iz,2)=ans(il,iz,2)/ans(il,iz,1)
prod(il,iz,ig)=ans(il,iz,2)
enddo
enddo
ig2lo=0
if (ig.ge.jconst) then
call displa(ig,prod,nl,nz,jconst,ig2lo,igzero,nlg,ngi)
Expand Down Expand Up @@ -3995,6 +4003,7 @@ subroutine init(ng,nl,nz)
if (mfd.eq.3.and.mtd.eq.2) nz=nsigz
if (mfd.eq.6.and.mtd.eq.2) nz=nsigz
if (mfd.eq.3.and.mtd.eq.18) nz=nsigz
if (mfd.eq.6.and.mtd.eq.18) nz=nsigz
if (mfd.eq.3.and.mtd.eq.19) nz=nsigz
if (mfd.eq.3.and.mtd.eq.51) nz=nsigz
if (mfd.eq.3.and.mtd.eq.102) nz=nsigz
Expand Down Expand Up @@ -4384,7 +4393,7 @@ subroutine displa(ig,ans,nl,nz,ng2,ig2lo,igzero,nlg,ng2g)
if (itr.eq.0) go to 310
if (nl.eq.1) go to 250

!--infinite dilution transfer matrices.
!--infinite dilution transfer matrices (iz=1).
ilo=0
ihi=ng2
do ig2=2,ng2
Expand Down Expand Up @@ -4420,7 +4429,7 @@ subroutine displa(ig,ans,nl,nz,ng2,ig2lo,igzero,nlg,ng2g)
ng2=ihi-ilo+2
return

!--isotropic infinite dilution transfer matrix.
!--isotropic infinite dilution transfer matrix (il=1,iz=1).
250 continue
ilo=0
ihi=ng2
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.48'
character(8),public::vday='18Dec18'
character(8),public::vers='2016.49'
character(8),public::vday='25Jan19'
end module version

2 changes: 2 additions & 0 deletions tests/02/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/input"

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape28"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape28" COPYONLY )
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape29"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape29" COPYONLY )

configure_file("${RESOURCES}/t404"
"${CMAKE_CURRENT_BINARY_DIR}/tape20" COPYONLY )
Expand Down
2 changes: 2 additions & 0 deletions tests/02/input
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,6 @@ ccccr
1.e5 1.e4 1000. 100. 10. 1/
moder
-24 28/
moder
-25 29/
stop
Loading

0 comments on commit 38c1573

Please sign in to comment.