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

Allow units up to 999 to support processing of ENDF/B-VIII.1 light water TSL evaluation #356

Merged
merged 3 commits into from
Jan 23, 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
6 changes: 5 additions & 1 deletion ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# 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.77
## NJOY2016.78
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.

## [NJOY2016.77](https://github.com/njoy/NJOY2016/pull/347)
This update fixes the following issues:
- Background cross section values for reactions other than total, elastic, fission and capture were not handled properly in the unresolved resonance region. The background for total, elastic, fission and capture is integrated into the unresolved resonance cross section values in the genunr subroutine. In the emerge subroutine, the background in the unresolved resonance region was therefore zeroed out for any resonance reaction. This has never been an issue but now we have LRF=7 evaluations that can define reactions other than total, elastic, fission and capture. Test 82 was added to detect this issue in the future.
- Increased the size of internal arrays in VIEWR.
Expand Down
8 changes: 4 additions & 4 deletions src/util.f90
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,14 @@ subroutine openz(lun,new)
integer::lun,new
! internals
integer::nun
character::for*15,age*7,fn*6
character::for*15,age*7,fn*7
logical::there

nun=iabs(lun)
if ((nun.ge.5.and.nun.le.7).or.nun.eq.0) return
if (nun.gt.99) call error('openz','illegal unit number.',' ')
if (nun.gt.999) call error('openz','illegal unit number.',' ')
! construct file name
write(fn,'(''tape'',i2)') nun
write(fn,'(''tape'',i0)') nun
! set format based on sign of unit number
for='formatted'
if (lun.lt.0) for='unformatted'
Expand Down Expand Up @@ -227,7 +227,7 @@ subroutine closz(lun)

nun=iabs(lun)
if (nun.lt.10) return
if (nun.gt.99) call error('closz','illegal unit number.',' ')
if (nun.gt.999) call error('closz','illegal unit number.',' ')
close(nun)
return
end subroutine closz
Expand Down
12 changes: 12 additions & 0 deletions tests/84/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}/referenceTape100"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape100" COPYONLY )

configure_file("${RESOURCES}/n-001_H_002-ENDF8.0.endf"
"${CMAKE_CURRENT_BINARY_DIR}/tape20" COPYONLY )

add_test( NAME "Test84"
COMMAND ${Python3_EXECUTABLE} "../execute.py"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
8 changes: 8 additions & 0 deletions tests/84/input
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- read tape20 and reconstruct
reconr
20 100
'reconstructed data' /
128 /
0.001 /
0 /
stop
1,115 changes: 1,115 additions & 0 deletions tests/84/referenceTape100

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 @@ -85,3 +85,4 @@ add_subdirectory( "80" )
add_subdirectory( "81" )
add_subdirectory( "82" )
add_subdirectory( "83" )
add_subdirectory( "84" )
2 changes: 1 addition & 1 deletion tests/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def writeDiff(diff_file, refLine, trialLine, lineNumber):
exit(child.poll())

for reference_tape in reference_tapes:
trial_tape = 'tape' + reference_tape[-2:]
trial_tape = 'tape' + reference_tape[13:]
if not filecmp.cmp(reference_tape, trial_tape):
with open(reference_tape, 'r') as reference_file, \
open(trial_tape, 'r') as trial_file, \
Expand Down