More updates from self review. Moving check for BCs into geometry_aux.

This commit is contained in:
Patrick Shriwise 2021-04-23 12:20:42 -05:00
parent c38b30221d
commit 400f3e9334
3 changed files with 16 additions and 18 deletions

View file

@ -66,6 +66,21 @@ void read_geometry_xml()
read_cells(root);
read_lattices(root);
// Check to make sure a boundary condition was applied to at least one
// surface
bool boundary_exists = false;
for (const auto& surf : model::surfaces) {
if (surf->bc_) {
boundary_exists = true;
break;
}
}
if (settings::run_mode != RunMode::PLOTTING && !boundary_exists) {
fatal_error("No boundary conditions were applied to any surfaces!");
}
// Allocate universes, universe cell arrays, and assign base universe
model::root_universe = find_root_universe();
}

View file

@ -1133,23 +1133,6 @@ void read_surfaces(pugi::xml_node node)
surf2.bc_ = surf1.bc_;
}
}
// Check to make sure a boundary condition was applied to at least one
// surface
bool boundary_exists = false;
for (const auto& surf : model::surfaces) {
if (surf->bc_) {
boundary_exists = true;
break;
}
}
// if (settings::run_mode != RunMode::PLOTTING && !boundary_exists) {
// fatal_error("No boundary conditions were applied to any surfaces!");
// }
// if (model::surfaces.size() == 0) {
// fatal_error("No surfaces found in geometry.xml!");
// }
}
void free_memory_surfaces()

View file

@ -68,4 +68,4 @@ class DAGMCUniverseTest(PyAPITestHarness):
def test_univ():
harness = DAGMCUniverseTest('statepoint.10.h5')
harness.main()
harness.main()