Remove surface-based neighbor lists

This commit is contained in:
Sterling Harper 2018-12-18 15:06:22 -05:00
parent 35238259c0
commit e6466e9867
5 changed files with 2 additions and 49 deletions

View file

@ -32,12 +32,6 @@ extern "C" void assign_temperatures();
extern "C" int32_t find_root_universe();
//!=============================================================================
//! Build a list of neighboring cells to each surface to speed up tracking.
//!=============================================================================
extern "C" void neighbor_lists();
//==============================================================================
//! Populate all data structures needed for distribcells.
//==============================================================================

View file

@ -66,9 +66,6 @@ public:
int bc_; //!< Boundary condition
std::string name_; //!< User-defined name
std::vector<int> neighbor_pos_; //!< List of cells on positive side
std::vector<int> neighbor_neg_; //!< List of cells on negative side
explicit Surface(pugi::xml_node surf_node);
Surface();

View file

@ -53,9 +53,6 @@ module geometry
integer(C_INT), intent(out) :: next_level
end subroutine distance_to_boundary
subroutine neighbor_lists() bind(C)
end subroutine neighbor_lists
#ifdef DAGMC
function next_cell_c(current_cell, surface_crossed) &
@ -97,7 +94,7 @@ contains
if (present(use_neighbor_lists)) then
found = find_cell_c(p, logical(use_neighbor_lists, kind=C_BOOL))
else
found = find_cell_c(p, logical(.false., kind=C_BOOL))
found = find_cell_c(p, .false._C_BOOL)
end if
end subroutine find_cell

View file

@ -155,33 +155,6 @@ find_root_universe()
//==============================================================================
void
neighbor_lists()
{
write_message("Building neighboring cells lists for each surface...", 6);
for (int i = 0; i < model::cells.size(); i++) {
for (auto token : model::cells[i]->region_) {
// Skip operator tokens.
if (std::abs(token) >= OP_UNION) continue;
// This token is a surface index. Add the cell to the surface's list.
if (token > 0) {
model::surfaces[std::abs(token)-1]->neighbor_pos_.push_back(i);
} else {
model::surfaces[std::abs(token)-1]->neighbor_neg_.push_back(i);
}
}
}
for (Surface* surf : model::surfaces) {
surf->neighbor_pos_.shrink_to_fit();
surf->neighbor_neg_.shrink_to_fit();
}
}
//==============================================================================
void
prepare_distribcell()
{

View file

@ -9,7 +9,6 @@ module input_xml
use dict_header, only: DictIntInt, DictCharInt, DictEntryCI
use endf, only: reaction_name
use error, only: fatal_error, warning, write_message, openmc_err_msg
use geometry, only: neighbor_lists
use geometry_header
#ifdef DAGMC
use dagmc_header
@ -132,7 +131,7 @@ contains
call read_materials_xml()
call read_geometry_xml()
! Set up neighbor lists, convert user IDs -> indices, assign temperatures
! Convert user IDs -> indices, assign temperatures
call finalize_geometry(nuc_temps, sab_temps)
if (run_mode /= MODE_PLOTTING) then
@ -182,12 +181,6 @@ contains
call adjust_indices()
call count_cell_instances(root_universe)
! After reading input and basic geometry setup is complete, build lists of
! neighboring cells for efficient tracking
if (.not. dagmc) then
call neighbor_lists()
end if
! Assign temperatures to cells that don't have temperatures already assigned
call assign_temperatures()
@ -2297,7 +2290,6 @@ contains
logical :: file_exists ! Does multipole library exist?
character(7) :: readable ! Is multipole library readable?
character(MAX_FILE_LEN) :: filename ! Path to multipole xs library
character(kind=C_CHAR), pointer :: string(:)
integer(HID_T) :: file_id
integer(HID_T) :: group_id