diff --git a/docs/source/usersguide/troubleshoot.rst b/docs/source/usersguide/troubleshoot.rst index a13272aa65..ba7e4405cc 100644 --- a/docs/source/usersguide/troubleshoot.rst +++ b/docs/source/usersguide/troubleshoot.rst @@ -79,6 +79,14 @@ with the :envvar:`CROSS_SECTIONS` environment variable. It is recommended to add a line in your ``.profile`` or ``.bash_profile`` setting the :envvar:`CROSS_SECTIONS` environment variable. +ERROR: Invalid usage of L(I) in ACE data; Consider using more recent data set. +****************************************************************************** + +The cross-sections requested in ``materials.xml`` do not conform to the current +standard format. This typically happens with fissionable nuclides in a ``.6*c`` +library as distributed with MCNP. Please try a newer library such as any from +the ``.7*c`` set. + Geometry Debugging ****************** @@ -107,8 +115,8 @@ have many particles travelling through them there will not be many locations where overlaps are checked for in that region. The user should refer to the output after a geometry debug run to see how many checks were performed in each cell, and then adjust the number of starting particles or starting source -distributions accordingly to achieve good coverage. - +distributions accordingly to achieve good coverage. + ERROR: After particle __ crossed surface __ it could not be located in any cell and it did not leak. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/ace.F90 b/src/ace.F90 index aa6de5ab64..ea97c80be8 100644 --- a/src/ace.F90 +++ b/src/ace.F90 @@ -942,6 +942,7 @@ contains integer :: NEa ! number of energies for Watt 'a' integer :: NRb ! number of interpolation regions for Watt 'b' integer :: NEb ! number of energies for Watt 'b' + real(8), allocatable :: L(:) ! locations of distributions for each Ein ! initialize length length = 0 @@ -966,6 +967,22 @@ contains ! Continuous tabular distribution NR = int(XSS(lc + 1)) NE = int(XSS(lc + 2 + 2*NR)) + ! Before progressing, check to see if data set uses L(I) values + ! in a way inconsistent with the current form of the ACE Format Guide + ! (MCNP5 Manual, Vol 3) + allocate(L(NE)) + L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1)) + do i = 1,NE + ! Now check to see if L(i) is equal to any other entries + ! If so, then we must exit + if (count(L == L(i)) > 1) then + message = "Invalid usage of L(I) in ACE data; & + &Consider using more recent data set." + call fatal_error() + end if + end do + deallocate(L) + ! Continue with finding data length length = length + 2 + 2*NR + 2*NE do i = 1,NE ! determine length @@ -1008,6 +1025,22 @@ contains ! Kalbach-Mann correlated scattering NR = int(XSS(lc + 1)) NE = int(XSS(lc + 2 + 2*NR)) + ! Before progressing, check to see if data set uses L(I) values + ! in a way inconsistent with the current form of the ACE Format Guide + ! (MCNP5 Manual, Vol 3) + allocate(L(NE)) + L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1)) + do i = 1,NE + ! Now check to see if L(i) is equal to any other entries + ! If so, then we must exit + if (count(L == L(i)) > 1) then + message = "Invalid usage of L(I) in ACE data; & + &Consider using more recent data set." + call fatal_error() + end if + end do + deallocate(L) + ! Continue with finding data length length = length + 2 + 2*NR + 2*NE do i = 1,NE NP = int(XSS(lc + length + 2)) @@ -1022,6 +1055,22 @@ contains ! Correlated energy and angle distribution NR = int(XSS(lc + 1)) NE = int(XSS(lc + 2 + 2*NR)) + ! Before progressing, check to see if data set uses L(I) values + ! in a way inconsistent with the current form of the ACE Format Guide + ! (MCNP5 Manual, Vol 3) + allocate(L(NE)) + L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1)) + do i = 1,NE + ! Now check to see if L(i) is equal to any other entries + ! If so, then we must exit + if (count(L == L(i)) > 1) then + message = "Invalid usage of L(I) in ACE data; & + &Consider using more recent data set." + call fatal_error() + end if + end do + deallocate(L) + ! Continue with finding data length length = length + 2 + 2*NR + 2*NE do i = 1,NE ! outgoing energy distribution @@ -1054,6 +1103,22 @@ contains ! Laboratory energy-angle law NR = int(XSS(lc + 1)) NE = int(XSS(lc + 2 + 2*NR)) + ! Before progressing, check to see if data set uses L(I) values + ! in a way inconsistent with the current form of the ACE Format Guide + ! (MCNP5 Manual, Vol 3) + allocate(L(NE)) + L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1)) + do i = 1,NE + ! Now check to see if L(i) is equal to any other entries + ! If so, then we must exit + if (count(L == L(i)) > 1) then + message = "Invalid usage of L(I) in ACE data; & + &Consider using more recent data set." + call fatal_error() + end if + end do + deallocate(L) + ! Continue with finding data length NMU = int(XSS(lc + 4 + 2*NR + 2*NE)) length = 4 + 2*(NR + NE + NMU)