Incorporating changes requested by @giudgiud

This commit is contained in:
Adam Nelson 2020-10-19 06:35:07 -05:00
parent 77015c0b14
commit 96b580d424
3 changed files with 17 additions and 8 deletions

View file

@ -38,12 +38,21 @@ ScattData::base_init(int order, const xt::xtensor<int, 1>& in_gmin,
mult[gin] = in_mult[gin];
// Make sure the multiplicity does not have 0s
unsigned long int num_converted = 0;
for (int go = 0; go < mult[gin].size(); go++) {
if (mult[gin][go] == 0.) {
num_converted += 1;
mult[gin][go] = 1.;
}
}
if (num_converted > 0) {
// Raise a warning to the user if we did have to do the conversion
std::string msg = std::to_string(num_converted) +
"entries in the Multiplicity Matrix were changed from 0 to 1";
warning(msg);
}
// Make sure the energy is normalized
double norm = std::accumulate(energy[gin].begin(), energy[gin].end(), 0.);