From db991482813df3db5620da530d66cc6f40d568ff Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Wed, 20 May 2020 12:40:00 -0500 Subject: [PATCH] Adding early return if the cell is filled with a material. --- src/cell.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cell.cpp b/src/cell.cpp index 08476d31f..431d40b32 100644 --- a/src/cell.cpp +++ b/src/cell.cpp @@ -1180,7 +1180,10 @@ Cell::get_contained_cells() { std::unordered_map> contained_cells; std::vector parent_cells; - this->get_contained_cells_inner(contained_cells, parent_cells); + // if this cell is filled w/ a material, it contains no other cells + if (type_ != Fill::MATERIAL) { + this->get_contained_cells_inner(contained_cells, parent_cells); + } return contained_cells; }