Merge pull request #4616 from jrgissing/another_reaction_count_fix

bond/react: another reaction-count bug fix
This commit is contained in:
Axel Kohlmeyer
2025-06-08 23:43:15 -04:00
committed by GitHub

View File

@ -3109,7 +3109,7 @@ void FixBondReact::update_everything()
update_num_mega++;
}
MPI_Allreduce(MPI_IN_PLACE, &noccur[0], nreacts, MPI_INT, MPI_SUM, world);
reaction_count_total[rxnID] += noccur[rxnID];
for (rxnID = 0; rxnID < nreacts; rxnID++) reaction_count_total[rxnID] += noccur[rxnID];
} else if (pass == 1) {
for (int i = 0; i < global_megasize; i++) {
rxnID = (int) global_mega_glove[0][i];