From 7f8a2acbf27074479a285e4c20ef6e2611c16a27 Mon Sep 17 00:00:00 2001 From: April Novak Date: Mon, 7 Aug 2017 12:55:27 -0500 Subject: [PATCH] Corrected material_index to account for the fact that the indices are changed in the adjust_indices routine. Refs #908 --- src/api.F90 | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/api.F90 b/src/api.F90 index d45360d284..23aa405873 100644 --- a/src/api.F90 +++ b/src/api.F90 @@ -100,7 +100,6 @@ contains integer(C_INT) :: err ! error code integer :: j ! looping variable integer :: n ! number of cell instances - integer :: material_ID ! material associated with cell integer :: material_index ! material index in materials array integer :: num_nuclides ! num nuclides in material integer :: nuclide_index ! index of nuclide in nuclides array @@ -121,16 +120,14 @@ contains if (cells(index) % fill /= NONE) then err = E_CELL_NO_MATERIAL else - ! find which material is associated with this cell + ! find which material is associated with this cell (material_index + ! is the index into the materials array) if (present(instance)) then - material_ID = cells(index) % material(instance) + material_index = cells(index) % material(instance) else - material_ID = cells(index) % material(1) + material_index = cells(index) % material(1) end if - ! index of that material into the materials array - material_index = material_dict % get_key(material_ID) - ! number of nuclides associated with this material num_nuclides = size(materials(material_index) % nuclide)