mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
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:
parent
0251dfe834
commit
c44bea2556
2 changed files with 5 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue