diff --git a/src/finalize.F90 b/src/finalize.F90 index 76ae8dc9a5..8f9bb40eb3 100644 --- a/src/finalize.F90 +++ b/src/finalize.F90 @@ -27,7 +27,7 @@ contains ! show timing statistics call timer_stop(time_total) - if (master) call print_runtime() + if (master .and. (.not. plotting)) call print_runtime() #ifdef HDF5 if (master) then diff --git a/src/geometry.F90 b/src/geometry.F90 index 31b40045a2..efcfe45ac2 100644 --- a/src/geometry.F90 +++ b/src/geometry.F90 @@ -124,7 +124,9 @@ contains ! select cells based on whether we are searching a universe or a provided ! list of cells (this would be for lists of neighbor cells) if (use_search_cells) then - index_cell = search_cells(i) + index_cell = search_cells(i) + ! check to make sure search cell is in same universe + if (cells(index_cell) % universe /= p % coord % universe) cycle else index_cell = univ % cells(i) end if diff --git a/src/initialize.F90 b/src/initialize.F90 index d7791fc932..acb585c192 100644 --- a/src/initialize.F90 +++ b/src/initialize.F90 @@ -313,27 +313,27 @@ contains ! We also need to allocate the cell count lists for each universe. The logic ! for this is a little more convoluted. In universe_dict, the (key,value) ! pairs are the id of the universe and the index in the array. In - ! ucount_dict, it's the id of the universe and the number of cells. + ! cells_in_univ_dict, it's the id of the universe and the number of cells. key_list => dict_keys(universe_dict) do while (associated(key_list)) ! find index of universe in universes array - i_univ = key_list%data%value + i_univ = key_list % data % value univ => universes(i_univ) - univ % id = key_list%data%key + univ % id = key_list % data % key ! check for lowest level universe if (univ % id == 0) BASE_UNIVERSE = i_univ ! find cell count for this universe - n_cells_in_univ = dict_get_key(cells_in_univ_dict, key_list%data%key) + n_cells_in_univ = dict_get_key(cells_in_univ_dict, univ % id) ! allocate cell list for universe allocate(univ % cells(n_cells_in_univ)) univ % n_cells = n_cells_in_univ ! move to next universe - key_list => key_list%next + key_list => key_list % next end do ! Also allocate a list for keeping track of where cells have been assigned diff --git a/src/output.F90 b/src/output.F90 index 4acbf169a2..0bcd7bd579 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -6,7 +6,7 @@ module output use constants use datatypes, only: dict_get_key use endf, only: reaction_name - use geometry_header, only: Cell, Universe, Surface + use geometry_header, only: Cell, Universe, Surface, BASE_UNIVERSE use global use mesh_header, only: StructuredMesh use particle_header, only: Particle, LocalCoord @@ -260,8 +260,8 @@ contains ! Print surface if (p % surface /= NONE) then - s => surfaces(p % surface) - write(ou,*) ' Surface = ' // to_str(s % id) + s => surfaces(abs(p % surface)) + write(ou,*) ' Surface = ' // to_str(sign(s % id, p % surface)) end if write(ou,*) ' Weight = ' // to_str(p % wgt) @@ -370,6 +370,7 @@ contains integer :: unit_ character(MAX_LINE_LEN) :: string type(Cell), pointer :: c => null() + type(Universe), pointer :: base_u if (present(unit)) then unit_ = unit @@ -377,7 +378,12 @@ contains unit_ = OUTPUT_UNIT end if + base_u => universes(BASE_UNIVERSE) + write(unit_,*) 'Universe ' // to_str(univ % id) + if (associated(univ, base_u)) then + write(unit_,*) ' Base Universe' + end if write(unit_,*) ' Level = ' // to_str(univ % level) string = "" do i = 1, univ % n_cells diff --git a/src/plot.F90 b/src/plot.F90 index 77ae883c03..673e8946e8 100644 --- a/src/plot.F90 +++ b/src/plot.F90 @@ -170,7 +170,7 @@ contains ! Since boundary conditions are disabled in plotting mode, we need ! to manually add the last segment - if (surfaces(abs(surface_crossed)) % bc == BC_VACUUM) then + if (surfaces(abs(surface_crossed)) % bc /= BC_TRANSMIT) then p % coord0 % xyz(1) = last_x_coord write(UNIT=UNIT_PLOT) p % coord0 % xyz, 0 exit