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:
Adam G Nelson 2019-11-11 19:50:52 -06:00
parent 677f4f7d8b
commit 05fac29164
7 changed files with 19 additions and 27 deletions

View file

@ -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