mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Resolved issue #1072, which came about due to changes made in #1068 that caused old h5 files to no longer work due to missing 'redundant' attribute
This commit is contained in:
parent
be49834727
commit
5dd0956650
1 changed files with 10 additions and 2 deletions
|
|
@ -17,8 +17,16 @@ Reaction::Reaction(hid_t group, const std::vector<int>& temperatures)
|
|||
int tmp;
|
||||
read_attribute(group, "center_of_mass", tmp);
|
||||
scatter_in_cm_ = (tmp == 1);
|
||||
read_attribute(group, "redundant", tmp);
|
||||
redundant_ = (tmp == 1);
|
||||
|
||||
// Checks if redudant attribute exists before loading
|
||||
// (for compatibiltiy with legacy .h5 libraries)
|
||||
htri_t exists = H5Aexists(group, "redundant");
|
||||
if( exists ) {
|
||||
read_attribute(group, "redundant", tmp);
|
||||
redundant_ = (tmp == 1);
|
||||
} else {
|
||||
redundant_ = false;
|
||||
}
|
||||
|
||||
// Read cross section and threshold_idx data
|
||||
for (auto t : temperatures) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue