diff --git a/scripts/openmc-update-inputs b/scripts/openmc-update-inputs index 0d25b5b974..3b4e9a3595 100755 --- a/scripts/openmc-update-inputs +++ b/scripts/openmc-update-inputs @@ -298,4 +298,4 @@ if __name__ == '__main__': move(fname, fname + '.original') # Write a new geometry file. - tree.write(fname) + tree.write(fname, xml_declaration=True) diff --git a/src/mesh.cpp b/src/mesh.cpp index 590df53e17..915679dd3d 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -149,8 +149,10 @@ RegularMesh::RegularMesh(pugi::xml_node node) "the coordinates on a tally mesh."); } - // Set width and upper right coordinate - width_ = xt::eval((upper_right_ - lower_left_) / shape_); + // Set width + if (shape_.size() > 0) { + width_ = xt::eval((upper_right_ - lower_left_) / shape_); + } } else { fatal_error("Must specify either and on a mesh."); }