-
Couldn't load subscription status.
- Fork 575
load mesh objects from weight_windows.h5 file #3598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, @GuySten. One comment on separating concerns. We'll also want to attempt some testing for this of course if you're up for taking a crack at that.
64a3a69 to
1074e77
Compare
|
I've added tests for reading and writing mesh objects from HDF5. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relatively minor things to address here and then I think this is good! I refactored the object generation code because it was duplicated between the two read_meshes versions and if we ever update that I'd like it to be able to be changed in one place.
Thanks for adding to the C++ tests! I really like seeing that suite grow. I also added a test for a roundtrip of multiple meshes that I think should pass once one of the comments is addressed.
src/mesh.cpp
Outdated
| fatal_error("Number of entries on <lower_left> must be the same " | ||
| "as the number of entries on <dimension>."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| fatal_error("Number of entries on <lower_left> must be the same " | |
| "as the number of entries on <dimension>."); | |
| fatal_error("Number of entries on lower_left dataset must be the same " | |
| "as the number of entries for the mesh dimension."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are other, similar error messages that imply the mesh is read from an XML file that we should probably update below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could factor out some of this logical checking into new methods for RegularMesh and RectilinearMesh like the CylindricalMesh::set_grid method does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to refactor most of the logical checking.
…n that mesh is at the back of the meshes vector in .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Haven't given it a full shakedown, but it appears to do the task. |
Co-authored-by: Patrick Shriwise <[email protected]>
Description
Currently, when openmc load weight windows from an hdf5 file the meshes are not loaded.
This PR change this behavior so the meshes inside the weight windows hdf5 file are also loaded.
Fixes #3588
Checklist
I have followed the style guidelines for Python source files (if applicable)I have made corresponding changes to the documentation (if applicable)