mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
More updates from self review. Moving check for BCs into geometry_aux.
This commit is contained in:
parent
c38b30221d
commit
400f3e9334
3 changed files with 16 additions and 18 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -68,4 +68,4 @@ class DAGMCUniverseTest(PyAPITestHarness):
|
|||
|
||||
def test_univ():
|
||||
harness = DAGMCUniverseTest('statepoint.10.h5')
|
||||
harness.main()
|
||||
harness.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue