mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Resolving some duplicate code from the rebase.
This commit is contained in:
parent
3f2fc67d0b
commit
8e5f424ae1
4 changed files with 4 additions and 19 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
module cad_header
|
||||
|
||||
use, intrinsic :: ISO_C_BINDING
|
||||
use hdf5
|
||||
|
||||
implicit none
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue