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

Make sigz array in MATXSR allocatable like in GROUPR #274

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
13 changes: 9 additions & 4 deletions src/matxsr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,9 @@ subroutine mtxdat
character(60)::strng
integer,parameter::nbmax=2000
real(kr)::b(nbmax)
real(kr)::sigz(15)
integer::noned(15),ntwod(15)
real(k4),dimension(:),allocatable::sigz
integer(k4),dimension(:),allocatable::noned
integer(k4),dimension(:),allocatable::ntwod
character(8)::htyp
character(1)::hp
character(8),parameter::hnt='n '
Expand Down Expand Up @@ -1078,6 +1079,10 @@ subroutine mtxdat
temp=c1h
nnmat=nnmat+1
nsigz=nz
if (allocated(sigz)) deallocate(sigz)
if (allocated(noned)) deallocate(noned)
if (allocated(ntwod)) deallocate(ntwod)
allocate(sigz(nsigz),noned(nsigz),ntwod(nsigz))
do k=1,nsigz
sigz(k)=b(k+lz+ntw-1+ll)
enddo
Expand Down Expand Up @@ -2214,12 +2219,12 @@ subroutine shufl(nscr,iref,jg1lo,jg1hi,nout3,irec3,irite)
go to 145
135 do ik=1,ng2
jg2=noutg-ig2lo-ik+2
a(icdat-1+jg2)=b(irinp+lz+ik-1)
a(icdat-1+jg2)=b(irinp+lz+(ik-1)*nz+iz-1)
enddo
go to 240
140 jconst=ig
jg1=ning+1-ig
a(icdat-1+noutg+jg1)=b(irinp+lz+1)
a(icdat-1+noutg+jg1)=b(irinp+lz+nz+iz-1)
go to 240

!--store matrix sub-blocks
Expand Down
12 changes: 12 additions & 0 deletions tests/77/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}/referenceTape26"
"${CMAKE_CURRENT_BINARY_DIR}/referenceTape26" COPYONLY )

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

add_test( NAME "Test77"
COMMAND ${Python3_EXECUTABLE} "../execute.py"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
50 changes: 50 additions & 0 deletions tests/77/input
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
'moder'
20 -21
'reconr'
-21 -22
'pendf tape for U235'/
9228 3 0
.0005 /
'U 235'/
'processed by the njoy nuclear data processing system'/
'see original file for details of evaluation'/
0/
'broadr'
-21 -22 -23
9228 2 0 0 0
.0005 1.e6 /
300. 900.
0/
'unresr'
-21 -23 -24
9228 2 19 1
300. 900.
1.e+10 1.e8 1.e6 5.5e5 1.e5 6.e4 3.e4 1.e4 6.e3 3.e3 1.e3 600. 300. 100. 60. 30. 10. 1. 1.e-3
0/
'groupr'
-21 -24 0 25
9228 9 0 5 5 2 19 1 1
'U 235'/
300. 900.
1.e10 1.e8 1.e6 5.5e5 1.e5 6.e4 3.e4 1.e4 6.e3 3.e3 1.e3 600. 300. 100. 60. 30. 10. 1. 1.e-3 /
3 /
5 18 'chi ' /
5 455 'chid' /
6 /
0/
3 /
6 /
0/
0/
'matxsr'
25 0 +26/
1 'NJOY 2016 CI'/
1 1 1 1
'69 group neutron interaction library'/
'n'
69
'nscat'
1
1
'U 235' 9228 /
'stop'
Loading