mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Move check for consistent shape/lower_left on regular mesh
This commit is contained in:
parent
4b21307128
commit
d05bf7789d
1 changed files with 6 additions and 6 deletions
12
src/mesh.cpp
12
src/mesh.cpp
|
|
@ -550,6 +550,12 @@ RegularMesh::RegularMesh(pugi::xml_node node)
|
|||
fatal_error("Must specify <lower_left> on a mesh.");
|
||||
}
|
||||
|
||||
// Make sure lower_left and dimension match
|
||||
if (shape_.size() != lower_left_.size()) {
|
||||
fatal_error("Number of entries on <lower_left> must be the same "
|
||||
"as the number of entries on <dimension>.");
|
||||
}
|
||||
|
||||
if (check_for_node(node, "width")) {
|
||||
// Make sure both upper-right or width were specified
|
||||
if (check_for_node(node, "upper_right")) {
|
||||
|
|
@ -595,12 +601,6 @@ RegularMesh::RegularMesh(pugi::xml_node node)
|
|||
fatal_error("Must specify either <upper_right> and <width> on a mesh.");
|
||||
}
|
||||
|
||||
// Make sure lower_left and dimension match
|
||||
if (shape_.size() != lower_left_.size()) {
|
||||
fatal_error("Number of entries on <lower_left> must be the same "
|
||||
"as the number of entries on <dimension>.");
|
||||
}
|
||||
|
||||
// Set volume fraction
|
||||
volume_frac_ = 1.0/xt::prod(shape_)();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue