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

Fix/zero nrs #359

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Given here are some release notes for NJOY2016. Each release is made through a f
This update fixes the following issues:
- Tape numbers are now allowed to go up to 999 instead of 99 previously. This change was made to accommodate processing of the light water evaluation in ENDF/B-VIII.1 that has 94 temperatures. Test 84 was added to detect this issue in the future.
- A few updates were made related to array sizes and array allocation.
- Adding a message to signal malformed ENDF files when l-value lists for SLBW/MLBW and Reich-Moore have nrs=0 (no resonances given for this l value).

## [NJOY2016.77](https://github.com/njoy/NJOY2016/pull/347)
This update fixes the following issues:
Expand Down
22 changes: 20 additions & 2 deletions src/reconr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,7 @@ subroutine rdf2bw(nin,jnow,lrf,nro,naps,mode)
real(kr),parameter::third=.333333333e0_kr
real(kr),parameter::gxmin=1.0e-5_kr
real(kr),parameter::zero=0
character::strng*60
cwaven=sqrt(2*amassn*amu*ev)*1.e-12_kr/hbar

!--check for energy-dependent scattering radius
Expand Down Expand Up @@ -948,9 +949,17 @@ subroutine rdf2bw(nin,jnow,lrf,nro,naps,mode)
if (jj.gt.maxres) call error('rdf2bw',&
'res storage exceeded',' ')
enddo
ll=nint(res(jnow+2))
nrs=nint(res(jnow+5))
! some files are malformed and have a list record for l values without
! resonances, issue a warning and move to the next l value
if (nrs.eq.0) then
write(strng,'(''nrs=0 for SLBW/MLBW and l='',i2)') ll
call mess('rdf2bw',strng,'malformed ENDF file, check evaluation')
jnow = jnow+6
cycle
end if
ncyc=nint(res(jnow+4))/nrs
ll=nint(res(jnow+2))
qx=res(jnow+1)
lrx=nint(res(jnow+3))
if (lrx.ne.0) then
Expand Down Expand Up @@ -3216,6 +3225,7 @@ subroutine csrmat(e,sigp)
real(kr),parameter::four=4.0e0_kr
real(kr),parameter::small=3.e-4_kr
real(kr),parameter::zero=0
character::strng*60
cwaven=sqrt(2*amassn*amu*ev)*1.e-12_kr/hbar

!--doppler broadening not provided.
Expand Down Expand Up @@ -3252,9 +3262,17 @@ subroutine csrmat(e,sigp)
!--loop over l states
do l=1,nls
inowb=inow
ll=nint(res(inow+2))
nrs=nint(res(inow+5))
! some files are malformed and have a list record for l values without
! resonances, issue a warning and move to the next l value
if (nrs.eq.0) then
write(strng,'(''nrs=0 for Reich-Moore and l='',i2)') ll
call mess('csrmat',strng,'malformed ENDF file, check evaluation')
inow = inow+6
cycle
end if
ncyc=nint(res(inow+4))/nrs
ll=nint(res(inow+2))
apl=res(inow+1)
rhoc=k*ap
rho=k*ra
Expand Down
12 changes: 12 additions & 0 deletions tests/85/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/input"
"${CMAKE_CURRENT_BINARY_DIR}/input" COPYONLY )

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/referenceTape50"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape50" COPYONLY )

configure_file("${RESOURCES}/n-018_Ar_37-tendl2023.endf"
"${CMAKE_CURRENT_BINARY_DIR}/tape20" COPYONLY )

add_test( NAME "Test85"
COMMAND ${Python3_EXECUTABLE} "../execute.py"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
11 changes: 11 additions & 0 deletions tests/85/input
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
moder
20 -30
reconr
-30 -21
'reconstructed data' /
1828 /
0.001 /
0 /
moder
-21 50
stop
7,809 changes: 7,809 additions & 0 deletions tests/85/referenceTape50

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,4 @@ add_subdirectory( "81" )
add_subdirectory( "82" )
add_subdirectory( "83" )
add_subdirectory( "84" )
add_subdirectory( "85" )
Loading