diff --git a/src/mesh.cpp b/src/mesh.cpp index 64d2c269ba..a5409f05a0 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -550,6 +550,12 @@ RegularMesh::RegularMesh(pugi::xml_node node) fatal_error("Must specify on a mesh."); } + // Make sure lower_left and dimension match + if (shape_.size() != lower_left_.size()) { + fatal_error("Number of entries on must be the same " + "as the number of entries on ."); + } + 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 and on a mesh."); } - // Make sure lower_left and dimension match - if (shape_.size() != lower_left_.size()) { - fatal_error("Number of entries on must be the same " - "as the number of entries on ."); - } - // Set volume fraction volume_frac_ = 1.0/xt::prod(shape_)(); }