From 790682df2f3da246ed715ec44c237010fac42e8d Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 8 May 2017 17:15:46 -0500 Subject: [PATCH] Fix assignment of S(a,b) tables --- src/input_xml.F90 | 7 +++++-- tests/test_salphabeta/results_true.dat | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/input_xml.F90 b/src/input_xml.F90 index a5c894d10..fdf849454 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -5038,6 +5038,7 @@ contains integer :: m ! position for sorting integer :: temp_nuclide ! temporary value for sorting integer :: temp_table ! temporary value for sorting + logical :: found type(VectorInt) :: i_sab_tables type(VectorInt) :: i_sab_nuclides @@ -5051,17 +5052,19 @@ contains ! In order to know which nuclide the S(a,b) table applies to, we need ! to search through the list of nuclides for one which has a matching ! name + found = .false. associate (sab => sab_tables(mat % i_sab_tables(k))) FIND_NUCLIDE: do j = 1, size(mat % nuclide) if (any(sab % nuclides == nuclides(mat % nuclide(j)) % name)) then - call i_sab_tables % push_back(k) + call i_sab_tables % push_back(mat % i_sab_tables(k)) call i_sab_nuclides % push_back(j) + found = .true. end if end do FIND_NUCLIDE end associate ! Check to make sure S(a,b) table matched a nuclide - if (find(i_sab_tables, k) == -1) then + if (.not. found) then call fatal_error("S(a,b) table " // trim(mat % & sab_names(k)) // " did not match any nuclide on material " & // trim(to_str(mat % id))) diff --git a/tests/test_salphabeta/results_true.dat b/tests/test_salphabeta/results_true.dat index 378888998..bdfb98990 100644 --- a/tests/test_salphabeta/results_true.dat +++ b/tests/test_salphabeta/results_true.dat @@ -1,2 +1,2 @@ k-combined: -8.465448E-01 5.743842E-03 +8.544160E-01 1.274133E-02