From 826f6b83c3c7f10c66d78c857ecec6e43d238074 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sun, 1 Jul 2012 10:47:35 -0400 Subject: [PATCH] Minor reorganization of read_materials_xml. --- src/input_xml.F90 | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/src/input_xml.F90 b/src/input_xml.F90 index 950a23ec06..2b56d2fd70 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -663,6 +663,9 @@ contains ! Copy material id mat % id = material_(i) % id + ! ======================================================================= + ! READ AND PARSE TAG + ! Copy value and units val = material_(i) % density % value units = material_(i) % density % units @@ -701,6 +704,9 @@ contains end select end if + ! ======================================================================= + ! READ AND PARSE TAGS + ! Check to ensure material has at least one nuclide if (.not. associated(material_(i) % nuclides)) then message = "No nuclides specified on material " // & @@ -777,7 +783,21 @@ contains end if end do - ! Read S(a,b) table information + ! Check to make sure either all atom percents or all weight percents are + ! given + if (.not. (all(mat % atom_percent > ZERO) .or. & + all(mat % atom_percent < ZERO))) then + message = "Cannot mix atom and weight percents in material " // & + to_str(mat % id) + call fatal_error() + end if + + ! Determine density if it is a sum value + if (sum_density) mat % density = sum(mat % atom_percent) + + ! ======================================================================= + ! READ AND PARSE TAG FOR S(a,b) DATA + if (size(material_(i) % sab) == 1) then ! Get pointer to S(a,b) table sab => material_(i) % sab(1) @@ -799,18 +819,6 @@ contains call fatal_error() end if - ! Check to make sure either all atom percents or all weight percents are - ! given - if (.not. (all(mat % atom_percent > ZERO) .or. & - all(mat % atom_percent < ZERO))) then - message = "Cannot mix atom and weight percents in material " // & - to_str(mat % id) - call fatal_error() - end if - - ! Determine density if it is a sum value - if (sum_density) mat % density = sum(mat % atom_percent) - ! Add material to dictionary call dict_add_key(material_dict, mat % id, i)