diff --git a/src/input_xml.F90 b/src/input_xml.F90 index 695eee02a8..eef112b3a5 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -389,14 +389,14 @@ contains c => cells(i) ! additional metadata spoofing univ_id = c % universe() - + if (.not. cells_in_univ_dict % has(univ_id)) then - n_universes = n_universes + 1 - n_cells_in_univ = 1 - call universe_dict % set(univ_id, n_universes) - call univ_ids % push_back(univ_id) + n_universes = n_universes + 1 + n_cells_in_univ = 1 + call universe_dict % set(univ_id, n_universes) + call univ_ids % push_back(univ_id) else - n_cells_in_univ = 1 + cells_in_univ_dict % get(univ_id) + n_cells_in_univ = 1 + cells_in_univ_dict % get(univ_id) end if call cells_in_univ_dict % set(univ_id, n_cells_in_univ) end do diff --git a/src/tracking.F90 b/src/tracking.F90 index ceee0b9193..84ab56cf67 100644 --- a/src/tracking.F90 +++ b/src/tracking.F90 @@ -319,7 +319,7 @@ contains class(Surface), pointer :: surf class(Surface), pointer :: surf2 ! periodic partner surface - + i_surface = abs(p % surface) surf => surfaces(i_surface) if (verbosity >= 10 .or. trace) then @@ -475,16 +475,16 @@ contains #ifdef CAD if (dagmc) then - i_cell = next_cell(cells(p % last_cell(1) + 1), surfaces(ABS(p % surface))) - ! save material and temp - p % last_material = p % material - p % last_sqrtkT = p % sqrtKT - ! set new cell value - p % coord(1) % cell = i_cell-1 ! decrement for C++ indexing - p % cell_instance = 1 - p % material = cells(i_cell) % material(1) - p % sqrtKT = cells(i_cell) % sqrtKT(1) - return + i_cell = next_cell(cells(p % last_cell(1) + 1), surfaces(ABS(p % surface))) + ! save material and temp + p % last_material = p % material + p % last_sqrtkT = p % sqrtKT + ! set new cell value + p % coord(1) % cell = i_cell-1 ! decrement for C++ indexing + p % cell_instance = 1 + p % material = cells(i_cell) % material(1) + p % sqrtKT = cells(i_cell) % sqrtKT(1) + return end if #endif