mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Revised MG code so that the energy group indices are 0-based instead of 1-based. Next commit will perform some code cleanup enabled by this change.
This commit is contained in:
parent
677f4f7d8b
commit
05fac29164
7 changed files with 19 additions and 27 deletions
|
|
@ -298,12 +298,12 @@ get_nuclide_xs(int index, int xstype, int gin, const int* gout,
|
|||
int gout_c;
|
||||
const int* gout_c_p;
|
||||
if (gout != nullptr) {
|
||||
gout_c = *gout - 1;
|
||||
gout_c = *gout;
|
||||
gout_c_p = &gout_c;
|
||||
} else {
|
||||
gout_c_p = gout;
|
||||
}
|
||||
return data::mg.nuclides_[index].get_xs(xstype, gin - 1, gout_c_p, mu, dg);
|
||||
return data::mg.nuclides_[index].get_xs(xstype, gin, gout_c_p, mu, dg);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -315,12 +315,12 @@ get_macro_xs(int index, int xstype, int gin, const int* gout,
|
|||
int gout_c;
|
||||
const int* gout_c_p;
|
||||
if (gout != nullptr) {
|
||||
gout_c = *gout - 1;
|
||||
gout_c = *gout;
|
||||
gout_c_p = &gout_c;
|
||||
} else {
|
||||
gout_c_p = gout;
|
||||
}
|
||||
return data::mg.macro_xs_[index].get_xs(xstype, gin - 1, gout_c_p, mu, dg);
|
||||
return data::mg.macro_xs_[index].get_xs(xstype, gin, gout_c_p, mu, dg);
|
||||
}
|
||||
|
||||
} // namespace openmc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue