Resolving some duplicate code from the rebase.

This commit is contained in:
shriwise 2018-05-16 13:40:03 -05:00 committed by pshriwise
parent 3f2fc67d0b
commit 8e5f424ae1
4 changed files with 4 additions and 19 deletions

View file

@ -24,7 +24,7 @@ void load_cad_geometry_c()
c.id = DAGMC->id_by_index(3, i);
c.dagmc_ptr = DAGMC;
c.universe = 0; // set to zero for now
openmc::cells_c.push_back(c);
openmc::cells_c.push_back(&c);
openmc::cell_dict[c.id] = i;
}

View file

@ -1,7 +1,6 @@
module cad_header
use, intrinsic :: ISO_C_BINDING
use hdf5
implicit none

View file

@ -22,10 +22,6 @@ extern "C" {int32_t n_cells {0};}
namespace openmc {
std::vector<Cell> cells_c;
std::map<int,int> cell_dict;
//==============================================================================
// Global variables
//==============================================================================

View file

@ -422,7 +422,7 @@ contains
! ==========================================================================
! SETUP UNIVERSES
! Allocate universes, universe cell arrays, and assign base universe
allocate(universes(n_universes))
do i = 1, n_universes
@ -433,20 +433,10 @@ contains
n_cells_in_univ = cells_in_univ_dict % get(u % id)
allocate(u % cells(n_cells_in_univ))
u % cells(:) = 0
! Check whether universe is a fill universe
if (find(fill_univ_ids, u % id) == -1) then
if (root_universe > 0) then
call fatal_error("Two or more universes are not used as fill &
&universes, so it is not possible to distinguish which one &
&is the root universe.")
else
root_universe = i
end if
end if
end associate
end do
root_universe = find_root_universe() + 1
do i = 1, n_cells
! Get index in universes array
j = universe_dict % get(cells(i) % universe())