Repository navigation
load mesh objects from weight_windows.h5 file - #3598
Conversation
64a3a69 to
1074e77
Compare
|
I've added tests for reading and writing mesh objects from HDF5. |
pshriwise
left a comment
There was a problem hiding this comment.
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.
| 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.
| 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.
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.
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.
I decided to refactor most of the logical checking.
…n that mesh is at the back of the meshes vector in .
|
Haven't given it a full shakedown, but it appears to do the task. |
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
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)