From 59552944f563c2fc3703f1cb6887ede326434329 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Wed, 20 May 2020 12:46:33 -0500 Subject: [PATCH] Adding a check that material filled cells return an empty result. --- tests/regression_tests/cpp_driver/driver.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/regression_tests/cpp_driver/driver.cpp b/tests/regression_tests/cpp_driver/driver.cpp index 87d5ca9f5..f6fde30fd 100644 --- a/tests/regression_tests/cpp_driver/driver.cpp +++ b/tests/regression_tests/cpp_driver/driver.cpp @@ -37,6 +37,14 @@ int main(int argc, char** argv) { auto& lattice_cell = openmc::model::cells[root_univ->cells_[0]]; lattice_cell->set_temperature(300, 1, true); + // check that material-filled cells return no contained cells + for (auto& cell : openmc::model::cells) { + if (cell->type_ == Fill::MATERIAL) { + auto contained_cells = cell->get_contained_cells(); + assert(contained_cells.empty()); + } + } + // the summary file will be used to check that // temperatures were set correctly so clear // error output can be provided