mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Avoid error in Shannon entropy mesh doesn't have dimension specified
This commit is contained in:
parent
2f68ab112d
commit
2ecd6446df
2 changed files with 5 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -149,8 +149,10 @@ RegularMesh::RegularMesh(pugi::xml_node node)
|
|||
"the <lower_left> 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 <upper_right> and <width> on a mesh.");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue