Fix index_inelastic_scatter when redundant reactions are present

One example of this is Be9 in JEFF 3.2/3.3 which has MT=875+
This commit is contained in:
Paul Romano 2018-11-27 08:17:10 -06:00
parent 0251dfe834
commit c44bea2556
2 changed files with 5 additions and 2 deletions

View file

@ -69,6 +69,8 @@ bool is_inelastic_scatter(int mt)
}
} else if (mt <= 200) {
return !is_disappearance(mt);
} else if (mt >= N_2N0 && mt <= N_2NC) {
return true;
} else {
return false;
}

View file

@ -173,7 +173,8 @@ Nuclide::Nuclide(hid_t group, const double* temperature, int n)
reactions_.push_back(std::make_unique<Reaction>(rx_group, temps_to_read));
// Check for 0K elastic scattering
if (reactions_.back()->mt_ == ELASTIC) {
const auto& rx = reactions_.back();
if (rx->mt_ == ELASTIC) {
if (object_exists(rx_group, "0K")) {
hid_t temp_group = open_group(rx_group, "0K");
read_dataset(temp_group, "xs", elastic_0K_);
@ -183,7 +184,7 @@ Nuclide::Nuclide(hid_t group, const double* temperature, int n)
close_group(rx_group);
// Determine reaction indices for inelastic scattering reactions
if (is_inelastic_scatter(reactions_.back()->mt_)) {
if (is_inelastic_scatter(rx->mt_) && !rx->redundant_) {
index_inelastic_scatter_.push_back(reactions_.size() - 1);
}
}